Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to find the query running on a given SPID?

user-image
Question added by antonios awadallah , HRMS Application Consultant , HITS Technologies
Date Posted: 2016/12/28
Sarfaraz Alam
by Sarfaraz Alam , Software Developer , LC Biz

SELECT * FROM sys.dm_exec_requests er

CROSS APPLY sys.dm_exec_sql_text(er.sql_handle)

 WHERE session_id=@YourSesionID

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.