Run below query and it will show you the dbname and number of connections SELECT     DB_NAME(dbid) as DatabaseName,     COUNT(dbid) as ...

how to see active SQL Server connections?

1:45 AM Raghunatha 0 Comments

Run below query and it will show you the dbname and number of connections

SELECT
    DB_NAME(dbid) as DatabaseName,
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE
    dbid > 0
GROUP BY
    dbid, loginame;

0 comments:

Powered by Blogger.