Created
October 21, 2015 12:50
-
-
Save MarshalOfficial/86375cc5d5decc968664 to your computer and use it in GitHub Desktop.
recover suspect database (warning:don't run all lines in one batch script)
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
| EXEC sp_resetstatus 'test_dr'; | |
| ALTER DATABASE test_dr SET EMERGENCY | |
| DBCC checkdb('test_dr') | |
| ALTER DATABASE test_dr SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
| DBCC CheckDB ('test_dr', REPAIR_ALLOW_DATA_LOSS) | |
| ALTER DATABASE test_dr SET MULTI_USER | |
| DBCC CheckDB ('test_dr') | |
| ALTER DATABASE test_dr SET Online |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment