Friday, March 2, 2018

SQL SERVER - How list active sessions

For listing active server sessions use this stored procedure:
exec sp_who
Or newest:
exec sp_who2
Output:
SPID  Status     Login       HostName       BlkBy DBName    Command          CPUTime DiskIO LastBatch      SPID  REQUESTID
----- ---------- ----------- ------------- ----- --------- ---------------- ------- ------ -------------- ------ ---------
...
65    sleeping   dd\tommy    PWSQ777         .   framework AWAITING COMMAND 0       20     02/14 10:55:32 65    0    
66    sleeping   ron         HP4004888       .   framework AWAITING COMMAND 204     7      03/02 08:02:14 66    0    
67    sleeping   flash       HP3010999       .   framework AWAITING COMMAND 95      0      03/02 07:12:17 67    0    

No comments:

Post a Comment