October 6, 2002 at 6:14 pm
Could someone please explain the process of putting SQL into single-user mode, and then returning it to multi-user?
Thanks, Matt.
October 7, 2002 at 1:18 am
Just execute an ALTER DATABASE staement, like this:
ALTER DATABASE databasename
SET SINGLE_USER
There can't be any users logged on to the database in order for you to execute this statement, but you can add the option WITH ROLLBACK IMMEDIATE to force an immediate single user mode.
Then when you're done and want to go back to multi user mode, just execute:
ALTER DATABASE databasename
SET MULTI_USER
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
October 7, 2002 at 3:59 am
You can also do thru EM by right clicking the database choosing proerties and check the value on the option tab related to this.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
October 7, 2002 at 11:56 am
Run this procedure with following parameter
sp_dboption 'DB name', 'single user', 'true'
and database will be in single user mode. When returning to multi user mode Use 'False' as parameter.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply