1
0
pmasl 6 жил өмнө
parent
commit
0984412259

+ 2 - 1
usp_WhatsUp/README.md

@@ -56,4 +56,5 @@ In the output, you will find the following information in 6 sections:
 -  04/17/2019 Fixed function stats query failing in SQL Server 2012 and 2014.
 -  06/05/2019 Added TOP option to return limited number of rows for execution statistics.
 -  06/06/2019 Fixed issue with CHAR(0) and XML conversion;
-   -  Fixed issue with @fnstats execution error.
+   -  Fixed issue with @fnstats execution error.
+-  06/11/2019 Fixed issue with running requests in SQL Server 2019.

+ 1 - 1
usp_WhatsUp/usp_whatsup.sql

@@ -366,7 +366,7 @@ FROM sys.dm_exec_requests (NOLOCK) er
 	OUTER APPLY sys.dm_exec_query_statistics_xml(er.session_id) qes
 	OUTER APPLY sys.dm_exec_query_plan_stats(er.plan_handle) qps
 	OUTER APPLY sys.fn_PageResCracker(er.page_resource) pc  
-	OUTER APPLY sys.dm_db_page_info(pc.db_id, pc.file_id, pc.page_id, ''LIMITED'') pi
+	OUTER APPLY sys.dm_db_page_info(ISNULL(pc.db_id, 0), ISNULL(pc.file_id, 0), ISNULL(pc.page_id, 0), ''LIMITED'') pi
 WHERE er.session_id <> @@SPID AND es.is_user_process = 1
 ORDER BY er.total_elapsed_time DESC, er.logical_reads DESC, [database_name], session_id'
 	END