Monday, October 18, 2010

Check how many open DB connection we have

SELECT SPID, STATUS, PROGRAM_NAME, LOGINAME=RTRIM(LOGINAME), HOSTNAME, CMD
FROM  MASTER.DBO.SYSPROCESSES
WHERE DB_NAME(DBID) = 'MyDb' AND DBID != 0

No comments: