Skip to content

Conversation

@chadbaldwin
Copy link
Contributor

@chadbaldwin chadbaldwin commented Oct 23, 2025

DB_ID() does not support quoted database identifiers (ex: DB_ID('[master]')), it will return NULL. Pass the database name in as a string variable instead.

Discovered this bug in sp_BlitzIndex when running via @Mode = 3 (missing indexes). This bug was causing all of the *_with_data_type columns to return NULL.

Confirmed behavior is true on 2017+ linux docker containers (all I have access to at the moment).

(Ignore the Start-SQLServer command, that's my own thing)
image

Copy link
Member

@BrentOzar BrentOzar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! Looks good, merging into the dev branch, will be in the next release with credit to you in the release notes.

@BrentOzar BrentOzar added this to the 2025-12 Release milestone Nov 1, 2025
@BrentOzar BrentOzar merged commit 51b582d into BrentOzarULTD:dev Nov 1, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants