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

Today, after a power failure, one database (with Recovery: full) shows "In Recovery" in SSMS. So:

myDatabase (In recovery) (database status: recovery, Shutdown)

After finish, the "recovery process" the database shows the name myDatabase without "(In recovery)". I thought that the problem was solved, but it was not.

When I started the application that uses that database, the extra text "(In recovery)" appears again next to the name of my database.

I waited until the "recovery process" finished and then I took the database offline and brought it back online.

I restarted the server, restarted the computer and when my application was running the extra text appears again. In the SQL Server logs the message "Starting up database 'myDatabase'" appears few times. It seems that the database is working because I can insert data, but the state is showing that something it happens.

To add some more details, when I run this query:

SELECT databasepropertyex('nyDatabase', 'STATUS')

It shows Recovering, online, suspect and the back to online and then Recovering and so on.

My solution
After some time, I found the problem and the property AutoClose was "True" (AutoClose = True). The solution was to set it to AutoClose = False.

Is this the only thing that can cause this problem / was this in fact my problem? Was setting AutoClose to false an appropriate action?

share|improve this question

migrated from Jan 21 '12 at 20:19

This question came from our site for professional and enthusiast programmers.

have you tried running dbcc checkdb while the database says it's online? – DForck42 Feb 18 '11 at 20:05

I am not sure if this would help solve the issue, but you can give it a shot. Run -


See if the above brings the database out of recovering mode. If it doesn't then the problem may be something else.

Can you try the below command and see if the database is corrupt?


If it detects corruption, then you might want to repair the database using DBCC CHECKDB

share|improve this answer
RESTORE DATABASE YourDatabase WITH RECOVERY worked for me <3 – greg121 Jul 26 at 12:53

Whenever you bring a database online, it goes through a recovery process. I'm a bit confused by your phrasing of the problem though. Are you seeing the database go into recovery any time other than when the database is being brought offline (either from your original power failure or by your having brought it offline and then online again)? If so, the database is going offline for some other reason. Best to check the SQL server logs to see what's going on.

share|improve this answer
The database goes to In recovery when the application is working. The server log is not showing nothing interesting. The only abnormal thing is that I have 30 entries with a legend "Starting up database 'myDatabase'" – Andres Feb 18 '11 at 19:25
I'd say it's time to check the Windows event log for something like a disk failure then. The database should not be going starting up and going into recovery during normal operations. – Ben Thul Feb 18 '11 at 19:55
I've installed a new instance of sql server and put the old database "myDatabase" version on it and the problem still happens. – Andres Feb 18 '11 at 21:30
I know that when the server starts put every database in recovery (set recovery point) until Ready. But in my case, the database goes to online up to start the application that use it. After that the database is "myDatabase (In recovery)" (database->properties-Status:Recovering, Shutdown). If I close the application, the database goes to Status: Normal. This is driving me crazy. – Andres Feb 19 '11 at 6:05
See the update in my question. I found the solution. – Andres Jan 31 '14 at 15:36

protected by Paul White May 12 '14 at 7:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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