use master
GO
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
kill 56 --=> kill the number in spid field
GO
exec sp_dboption 'dbname', 'single user', 'FALSE'
GO
https://stackoverflow.com/questions/14652923/set-database-from-single-user-mode-to-multi-user
Hiç yorum yok:
Yorum Gönder