1
votes

I'm looking to enable change data capture on a SQL Server Database.

Version: Microsoft SQL Azure (RTM) - 12.0.2000.8 Apr 9 2020 16:39:55 Copyright (C) 2019 Microsoft Corporation

Used below command to check if the CDC is enabled on the db and it returned '0'

SELECT is_cdc_enabled FROM sys.databases WHERE name = 'XXXX';

Tried to enable the CDC at the database level by issuing below command ..

EXEC sys.sp_cdc_enable_db

It returned below error message Msg 22830, Level 16, State 1, Procedure sys.sp_cdc_enable_db_internal, Line 198 [Batch Start Line 4] Could not update the metadata that indicates database XXXX is enabled for Change Data Capture. The failure occurred when executing the command 'SetCDCTracked(Value = 1)'. The error returned was 22845: 'Cannot enable change data capture in this edition of SQL Server.'. Use the action and error to determine the cause of the failure and resubmit the request.

Now my question is- do I need admin privileges to enabled CDC or is this feature not available with Azure SQL server version? Thanks for reading and your help is appreciated.

1
docs.microsoft.com/en-us/azure/sql-database/… CDC is only supported on "Managed instances and instance pools" according to that link - Mitch Wheat
Hi Mohan, If the answer is helpful for you, you can mark it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you. - Leon Yue

1 Answers

2
votes

Please reference this document: Enable and Disable Change Data Capture (SQL Server)

enter image description here

The feature only support Azure SQL managed instance. For Azure SQL database, wen can not Enable and Disable Change Data Capture.

Hope this helps.