Which Databases and Tables Did You CDC-Enable?

Home > Blogs > SQL Server > Which Databases and Tables Did You CDC-Enable?

Which Databases and Tables Did You CDC-Enable?

Like This Blog 0 Peter Avila
Added by December 16, 2013

In the 10777 course on data warehouses, we see how to use an SQL Server technology called Change Data Capture. We see how CDC allows data changes made to a line-of-business database to be captured so that we can incrementally update a data warehouse by applying those captured changes to it. We also learn that, before CDC can be used, both the database and the individual tables where changes need to be tracked must be CDC-enabled.

And all that works very well. But, once CDC has been enabled, how do you find out what databases and tables are CDC-enabled? Simple. There are two system views we can use, sys.databases and sys.tables. Each of these views has a column that indicates whether or not a row in the view is CDC-enabled, though their names are not the same; one is called is_cdc_enabled and the other is is_tracked_by_cdc.

Use this query to find databases that are CDC-enabled:

     SELECT name
     FROM sys.databases
     WHERE  is_tracked_by_cdc =  1
     Go

Use this query to find tables that are CDC-enabled:

     USE –<a CDC-enabled database>
     Go

    SELECT name
    FROM sys.tables
    WHERE is_tracked_by_cdc =  1
    Go

Enjoy!
Peter Avila
SQL Server Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

Agile Methodology in Project Management

0 172 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

An Overview of Office 365 – Administration Portal and Admin Center

0 924 3

This is part 1 of our 5-part Office 365 free training course. In this Office 365 training video, instructor Spike Xavier introduces some of the most popular services found in Microsoft Office 365 including the Admin Portal and Admin Center. For instructor-led Office 365 training classes, see our course schedule: Spike Xavier SharePoint Instructor – … Continue reading An Overview of Office 365 – Administration Portal and Admin Center

Creating Users and Managing Passwords in Microsoft Office 365

0 752 4

In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365.   For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365    

Write a Comment

Share your thoughts...

Please fill out the comment form below to post a reply.