Connect to Database Engine prompts repeatedly

  • 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.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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.

  • 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

  • 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.

  • 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