-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix sys.database_service_objectives example query #10217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The example query doesn't return the correct information for the master database due to DB_ID() returning a different value for the database_id than sys.databases.
|
@DavidWiseman : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit a752319: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? Due to the upcoming conference, all merging and publishing is on hold until the morning of November 18, 2025. Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
WilliamDAssafMSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, @DavidWiseman. This new sample query is an improvement.
We're frozen right now for Microsoft Ignite, this will likely get merged next week with some additional changes.
| FROM sys.database_service_objectives AS slo | ||
| WHERE slo.database_id = DB_ID(); | ||
| JOIN sys.databases d ON slo.database_id = d.database_id | ||
| WHERE d.name = DB_NAME(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
|
This commit has been merged in an internal PR |
The example query doesn't return the correct information for the master database due to DB_ID() returning a different value for the database_id than sys.databases.
Also improved the example by adding elastic_pool_name to the query.