Created
May 8, 2024 10:05
-
-
Save ghotz/b605e46c572eba3dc44dfb8beda72961 to your computer and use it in GitHub Desktop.
Evaluate and standardize page verify
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
SELECT | |
[name] AS database_name, page_verify_option_desc | |
, CASE | |
WHEN page_verify_option_desc = N'CHECKSUM' | |
THEN NULL | |
ELSE 'ALTER DATABASE [' + [name] + ']' | |
+ ' SET PAGE_VERIFY CHECKSUM;' | |
END AS alter_command | |
FROM sys.databases | |
WHERE [name] NOT IN ('master','model','msdb','tempdb') | |
AND state_desc = 'ONLINE' | |
ORDER BY [name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment