Created
November 7, 2019 23:27
-
-
Save rhymeswithmogul/b5b9a7f65f9530a96d3fb6f135c8cbfc to your computer and use it in GitHub Desktop.
Disable auto-close on all MSSQL databases in an instance (useful for backup software)
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
--You will get errors about master and tempdb; this is normal. | |
EXEC sp_MSforeachdb 'ALTER DATABASE [?] SET AUTO_CLOSE OFF WITH NO WAIT' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment