Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

While executing a shrink on a 25GB database, the electricity has gone down, and I can't access my database. It shows as "In Recovery".

How can I recover it?

share|improve this question
1  
Wait for the database server to finish rolling forward and back the committed and uncommitted transactions, respectively. –  user3914 Jun 3 '12 at 4:19
2  
What is the current status of the database? Have a look in sys.databases, not the UI. There's a possibility you've run out of space on the data drive. You need to make space for the recovery to finish. –  user3914 Jun 3 '12 at 4:26
3  
BTW, 25GB is not very huge. It's not even large. –  Mitch Wheat Jun 3 '12 at 4:29
3  
Yes, "In Recovery" means this - the server is working on getting it back online. Alternative - well - kill the db, apply the backup you took RIGHT BEFORE DOING THE SHRINK. You DID take a backup before suck a heavy operation, or? ;) –  TomTom Jun 3 '12 at 6:03
9  
Real Men don't need no backups or appropriately sized uninterruptable power supplies. We can rewrite inode tables with a piece of magnetite and an old sewing needle. ;^) –  Fiasco Labs Jun 3 '12 at 7:47

1 Answer 1

Look into the sql server logs to see how much percent has been recovered. Find any errors in sql server logs as well as eventviewer.

If the situation does not improves in sometime, you may need to take the db into emergency mode to see what actually happened.

share|improve this answer

Your Answer

 
discard

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.