How to check if Change Data Capture (CDC) is enabled on a SQL Server Database

Change Data Capture (CDC) feature was introduced in SQL Server 2008, and is used to get the historical change information for a user table.

To list all SQL Server databases that have Change Data Capture (CDC) enabled, use the following query:

SELECT name, database_id, is_cdc_enabled FROM sys.databases
WHERE is_cdc_enabled = 1

list_databases_CDC_enabled

You will get one row for each database that has Change Data Capture (CDC) enabled.

To check if a database has Change Data Capture (CDC) enabled, use the following query:

SELECT name, database_id, is_cdc_enabled FROM sys.databases
WHERE is_cdc_enabled = 1 AND name = 'DB_Name'

database_CDC_enabled

If the database has Change Data Capture (CDC) enabled you will get one row as the result.

If the post helped you, please share it:
Pin It

1 comment to How to check if Change Data Capture (CDC) is enabled on a SQL Server Database

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">