One of the most commonly used stored procedures within SQL server is SP_WHO2, as it shows all the sessions that are currently established in the database. These are denoted as SPID‘s, or Server process Id’s. The following SQL query is useful for formatting the output, to filter out system database activity and ordering the output per database.