Search This Blog

Currently Executing SQL Statements

Here is a script to find out the currently executing sql statements, of course you can use the ‘sp_who2’, but I use this one very often

select C.client_tcp_port, T.text
from sys.dm_exec_connections  C
CROSS APPLY sys.dm_exec_sql_text(most_recent_sql_handle) T
where client_net_address = 'myComputerIpHere'

No comments: