How to Bring Database from Single_User to Multi_User

Suppose you had a database stuck in single user mode that is in a busy OLTP environment and
you can't bring it to multi user mode because a process is currently using it,
you may run the following to SQL query to bring the database from single user to multi user mode: use master kill 75 -- 75 is the pid to the database in single user mode alter database [MyDatabase] set offline with rollback immediate alter database [MyDatabase] set online, multi_user with rollback immediate If you want to find out the pid of the process to be killed, please refer to my other article at
https://kojiroh.wordpress.com/2013/10/01/how-to-retrieve-processes-using-specified-database/ Reference: http://www.sqlservercentral.com/Forums/Topic740655-146-1.aspx
Advertisements

One thought on “How to Bring Database from Single_User to Multi_User

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s