SQL Server 快速关闭所有连接(快速脱机)

DECLARE @sql nvarchar(4000)
SET @sql= ''
SELECT @sql = @sql + ' kill ' + CAST(spid AS VARCHAR) + CHAR(13)
FROM master.sys.sysprocesses WHERE dbid = db_id( 'GX_VTS_ManagementCenter_4.5')
EXEC(@sql)

EXEC sp_executesql @sql

你可能感兴趣的:(SQL Server)