Skip to content

Commit 8346b4c

Browse files
committed
#3766 sp_BlitzFirst thousands of transactions
Making it work with 2014 & prior. Closes #3766.
1 parent 77905af commit 8346b4c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sp_BlitzFirst.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,9 @@ BEGIN
17921792

17931793
IF EXISTS (SELECT * FROM sys.dm_exec_requests WHERE total_elapsed_time > 5000 AND request_id > 0)
17941794

1795-
DROP TABLE IF EXISTS #BlitzFirstTmpSession
1795+
IF OBJECT_ID('tempdb..#BlitzFirstTmpSession', 'U') IS NOT NULL
1796+
DROP TABLE #BlitzFirstTmpSession;
1797+
17961798
SELECT DISTINCT request_session_id, resource_database_id
17971799
INTO #BlitzFirstTmpSession
17981800
FROM sys.dm_tran_locks

0 commit comments

Comments
 (0)