Created
March 17, 2010 16:59
-
-
Save seven1m/335453 to your computer and use it in GitHub Desktop.
Find blocking processes on SQL Server 2005
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I don't pretend to understand this query, | |
# but it seems to be a good list of processes | |
# that are "blocking" other processes and hosing the server. | |
select * from sys.dm_os_waiting_tasks where session_id != @@spid and session_id > 50 and blocking_session_id < session_id order by wait_duration_ms desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment