How do you measure the number of open database connections
You can try running a query against the master db like this:
SELECT SPID,
STATUS,
PROGRAM_NAME,
LOGINAME=RTRIM(LOGINAME),
HOSTNAME,
CMD
FROM MASTER.DBO.SYSPROCESSES
WHERE DB_NAME(DBID) = 'TEST' AND DBID != 0
See this link for more details.
Have you tried running the sp_who
stored proc? If there are stale open connections they should show up there.
To show just the sa
users processes run:
EXEC sp_who 'sa'