August 30, 2010 at 4:38 am
Hi,
I have an SQL Server 2008 and it's working fine. However, everytime I try to Insert a new record/access tables/etc, the Connect to Database Engine prompts. It would be better if it could just prompt once and not most of the time. How can I do this? Thanks.
August 30, 2010 at 6:40 am
repeatedly as in within seconds of each other, or you mean you go away, come back after a bit, and get re-prompted for connection info?
if it is the second choice, it might be the database is set to AUTOCLOSE = TRUE, especially if this is an express isntace or restored from one...in that case, to conserve resources on your machine, the db gets closed after a period of inactivity(30 minutes? don't remember without googling) so when you try to query it again, your connection was dropped, and you need to reconnect.
Lowell
August 30, 2010 at 7:35 am
Lowell (8/30/2010)
repeatedly as in within seconds of each other, or you mean you go away, come back after a bit, and get re-prompted for connection info?if it is the second choice, it might be the database is set to AUTOCLOSE = TRUE, especially if this is an express isntace or restored from one...in that case, to conserve resources on your machine, the db gets closed after a period of inactivity(30 minutes? don't remember without googling) so when you try to query it again, your connection was dropped, and you need to reconnect.
Repeatedly as in when I try to Insert a new record, the Connect to Database Engine prompts. It's as if I am not allowed to Insert a record even if I am already connected to the database. I've also checked the AUTOCLOSE. AUTOCLOSE is set to false.
August 30, 2010 at 2:33 pm
How are you inserting this data? Are you using the GUI tool to insert the data, or are you using a query window and issuing insert statements?
Check the SQL Server logs to see if you registering any errors - it could be that each insert attempt is generating an error and closing the connection. This could be caused by a trigger on the table that is trying to raise an error with a high enough severity that kills the connection.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
August 30, 2010 at 3:51 pm
Jeffrey Williams-493691 (8/30/2010)
How are you inserting this data? Are you using the GUI tool to insert the data, or are you using a query window and issuing insert statements?Check the SQL Server logs to see if you registering any errors - it could be that each insert attempt is generating an error and closing the connection. This could be caused by a trigger on the table that is trying to raise an error with a high enough severity that kills the connection.
When I use the query window, it does not ask "Connect to Database Engine." But, when I use the GUI tool, it asks me to "Connect to the Database Engine." I've checked the SQL Server Logs, but I do not see error logs.
August 31, 2010 at 8:10 pm
Well - that says a lot. The GUI is buggy - has been since Enterprise Manager and should be avoided.
I would recommend scripting your changes and running them as insert/update/delete statements from a query window. This way, you have full control over what is executing.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply