Removing Databases in Suspect or Recovery Mode

Here are a few SQL commands that you can use if you simply want to delete a database that is in “Recovering” or “Suspect” mode. You may find yourself self needing to delete the database when rebuilding log-shipping on the primary server and the secondary database failed applying the log files, which then leaves the database in a recovering state. I sometimes will just remove the log-shipping for that database on the primary, which cleans up all the agent jobs on both the primary and secondary servers but leaves the database in this state. Here are the commands:

Views – 2605

Leave a Reply