Created
May 13, 2022 16:18
-
-
Save Otterpohl/dc8ddffa4e5e0cd76523ba014d51824b to your computer and use it in GitHub Desktop.
Set AutoShrink to disabled for all databases where it is enabled
This file contains 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 'ALTER DATABASE ' + QUOTENAME(name) + ' SET AUTO_SHRINK OFF WITH NO_WAIT;' AS [To Execute] | |
FROM sys.databases | |
WHERE is_auto_shrink_on = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment