Little SQL Server Tricks: Fix a Database Stuck in Restoring Mode

A few weeks back we had a database that was stuck in restoring mode, even if we did not try to restore that specific database:

The database is stuck in restoring mode.

That state did not change with a restart of SQL Server Management Studio, the database server itself or the whole operating system – we were stuck in the restoring mode.

Should you run into such a problem, then open a query window for the master database and enter this command (replace DB_NAME with the name of your database that is stuck):

RESTORE DATABASE DB_NAME WITH RECOVERY

After that the database should be back to normal and you can access it through the SQL Server Management Studio.