Share via


Database in single user mode

Some times on sql server our database goes to single user mode(upgrade failed)

clip_image002

And when we tries to make its multi user will get error

clip_image003

Alter database ntlm-2007-2010-one set multi_user

But sometimes this will not help.

Then you need first find what is your database id

In this case it is 48

clip_image005

Then run  to find who connected to it.

select * from sys.sysprocesses where dbid=48

And look for  spid

clip_image007

Then run

Use master

Kill 147

Alter database ntlm-2007-2010-one set multi_user

It will take less than 2 minute.

Comments