2

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.

Mohan Koneru
  • 31
  • 1
  • 4
  • 2
    https://learn.microsoft.com/en-us/azure/sql-database/sql-database-features CDC is only supported on "Managed instances and instance pools" according to that link – Mitch Wheat May 26 '20 at 03:11
  • 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 May 27 '20 at 08:43

2 Answers2

2

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.

Dale K
  • 25,246
  • 15
  • 42
  • 71
Leon Yue
  • 15,693
  • 1
  • 11
  • 23
  • isn't that what I said in the comment above? – Mitch Wheat May 26 '20 at 07:16
  • This screenshot of the page that you've supplied is different from that of the current page on that website. The current page is not as clear as it doesn't say "Managed Instance only", it just says managed instance. I wish Microsoft would be more explicit, like it was in the past. This answer helped me a lot, thanks! – Newteq Developer Mar 03 '21 at 11:34
0

CDC is now Available for Azure SQL Databases SQL CDC Microsoft

Swapnil
  • 31
  • 7
  • Yes, Change data capture (CDC) can be enabled on Azure SQL database as well, on >= S3 (Standard) tier or vCore equivalent. https://techcommunity.microsoft.com/t5/azure-sql-blog/announcing-general-availability-of-change-data-capture-cdc-on/ba-p/3284280 – Abhiman Tiwari Sep 13 '22 at 19:58