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

A Simple Introduction to Cisco CML2

0 3640 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Cable Testers and How to Use them in Network Environments

0 645 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Configuring Windows Mobility Center and How to Turn it On and Off

1 1402 1

Video transcription Steve Fullmer: In our Windows training courses, we often share information about the Windows 8.1 Mobility Center. Mobility Center was introduced for mobile and laptop devices in Windows 7. It’s present and somewhat enhanced in Windows 8. Since we don’t have mobile devices in our classrooms, I decided to take a little bit … Continue reading Configuring Windows Mobility Center and How to Turn it On and Off

Write a Comment

Share your thoughts...

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