The steps in the recovery plan are defined by the database administrator to recover SQL Server databases in an emergency situation or if they believe the databases have been compromised. These steps first begin with bringing the server into EMERGENCY mode, reading data from it using statements like SELECT statements and executing DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS command on it.
ALTER DATABASE DBNAME
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CHECKDB (DBNAME, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DBNAME SET MULTI_USER
Now refresh the database and it will be back online.
The simplest way to revert a SQL database back to normal mode is to restore it from the latest available backup. In case, if no valid backup exists then the next option is to repair it online by re-copying the data pages and removing dangling objects. If there are no options left and you are still in a dire need of data from that corrupt database, then Stellar Repair for MS SQL software is highly recommended. It uses advanced recovery algorithms for optimum range of corruption ranges, fixes all detected errors, recovers deleted SQL Server data and table rows from FAT/FAT32/NTFS volumes under minimal downtime, making it possible to access almost all the SQL data lost due to index corruption. If your database is stuck in the EMERGENCY state due to errors like DBCC CHECKDB IN EMERGENCY MODE or OPENROWSET with SINGLE_PAGE_ALLOCATION failed when it should have been in ONLINE state, use Stellar Repair for MS SQL utility to recover your corrupt DB without taking any downtime.
Comments
Post a Comment