Fix FinOps Enterprise feature detection: query all databases, filter to TDE only#782
Merged
erikdarlingdata merged 1 commit intodevfrom Apr 2, 2026
Merged
Conversation
…to TDE only sys.dm_db_persisted_sku_features is database-scoped on all versions (database_id column was never added). Previous code queried only the connected database (master for Lite, PerformanceMonitor for Dashboard), missing features in user databases. Fixed by querying across all online user databases with dynamic SQL. Also filtered to TransparentDataEncryption only — Compression, Partitioning, and ColumnStoreIndex are available in Standard Edition since SQL Server 2016 SP1, so they are not downgrade blockers. Addresses #780 Co-Authored-By: Claude Opus 4.6 (1M context) <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
sys.dm_db_persisted_sku_featuresis database-scoped on all versions (database_idcolumn was never added despite PR Release v2.5.0: version bumps, bug fixes, changelog #766's assumption). Previous code only queried the connected database, missing enterprise features in user databases.QUOTENAMEandCOLLATE DATABASE_DEFAULTfor safety.Addresses #780
Test plan
🤖 Generated with Claude Code