DBA

The operation cannot be performed on a database with database snapshots or active DBCC replicas

Advertisements

Background of the issue. There is a script stored procedure for both backup and restore is running on one of the server.

I have got this from one of our customer. I have checked the restore and looks like there was a database snapshot been created that was a part of backup stored procedure.

Msg 5094, Level 16, State 2, Line 1
The operation cannot be performed on a database with database snapshots or active DBCC replicas.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Solution:

Drop the database snapshot and restore the database.

Drop database <Snapshot DB Name>

T-SQL to find the database snapshot details:

SELECT * 
FROM sys.databases
WHERE source_database_id IS NOT NULL

 

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

Leave a Reply

%d bloggers like this: