Please try the solution provided on this artcile.
Hope this helps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am new to Azure SQL, moving over after years of working with OnPrem SQL Server. The issue relates to switching on Change Data Capture.
I am using SSMS v18.11.1 logged in with my AD account, also tried with our Azure AD SQL admin account
Connect to the target database and run these commands.
SELECT user_name() -- sanity checked result is rolemember of 'db_owner' role (see error).
SELECT is_cdc_enabled FROM sys.databases WHERE name = '<MyDatabase>' -- returns 0
-- troubles begin
EXEC sys.sp_cdc_enable_db
Msg 22830, Level 16, State 1, Procedure sys.sp_cdc_enable_db_internal, Line 228 [Batch Start Line 0]
Could not update the metadata that indicates database <MyDatabase> is enabled for Change Data Capture. The failure occurred when executing the command 'SetCDCTracked(Value = 1)'. The error returned was 916: 'The server principal "dbo." is not able to access the database "<MyDatabase>" under the current security context.'. Use the action and error to determine the cause of the failure and resubmit the request.
Any help would be greatly appreciated.
Please try the solution provided on this artcile.
Hope this helps.