SQLServerCentral Article

Restore a Database with CDC Enabled

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

Rate

4 (4)

You rated this post out of 5. Change rating

Share

Share

Rate

4 (4)

You rated this post out of 5. Change rating