views:

194

answers:

1

I'm having a serious problem with one of my production databases.

The database was enabled for change data capture which was performing quite well. Last month we had a server meltdown where several disks were affected and data was lost. We then recoverd the database backups from tapes and restored them on the freshly installed database server.

The problem which I'm facing now is as follows:

  • the sys.database states that my database is not enabled for cdc
  • the database contains the cdc schema, user, tables, sp & functions
  • the sys.sp_cdc_enable_db throws an error stating the the schema & user 'cdc' are already existing so it can not create them and enabled the database for cdc
  • the sys.sp_cdc_disable_db will not delete the cdc leftovers since it belives the the database is not enabled for cdc
  • the cdc leftovers can not be deleted manualy since they are all system stored procedures & functions

So now I'm stuck with a database which can't be enabled for cdc since it already has all of the cdc components created, and cdc can't be disabled since it's not signaled in the sys.database that cdc is enabled.

Is there any solution for my issues, execpt creating a new database and migrating all of the object (except cdc) & data to the newley created database?

A: 

simpleverse,

Does the Microsoft Knowledge Base article 966306 help?

Steve Kass
We have tried the solution in the hot fix, but with no luck. The solution provided here will allow for you to disable the cdc from a database that has cdc enabled but is missing tables.