Which Databases and Tables Did You CDC-Enable?
Which Databases and Tables Did You CDC-Enable?
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
You May Also Like
CDC, CDC-enabled, Change Data Capture, is_cdc_enabled, is_tracked_by_cdc, sys.databases, sys.Tables
Agile Methodology in Project Management
0 162 0In 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
JavaScript for C# Developers – September 24, 2014
0 491 3Is JavaScript worth taking the time to learn if I’m a server-side .NET developer? How much of C# carries over to JavaScript? In this recorded video from Dan Wahlin’s webinar on September 24,2014, Dan answers these questions and more while also discussing similarities between the languages, key differences, and the future of JavaScript (ES6). If … Continue reading JavaScript for C# Developers – September 24, 2014
Detailed Forensic Investigation of Malware Infections – April 21, 2015
4 647 5How does an investigator hunt down and identify unknown malware? In this recording of our IT Security training webinar on April 21, 2015, Security expert Mike Danseglio (CISSP / CEH) performed several malware investigations on infected computers and identify symptoms, find root cause, and follow the leads to determine what’s happening. He demonstrated his preferred … Continue reading Detailed Forensic Investigation of Malware Infections – April 21, 2015