HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlCritical

SQL server databases stuck in restoring state

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
databasessqlstuckrestoringstateserver

Problem

I have a Sharepoint server. We had an issue with our backup tool and now some of my databases are stuck in restoring state!

Is it possible to stop the restoring process? and also, How can I make sure the database integrity has not been compromised?

Solution

This is likely caused by the restore script adding the WITH NORECOVERY parameter, to make the database ready for a transaction log apply after the restore.

The database is now waiting for the latest transaction log file.

You can either:

  • Apply the latest transaction log, using RESTORE LOG database_name FROM backup_device WITH RECOVERY; ... or



  • Restore the database again, but this time using ... WITH RECOVERY; ... or



  • Force the database out of restoring mode by executing: RESTORE DATABASE YourDb WITH RECOVERY;



Before you do this, please make sure you understand the implications of these options. You may cause data loss if you are not careful.

See this for details:

  • http://technet.microsoft.com/en-us/library/ms177446.aspx



  • https://stackoverflow.com/questions/520967/sql-server-database-stuck-in-restoring-state

Context

StackExchange Database Administrators Q#56169, answer score: 147

Revisions (0)

No revisions yet.