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 3898 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

Creating Dynamic DNS in Network Environments

0 643 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader teaches how to create Dynamic DNS zones in Network Environments. Video Transcription: Now that we’ve installed DNS, we’ve created our DNS zones, the next step is now, how do we produce those … Continue reading Creating Dynamic DNS in Network Environments

Cable Testers and How to Use them in Network Environments

0 727 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

Write a Comment

Share your thoughts...

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