SQL SERVER – Source Database in Restoring State

A Source Database in Restoring State can follow a tail-log backup WITH NORECOVERY. A customer encountered this while restoring another copy.

A usable cabinet copy stands beside a protected original and a separate recovery key.

Review generated commands and the wizard tail-log options. NORECOVERY deliberately protects certain recovery workflows by leaving the source unavailable. Selecting a source alone does not cause that behavior. I previously reversed the checkbox advice.

SELECT name,state_desc,recovery_model_desc FROM sys.databases WHERE name=N'YourSourceDatabase';
-- Only after confirming no further backup restores are intended:
-- RESTORE DATABASE [YourSourceDatabase] WITH RECOVERY;

WITH RECOVERY completes the current sequence when no more restores are required and that outcome is intended. Confirm the objective first. It is not a harmless universal fix for RESTORING.

Check mirroring, log shipping, availability groups and ongoing restore chains. The state can be expected. Keep source, destination and file paths explicit to avoid changing the wrong database.

Reference: SSMS tail-log and source-state options.

Related reading

RESTORING is not always an error state, it is a state to interpret within the intended recovery or replication workflow.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Backup and Restore, SQL Scripts, SQL Server, SQL Server Management Studio
Previous Post
Read-Only Routing for Availability Group Replicas
Next Post
Unix Timestamp in SQL Server: Converting Seconds and Milliseconds Both Ways

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.