question

Mohan Kumar avatar image
Mohan Kumar asked

CDC disable issue

Hi We enabled CDC on our database. Some additional columns were to be added. Hence I was trying to disable CDC for myTable. But the following error is thrown. Kindly suggest. EXECUTE sys.sp_cdc_disable_table @source_schema = N'dbo', @source_name = N'myTable', @capture_instance = N'dbo_myTable'; GO Msg 22833, Level 16, State 1, Procedure sp_cdc_disable_table_internal, Line 224 Could not update the metadata that indicates table [dbo].[myTable] is not enabled for Change Data Capture. The failure occurred when executing the command 'sp_cdc_disable_table_instance'. The error returned was 22837: 'Could not delete table entries or drop objects associated with capture instance 'dbo_myTable'. The failure occurred when executing the command 'sp_cdc_drop_change_table_objects dbo_myTable'. The error returned was 916: 'The server principal "S-1-9-3-2500714254-1143476392-1368588216-3953615480." is not able to access the database "MyDB2" under the current security context.'. Use the action and error to determine the cause of the failure and resubmit the request.'. Use the action and error to determine the cause of the failure and resubmit the request. Msg 266, Level 16, State 2, Procedure sp_cdc_disable_table_internal, Line 0 Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1. Msg 3930, Level 16, State 1, Procedure sp_cdc_disable_table, Line 41 The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction. Msg 266, Level 16, State 2, Procedure sp_cdc_disable_table, Line 0 Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1. Msg 3998, Level 16, State 1, Line 1 Uncommittable transaction is detected at the end of the batch. The transaction is rolled back.
auditchange-data-capture
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Pavel Pawlowski avatar image
Pavel Pawlowski answered
From the Error message, especially > The error returned was 916: 'The > server principal > "S-1-9-3-2500714254-1143476392-1368588216-3953615480." > is not able to access the database > "MyDB2" under the current security > context.'.context.'. it seems like not enough rights problem.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.