Created
August 10, 2022 15:41
-
-
Save mabutler/ac0726685e95c6d3da907251092a7b20 to your computer and use it in GitHub Desktop.
Rename locked MS SQL database
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
| alter database "Standalone" | |
| set single_user with rollback immediate | |
| go | |
| alter database "Standalone" modify name = "Standalone-suffix" | |
| go | |
| alter database "Standalone-suffix" | |
| Set multi_user with rollback immediate | |
| go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment