Mohan Koneru
Mohan Koneru

Reputation: 31

Need help to enable Change Data Capture (CDC) on SQL Server

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.

Upvotes: 2

Views: 4282

Answers (2)

Swapnil
Swapnil

Reputation: 41

CDC is now Available for Azure SQL Databases SQL CDC Microsoft

Upvotes: 1

Leon Yue
Leon Yue

Reputation: 16431

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.

Upvotes: 2

Related Questions