March 20, 2025 at 6:40 pm
Server and db in SQL SERVER 2019.
I have multiple tables that are enabled for CDC , however starting in the last two weeks I started getting this error
Msg 22832, Level 16, State 1, Procedure sys.sp_cdc_enable_table_internal, Line 673 [Batch Start Line 6]
Could not update the metadata that indicates table [DBO].[XXXX] is enabled for Change Data Capture. The failure occurred when executing the command 'sp_cdc_create_change_table'. The error returned was 916: 'The server principal "S-1-9-3-998069875-1089635534-742465168-2300348230" is not able to access the database "XXXX" under the current security context.'. Use the action and error to determine the cause of the failure and resubmit the request.
So the database it is referring to is not the database I enabling the CDC table for. It is a different database. I have verified that the servername hasn't change and that the owner of both databases are the same.
I have tried creating the capture and clean jobs manually and that doesn't fix the problem either. I am at a loss on how to fix this.
this is how I am enabling
EXEC sys.sp_cdc_enable_table
@source_schema = 'DBO',
@source_name = 'XXXXX',
@role_name = NULL,
@supports_net_changes = 1
March 21, 2025 at 7:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
March 23, 2025 at 9:54 am
More than likely you have a DML DDL trigger enabled somewhere, that needs to be modified or disabled while you run any CDC enable/disable operation, as CDC tasks execute as a different user which won’t have any mappings to where you’re auditing too
March 23, 2025 at 9:55 am
More than likely you have a DML DDL trigger enabled somewhere, that needs to be modified or disabled while you run any CDC enable/disable operation, as CDC tasks execute as a different user which won’t have any mappings to where you’re auditing too
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy