Created
May 31, 2021 17:24
-
-
Save dario61081/a7a1c77013f0444ad7eb9b2481909447 to your computer and use it in GitHub Desktop.
mssql: Recovery database in suspect mode
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
USE master | |
GO | |
ALTER DATABASE milleniumfox SET EMERGENCY | |
GO | |
DBCC CHECKDB (milleniumfox ) | |
GO | |
ALTER DATABASE milleniumfox SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
GO | |
DBCC CHECKDB (milleniumfox, REPAIR_ALLOW_DATA_LOSS) | |
GO | |
ALTER DATABASE milleniumfox SET MULTI_USER | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script to recover ddbb in suspect mode, execute in a new query with the ddbb in offline mode