简体   繁体   中英

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.

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

在此处输入图像描述

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

Hope this helps.

CDC is now Available for Azure SQL Databases SQL CDC 微软

I can't enable in my database. Does it have something to do with the Tier that is Standard? Gives this error: The database 'DataBaseFoo' is not enabled for Change Data Capture. Ensure that the correct database context is set and retry the operation. To report on the databases enabled for Change Data Capture, query the is_cdc_enabled column in the sys.databases catalog view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM