Pages

Social Icons

Sunday 7 October 2012

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

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'

No comments:

Post a Comment