Remove SQL Server database from single-user mode to Multi-User Mode

Kapildalke
Posted by Kapildalke under Sql Server category on | Points: 40 | Views : 3788
This query should be executed in Master Database(System Database)...
select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
from sysprocesses p inner join sysdatabases d on p.dbid = d.dbid
where d.name = 'db_Name'
GO

kill sp_id

exec sp_dboption 'db_Name', 'single user', 'FALSE'

Comments or Responses

Login to post response