Tuesday, 3 January 2017

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.
Visit Our New Site for HR Interview Questions Answers http://www.interviewboat.com/Company/GetCompany
Sponsored Ads

0 comments:

Post a Comment