Kill All Sessions Coming from a Host in SQL Server

Kill Sessions by HOST SQL Server --Check no. of sessions coming from all hosts connected to DB -- SELECT hostname, COUNT(hostname) FROM sys.sysprocesses P JOIN sys.sysdatabases D ON (D.dbid = P.dbid) JOIN sys.sysusers U ON (P.uid = U.uid) WHERE hostname != '' GROUP BY hostname ORDER BY COUNT(hostname) DESC; -- Create Procedure to kill sessions … Continue reading Kill All Sessions Coming from a Host in SQL Server

Advertisements