0

I am trying to enable CDC on SQL Server by running the command EXEC sys.sp_cdc_enable_db but I keep getting the message:

Could not update the metadata that indicates database X is enabled for Change Data Capture. The failure occurred when executing the command 'create user cdc'.

The error returned was 15562: 'The module being executed is not trusted. Either the owner of the database of the module needs to be granted authenticate permission, or the module needs to be digitally signed.'. Use the action and error to determine the cause of the failure and resubmit the request.

I've tried adding and removing sa as db_onwer; I've tried to create cdc user manually, but nothing works.

What else could I try?

  • Maybe a database owner issue. This might help: https://stackoverflow.com/questions/20441785/could-not-update-the-metadata-that-indicates-database-x-is-enabled-for-change-da – Dan Guzman Apr 06 '23 at 21:05

1 Answers1

1

I had the same issue. I found it was related to a database trigger we had on the DB. Disabled the trigger and it worked. Was tipped off by comments here:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/31e1c9c4-a15d-4f38-ab59-2bb0851e7d63/unable-to-enable-a-database-for-cdc?forum=sqlreplication

JMuhley
  • 11
  • 2