Last active
September 13, 2019 18:59
-
-
Save sayham-sjb/73edf0861e6c05824a83846d51ed1d76 to your computer and use it in GitHub Desktop.
Error Database already in use when trying to restore backup #sql
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
--Set offline and rollback | |
ALTER DATABASE {DBName} SET OFFLINE WITH ROLLBACK IMMEDIATE | |
--Then SET it online | |
ALTER DATABASE {DBName} SET ONLINE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment