Skip to main content
edited tags
Link
Hannah Vernon
  • 70.5k
  • 22
  • 177
  • 321
Source Link
TtT23
  • 275
  • 2
  • 12

SQL Server 2008 R2 - Capture or be notified when an sql handle is ran

I'd like to monitor a particular SQL handle and find out who (process id) is running the SQL.

Is there a way to retrieve either a list of proc ids who executed the SQL handle in last N minutes or be automatically notified when that query is ran? or is only option is to run sys.dm_exec_requests continuously?