sqlserver断开数据库所有连接


declare @i int declare cur cursor for select spid from sysprocesses where db_name(dbid)= 'Your_Database_Name' open cur fetch next from cur into @i while @@fetch_status=0 begin exec('kill '+@i) fetch next from cur into @i end close cur deallocate cur

 

 

转:https://www.jb51.net/article/32708.htm

上一篇:Python可视化 | Seaborn包—heatmap()


下一篇:【AMAD】django-social-auth -- 让django使用社交网络oauth鉴权变得极为轻松!