How you will filter the user sessions only?

The following query will only return user sessions and will filter out the internal system sessions:
SELECT * FROM sys.dm_exec_sessions WHERE is_user_process = 1;

Note:-
Generally speaking, user sessions will have a session_id higher than 50; everything
lower is reserved for internal SQL Server processes. However, on very busy servers there
is a possibility that SQL Server needs to use a session_id higher than 50.

Comments

Archive

Contact Form

Send