microsoft / tigertoolbox

Toolbox repository for Tiger team
http://aka.ms/sqlserverteam
Other
1.48k stars 740 forks source link

Fixed blocked_pageid output for SQL 2022 #308

Open kenjmartinii opened 4 months ago

kenjmartinii commented 4 months ago

Within SQL 2022, and when experiencing any sort of PAGE waits, the resource_description value within sys.dm_os_waiting_tasks contains additional information that was not returned in previous versions of SQL Server and was causing the CASE statement for PAGE waits to error out with an invalid data type conversion. The updated code will correctly parse the resource_description value to return the 'blocked_pageid' value in SQL Server 2022 and previous versions.