diff --git a/install/06_ensure_collection_table.sql b/install/06_ensure_collection_table.sql index dc1414e6..e78e5bb9 100644 --- a/install/06_ensure_collection_table.sql +++ b/install/06_ensure_collection_table.sql @@ -1157,6 +1157,9 @@ BEGIN is_clustered bit NULL, enterprise_features nvarchar(max) NULL, service_objective sysname NULL, + lock_pages_in_memory bit NULL, + instant_file_initialization_enabled bit NULL, + memory_dump_count integer NULL, row_hash binary(32) NULL, CONSTRAINT PK_server_properties diff --git a/install/09_collect_query_store.sql b/install/09_collect_query_store.sql index db18720e..7e812a91 100644 --- a/install/09_collect_query_store.sql +++ b/install/09_collect_query_store.sql @@ -662,8 +662,12 @@ BEGIN avg_tempdb_space_used, min_tempdb_space_used, max_tempdb_space_used, - plan_type, + /* Order must match the dynamic SELECT, which is bound by ordinal by + INSERT...EXEC: the 2017+ block emits plan_forcing_type before the 2022+ + block emits plan_type. Swapping these silently stores each in the other's + column. */ plan_forcing_type, + plan_type, is_forced_plan, force_failure_count, last_force_failure_reason_desc, diff --git a/install/23_process_blocked_process_xml.sql b/install/23_process_blocked_process_xml.sql index df664c44..4fbd8084 100644 --- a/install/23_process_blocked_process_xml.sql +++ b/install/23_process_blocked_process_xml.sql @@ -75,7 +75,7 @@ BEGIN SET @sql = N' IF OBJECT_ID(N''' + QUOTENAME(@procedure_database) + N'.dbo.sp_HumanEventsBlockViewer'', N''P'') IS NOT NULL BEGIN - SELECT @blockviewer_database = N''' + QUOTENAME(@procedure_database) + N'''; + SELECT @blockviewer_database = N''' + REPLACE(@procedure_database, '''', '''''') + N'''; END;'; EXECUTE sys.sp_executesql diff --git a/install/25_process_deadlock_xml.sql b/install/25_process_deadlock_xml.sql index 02f48383..263b6b6c 100644 --- a/install/25_process_deadlock_xml.sql +++ b/install/25_process_deadlock_xml.sql @@ -73,7 +73,7 @@ BEGIN SET @sql = N' IF OBJECT_ID(N''' + QUOTENAME(@procedure_database) + N'.dbo.sp_BlitzLock'', N''P'') IS NOT NULL BEGIN - SELECT @blitzlock_database = N''' + QUOTENAME(@procedure_database) + N'''; + SELECT @blitzlock_database = N''' + REPLACE(@procedure_database, '''', '''''') + N'''; END;'; EXECUTE sys.sp_executesql diff --git a/install/28_collect_system_health_wrapper.sql b/install/28_collect_system_health_wrapper.sql index 70f74b8a..4f3bd3ed 100644 --- a/install/28_collect_system_health_wrapper.sql +++ b/install/28_collect_system_health_wrapper.sql @@ -69,7 +69,7 @@ BEGIN SET @sql = N' IF OBJECT_ID(N''' + QUOTENAME(@procedure_database) + N'.dbo.sp_HealthParser'', N''P'') IS NOT NULL BEGIN - SELECT @healthparser_database = N''' + QUOTENAME(@procedure_database) + N'''; + SELECT @healthparser_database = N''' + REPLACE(@procedure_database, '''', '''''') + N'''; END;'; EXECUTE sys.sp_executesql