Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got so error:

Database 'MyDb' is being recovered. Waiting until recovery is finished.

I have had a critical operation at that time.

What is the cause of this situation? And how can it be avoided?

share|improve this question
up vote 17 down vote accepted

Crash recovery is running on 'MyDb'. Possible causes:

  • The SQL Server service was restarted manually, due to a crash or a server stop/start.
  • A severe error in the database caused the database to be shut down and recovered.
  • Recovery was initiated deliberately by someone executing a RESTORE WITH RECOVERY.
  • The Auto-Close option is set, causing the database to shut down when the last user exits and run recovery to restart when the next connects.

If recovery is taking a long time to complete and there doesn't appear to be any activity you may need to restore from backups. If you're feeling brave you should start reading everything you can find about repairing/recovering suspect databases.

More information on what happened before the database ended up in this state would make for better answers e.g. what actions you carried out, what errors are in the SQL error log etc.

share|improve this answer
+1 it seems auto-close option. thank you for answer – garik Dec 12 '11 at 12:50
You'll definitely want to turn auto close off, for good, everywhere. – Mark Storey-Smith Dec 12 '11 at 13:27
+1 for Auto-Close – Oct 24 '12 at 5:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.