断开Sql Server 2005所有连接
断开Sql Server 2005所有连接
代码
use master
go
declare @d varchar(8000)
set @d= ' '
select @d=@d+ ' kill '+cast(spid as varchar)+char(13)
from master..sysprocesses where dbid=db_id( 'aspectdemo ')
exec(@d)
go
declare @d varchar(8000)
set @d= ' '
select @d=@d+ ' kill '+cast(spid as varchar)+char(13)
from master..sysprocesses where dbid=db_id( 'aspectdemo ')
exec(@d)
作者:Olar Tan
出处:http://www.cnblogs.com/olartan
♪:没有做不到的 只有偷懒而错过的 ♪