When trying to restore the database with snapshots got the following error SQL message
SQL Server T-SQL Command
restore database PRD_Accounts from disk ='H:\PRD_Accounts_backup_daily.bak' with replace, stats |
Error:
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.
Resolution
Since we cannot restore a database if we have any snapshots.
Please drop all snapshots and try database restore again.
1. To check the database snapshot and it’s source database
select database_id, name,source_database_id,Source_DBName=DB_NAME(source_database_id) |
2. Drop the Snapshot database
DROP DATABASE Accounts_Rpt |
3. Create script of snapshot database, before dropping it. If at all we need to re-establish the snapshot after restore we can use it
USE master /****** Object: Database [Benefits_Rpt_sol48u] Script Date: 12/03/2012 00:01:02 ******/ |
1 comment:
Database operations and management software can really help to maintain voluminous data and groundbreaking solutions.
SQL Server Load Soap API
Post a Comment