I was running insertion query on SQL Server database to insert the employee’s details but suddenly the database got crashed. To recover it I run DBCC CHECKDB command but the command generates consistency error and gets fail to recover SQL database. Then I restore it from good backup which I had kept for disaster recovery and I can’t believe that suddenly SQL Error 3413 arise which states :-
Error: 3414, Severity: 21, State: 1.
An error occurred during recovery, preventing the database 'xxx' (database ID 13) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
If you got fail to recover SQL database from a backup, then must try below two options: • Use the emergency repair method provided by DBCC CHECDB • Try to copy out as much as is possible to another database The first method is probably your best bet to get the database online and accessible. However, you must realize that transactional consistency cannot be guaranteed since recovery failed. There is no way to know what transactions should have been rolled back or rolled forward but were not allowed because of the recovery failure If this method does not work and you want to try and copy data to another database, the only way to get access to the database is to first put the database in emergency mode by using the ALTER DATABASE <dbname> SET EMERGENCY command