Skip to content

Fix File I/O chart 'Unknown' labels (#633)#636

Merged
erikdarlingdata merged 3 commits intodevfrom
fix/file-io-unknown-labels-633
Mar 19, 2026
Merged

Fix File I/O chart 'Unknown' labels (#633)#636
erikdarlingdata merged 3 commits intodevfrom
fix/file-io-unknown-labels-633

Conversation

@erikdarlingdata
Copy link
Owner

Fall back to DB_{id} and File_{id} instead of generic 'Unknown' when sys.master_files LEFT JOIN misses.

erikdarlingdata and others added 3 commits March 18, 2026 12:31
- llms.txt: structured project summary for LLM crawlers (llmstxt.org standard)
- CITATION.cff: enables GitHub "Cite this repository" widget + structured metadata

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed CROSS APPLY sys.dm_exec_plan_attributes and the direct
sys.databases join. Both dm_exec_plan_attributes and dm_exec_sql_text
can trigger severity 22 engine crashes when plan handles reference
RESTORING databases on passive mirror servers.

Now pre-builds a temp table of ONLINE, accessible database IDs
(filtered by state = 0 + HAS_DBACCESS) before the main query runs.
The staging INSERT joins to this temp table instead of sys.databases,
preventing any DMV from being evaluated against RESTORING databases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When sys.master_files LEFT JOIN misses (NULL file_name), fall back to
DB_{database_id} and File_{file_id} instead of generic 'Unknown'.
Chart labels now show e.g. 'MyDatabase.File_2' instead of
'MyDatabase.Unknown'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 9c2a77f into dev Mar 19, 2026
erikdarlingdata added a commit that referenced this pull request Mar 19, 2026
…own-labels-633"

This reverts commit 9c2a77f, reversing
changes made to eb3e4c2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant