Current DB Connections

  • I am trying to count the number of current DB connections. sp_who gives infor on all dbs. How do I filter out  (count) the connections to a database?

    Thank you.

    Mickey

  • select count(*) from sysprocesses where db_name(dbid)= '<dbname>'

     

    MohammedU
    Microsoft SQL Server MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply