标签:blog ar os sp for 数据 2014 log as
杀死数据库连接:
DECLARE @temp NVARCHAR(20) DECLARE myCurse CURSOR FOR SELECT spid FROM sys.sysprocesses WHERE dbid = DB_ID('YourDatabaseName') OPEN myCurse FETCH NEXT FROM myCurse INTO @temp WHILE @@FETCH_STATUS = 0 BEGIN EXEC ('kill '+@temp) FETCH NEXT FROM myCurse INTO @temp END CLOSE myCurse DEALLOCATE myCurse
标签:blog ar os sp for 数据 2014 log as
原文地址:http://blog.csdn.net/tianshijianbing1989/article/details/41014609