Tuesday, May 6, 2014

Find active connections and kill

Find active connections

SELECT DB_NAME(dbid) as DBName, dbid,loginame as LoginName,CAST(SPID AS VARCHAR(4)) AS spid
FROM     sys.sysprocesses WHERE dbid>10
ORDER BY dbid           



You will find spid. Then kill the connection by spid. Do not kill yourself.

KILL 61

No comments:

Post a Comment