5

I have a database that is stuck in single-user mode. I kill the process that obtains the "lock" on the db but when I kill it another one spawns automatically, (using the sa account). This happens even with SQL Server agent disabled. Any ideas?

2 Answers 2

11

Can you login into the server/database?

If not, try the ADMIN:ServerName and it should open an emergency admin session

Then you can go into the SQL Server to ALTER DATABASE [name] SET MULTI_USER

2
  • For reference, this is called the DAC , or dedicated administrator connection - and I believe it needs to be enabled in sql server surface area config.
    – Sam
    Nov 25, 2008 at 20:29
  • Didn't work for me the first time, but worked after restarting SQL Server.
    – g .
    Apr 28, 2009 at 15:14
3

It's probably your SQL Management Studio (or similar) connection. Your killing your own connection, then re-connecting to see if anyone else is on it, resulting in another connection.

If that is not it, check out the properties (username, status, Application) of the connection in the "Activity Monitor" (under the "Management" folder).

If you want to move it out of single user mode, right click on the database and go to the properties. Select the "Options", and right down the bottom is a property called "Restrict Access".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.