Tuesday, December 19, 2017

Sql Server Single User To Multi User

Step 1: 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 = 'DBName'
go


Step 2: kill 122--(SpId)--spid

Step 3:ALTER DATABASE DBName

       SET MULTI_USER