Wednesday, May 16, 2012

SQL server Mirrored database is in Recovery

Database is in Recovery


Problem:  
My database is in recovery. Other DBA tried to restart the SQL server Services. There was no way to bring it online. Database mirror was set for the database.



Solution:

  • Turn off the partner (If you can’t do it on the principle, Do it on the mirrored)
   alter database mta_acctfiles  set partner off

  • Restore the DB with Recovery (Sometime I noticed you don’t even have to do this)
        restore database mta_acctfiles  with recovery;   

Warning: Please note that database mirror will break during this process. you have to reset the mirror.