Click here to Skip to main content
16,004,927 members
Home / Discussions / Database
   

Database

 
GeneralRe: Back up database Error Pin
sara-setare21-Apr-13 19:25
sara-setare21-Apr-13 19:25 
GeneralRe: Back up database Error Pin
Eddy Vluggen22-Apr-13 1:57
professionalEddy Vluggen22-Apr-13 1:57 
QuestionIs it a bad idea to keep a Database connection open Pin
Richard.Berry10019-Apr-13 23:42
Richard.Berry10019-Apr-13 23:42 
AnswerRe: Is it a bad idea to keep a Database connection open Pin
Eddy Vluggen19-Apr-13 23:47
professionalEddy Vluggen19-Apr-13 23:47 
GeneralRe: Is it a bad idea to keep a Database connection open Pin
Richard.Berry10022-Apr-13 8:23
Richard.Berry10022-Apr-13 8:23 
AnswerRe: Is it a bad idea to keep a Database connection open Pin
PIEBALDconsult20-Apr-13 5:26
mvePIEBALDconsult20-Apr-13 5:26 
AnswerRe: Is it a bad idea to keep a Database connection open Pin
GuyThiebaut20-Apr-13 20:38
professionalGuyThiebaut20-Apr-13 20:38 
AnswerRe: Is it a bad idea to keep a Database connection open Pin
jschell21-Apr-13 6:37
jschell21-Apr-13 6:37 
Richard.Berry100 wrote:


Is it bad practice to open a connection when the application starts, to avoid delays caused by opening the connection each time a query is executed?


Normal MS stuff uses a connection pool. The first time you create the connection it is opened. After that it gets it from the pool. It is already open and it stays open. It never closes while the application runs. That is the default behavior of the connection pool.

Your suggestion is doing nothing more than priming the pump to make it appear later that your application is more responsive.

So
1. There is nothing wrong with doing that.
2. It is unlikely to have any impact on the database server nor the architecture
3. It is a perfectly reasonable thing to do.


Richard.Berry100 wrote:
or will SQL server drop it if it is unused for some time?


No SQL Server will not close idle connections. That itself is actually a problem because it means that if a client connection crashes (client fails or network fails) that the connection just remains there forever. One either must set up a process to clean them or at least look for them every once in a while.
GeneralRe: Is it a bad idea to keep a Database connection open Pin
PIEBALDconsult22-Apr-13 6:38
mvePIEBALDconsult22-Apr-13 6:38 
GeneralRe: Is it a bad idea to keep a Database connection open Pin
jschell24-Apr-13 8:59
jschell24-Apr-13 8:59 
GeneralRe: Is it a bad idea to keep a Database connection open Pin
Richard.Berry10024-Apr-13 10:51
Richard.Berry10024-Apr-13 10:51 
AnswerRe: Is it a bad idea to keep a Database connection open Pin
Richard.Berry10022-Apr-13 8:17
Richard.Berry10022-Apr-13 8:17 
QuestionRecursively build a string Pin
Lash2019-Apr-13 12:26
Lash2019-Apr-13 12:26 
AnswerRe: Recursively build a string Pin
jschell21-Apr-13 6:38
jschell21-Apr-13 6:38 
AnswerRe: Recursively build a string Pin
Niral Soni22-Apr-13 2:35
Niral Soni22-Apr-13 2:35 
GeneralRe: Recursively build a string Pin
Lash2022-Apr-13 7:56
Lash2022-Apr-13 7:56 
Questionsqlserver not found Pin
Member 999911219-Apr-13 2:18
Member 999911219-Apr-13 2:18 
AnswerRe: sqlserver not found Pin
jschell19-Apr-13 10:22
jschell19-Apr-13 10:22 
QuestionConversion failed in sql Pin
venkatesann18-Apr-13 4:23
venkatesann18-Apr-13 4:23 
AnswerRe: Conversion failed in sql Pin
Richard MacCutchan18-Apr-13 4:34
mveRichard MacCutchan18-Apr-13 4:34 
AnswerRe: Conversion failed in sql Pin
GuyThiebaut18-Apr-13 5:41
professionalGuyThiebaut18-Apr-13 5:41 
AnswerRe: Conversion failed in sql Pin
Mycroft Holmes18-Apr-13 12:39
professionalMycroft Holmes18-Apr-13 12:39 
AnswerRe: Conversion failed in sql Pin
Bernhard Hiller18-Apr-13 22:13
Bernhard Hiller18-Apr-13 22:13 
GeneralRe: Conversion failed in sql Pin
Mycroft Holmes19-Apr-13 0:49
professionalMycroft Holmes19-Apr-13 0:49 
GeneralRe: Conversion failed in sql Pin
GuyThiebaut19-Apr-13 1:36
professionalGuyThiebaut19-Apr-13 1:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.