复制代码 代码如下:
use master
declare @spid int
declare cur cursor
for select spid from sysprocesses where dbid = 5
fetch next from cur into @spid
while @@fetch_status = 0
begin
–exec (‘kill ‘ + @spid )
fetch next from cur into @spid
end
close cur
deallocate cur
sqlserver下Kill 所有连接到某一数据库的连接
•
生活家
赞 (0)
招财猫鱼身上溃烂,招财猫鱼烂肉很严重怎么办
上一篇
2022年3月21日
柴油中毒需要洗胃吗
下一篇
2022年3月21日