July 14, 2005 at 3:53 pm
I started sql server in a single user mode from the enterprise manager. Later I can't connect into it. Is there a way to undo the single user mode from a command line?
July 14, 2005 at 6:42 pm
I think it goes something like this:
use master
go
exec sp_dboption dbname, 'single user', false
go
--check point
use dbname
go
checkpoint
go
July 15, 2005 at 6:36 am
sp_dboption is still around for backward compatibility. Microsoft now recommends using ALTER DATABASE.
You should read BOL about the options and the effect of this operation on your database, especially what happens to users connected to the database when you execute the comman.
Now, for the short answer this will do what you need:
ALTER DATABASE test SET SINGLE_USER
HTH
July 15, 2005 at 7:48 am
Did the poster not say "...started sql server..."
Not a database...
Unless they meant a database...
Can you not connect to sql or can you not connect to a database?
July 15, 2005 at 8:02 am
You know that the reason I could not use the EM to connect was because my sqlagent service was running (that one connection right there). After stopping the sqlagent serivice, I was able to use my EM to disable the single user mode.
Thanks to you all!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply