Widen collector columns to match DMV documentation#552
Merged
erikdarlingdata merged 1 commit intodevfrom Mar 13, 2026
Merged
Conversation
Full audit of all collector tables against Microsoft DMV docs found 6 SQL Server columns and 2 Lite columns narrower than documented types: SQL Server: - cpu_scheduler_stats: total_work_queue_count, total_active_parallel_thread_count (int -> bigint) - cpu_scheduler_stats: system_memory_state_desc (nvarchar(120) -> nvarchar(256)) - waiting_tasks: resource_description (nvarchar(1000) -> nvarchar(3072)) - database_size_stats: recovery_model_desc (nvarchar(12) -> nvarchar(60)) - database_size_stats: volume_mount_point (nvarchar(256) -> nvarchar(512)) Lite (DuckDB): - tempdb_stats: total_sessions_using_tempdb (INTEGER -> BIGINT, removed narrowing cast) - session_stats: connection_count (INTEGER -> BIGINT, COUNT_BIG result) Also fixes Azure SQL DB collector CONVERT(nvarchar(12),...) -> nvarchar(60) for recovery_model_desc. Idempotent upgrade script tested on sql2022. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
02_widen_audit_columns.sql) for existing installationsSQL Server fixes
Lite fixes
Files changed
install/02_create_tables.sql— fresh install definitionsinstall/06_ensure_collection_table.sql— ensure procedure definitionsinstall/52_collect_database_size_stats.sql— Azure SQL DB CONVERT widthLite/Database/Schema.cs— DuckDB schemaLite/Services/RemoteCollectorService.TempDb.cs— narrowing cast fixLite/Services/RemoteCollectorService.SessionStats.cs— narrowing cast fixupgrades/2.2.0-to-2.3.0/02_widen_audit_columns.sql— idempotent upgradeTest plan
🤖 Generated with Claude Code