SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Restore a Database with CDC Enabled

By Ganapathi varma Chekuri,

In this post, I’m going to talk about an issue that I found while restoring a backup of a Change Data Capture (CDC) enabled database to different SQL Server instance. You may receive the below warning message that includes information about the cause of the warning, which can help you to resolve the issue.

Could not update the metadata that indicates database is enabled for Change Data Capture. The failure occurred when executing the command “.sys.sp_replhelp N’DisablePerDbHistoryCache”. The error returned was 3930

In the below screenshot, the error says CDCTEST database restore failed, and it is not enabled for CDC.

Resolution

CDC is a feature available in and above SQL Server 2008 enterprise edition and helps to audit/change tracking of database changes like inserts, updates, and deletes on a table.

Restore database CDCTEST
 from disk='C:\CDCTEST.bak'
 WITH KEEP_CDC

In below screenshot, restoring CDC enabled database backup adding “Keep_cdc” to restore statement and database is restored successfully.

Ganapathi varma Chekuri

Lead SQL DBA, MCP

Email: gana20m@gmail.com

Linkedin

 
Total article views: 620 | Views in the last 30 days: 5
 
Related Articles
FORUM

restoring change logs

restoring change logs

FORUM

How to change table owner when restoring database?

Changing table owner during restoring database

ARTICLE

Enabling TDE on Databases in an AlwaysOn Scenario

Enabling Transparent Data Encryption on Databases in Always On Scenario

FORUM

How to change database status is that stays..... "restoring"

Database Status is Restoring

FORUM

restore database

restore database

 
Contribute