Number of current connections

  • hello i have a question, if i get the number of active spids

    by executing sp_who 'active', does this mean the number of spids are the number of current connections?

  • sp_who2 'active' returns all the active connections which are runnable.

    If there is an application with a connection pool of 25 connections but is no queries are being execute via these connections then you wont see those in sp_who2 active but you can find them in sysprocesses.

    For all the connections, i would see

    select * from sysprocesses where spid > 50

  • In SQL 2005, I would advise to use the DMV's sys.dm_exec_connections and sys.dm_exec_requests. The first will give you all user connections, while the second will show only the active connections.

    Here you can find a good article about how to use them.

    [font="Verdana"]Markus Bohse[/font]

  • thank you!!

Viewing 4 posts - 1 through 3 (of 3 total)

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