mssql kill connections
USE master;
DECLARE @kill varchar(8000); SET @kill = '';
SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), spid) + ';'
FROM master..sysprocesses
WHERE dbid = db_id('SolarWindsOrion') AND spid not in ( 96, 54 )
--print @kill;
EXEC(@kill);