From the course: SQL Server 2022 Administration
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Understand change data capture - SQL Server Tutorial
From the course: SQL Server 2022 Administration
Understand change data capture
So change data capture is a feature in SQL Server that allows you to capture when data changes in your database. So anytime DML statements are run that cause changes, you can track and capture that information to see what's changing and how and possibly use that for recovery. So I'm going to show you how to enable change data tracking, and we're going to do a simple example of how to look at some capture history. So in our HR database, we have an email_list table that we're going to enable change data capture on, and we're going to see how that all lets us see what's going on with the changes. So Step 1 is you have to enable change data capture on the database. Now, there are a bunch of change data capture procedures and you can look these up in books online. You can also see them if you use IntelliSense. So if I type sys.sp_cdc, you can see all the different cdc procedures you can use for helping jobs, starting jobs, scanning, drops, cleanups, all kinds of stuff because you can do a…