How to check whether CDC is enabled or disable in Table or Databases

Hi,
CDC (Change Data Capture) is used to record the changes that takes place in Tables or in Databases. By default CDC will be in disabled mode. We know we can use triggers to notify the changes in the tables, but triggers always degrade the performance of your databases. So in SQL Server 2008 Microsoft had introduced CDC Concept to capture the DML commands in table and databases. Below code checks whether CDC is enabled or not

Check whether CDC enabled for  Databases
Check whether CDC enabled for Tables

SELECT [name], is_cdc_enabled FROM sys.databases      
GO
 
USE DataBaseName
GO
SELECT [name]is_tracked_by_cdc 
FROM sys.tables
GO
 

note:  if  ‘is_tracked_by_cdc’ column is 1 than cdc is enabled else disabled.
note:  if  ‘is_tracked_by_cdc’ column is 1 than cdc is enabled else disabled