
{"id":10201,"date":"2022-11-30T20:37:30","date_gmt":"2022-11-30T20:37:30","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/introduction-to-change-data-capture-cdc\/"},"modified":"2026-11-03T19:29:51","modified_gmt":"2026-11-03T19:29:51","slug":"introduction-to-change-data-capture-cdc","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/en-gb\/blogs\/introduction-to-change-data-capture-cdc\/","title":{"rendered":"Introduction to Change Data Capture (CDC)"},"content":{"rendered":"\n<p><strong>What is Change Data Capture (CDC)?<\/strong><\/p>\n\n<pre><code>Change data capture (CDC) uses SQL Server agent to capture DML activities like deleting, updating, and inserting on a table.&nbsp;<\/code><\/pre>\n\n<p>These DML activities are captured in a table format in a relational database. In SQL server, CDC works similarly to SQL server transactional replication. It is commonly used for replicating data from databases to a data warehouse by syncing the database change logs rather than fetching data from tables.<\/p>\n\n<p>If a CDC is enabled for a table, any DML operation on that table is written to a transaction log. These changes are now captured by the CDC capture job from a transaction log file and written to different change data capture tables. Now different CDC functions access these tables to get change data.<\/p>\n\n<p>To learn more, you can <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/track-changes\/about-change-data-capture-sql-server?view=sql-server-ver16\">click here<\/a><\/p>\n\n<p>For a customer, CDC failed and gave the following error:<\/p>\n\n<pre><code>\nSELECT * FROM cdc.fn_cdc_get_net_changes_dbo_tablename(@from_lsn, @to_lsn, 'all')\n<\/code><\/pre>\n\n","protected":false},"excerpt":{"rendered":"<p>Introduction to Change Data Capture (CDC)<\/p>\n","protected":false},"author":2,"featured_media":10203,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26254","content_type":"blog","created_by":"10130","authored_on":"2023-11-17T02:07:29+05:30","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Ravi Agarwal, SQL Server Database Administrator, Rackspace Technology","seo_description":"Effortlessly replicate data with SQL Server's Change Data Capture (CDC), logging and syncing DML activities for streamlined access to organized data tables.","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_article_images\/26254-insights_image-general-processes-technical-blog-2-insights.jpg","field_partners":"","rxt_platforms":"Microsoft SQL","product":"","publisheddate":"2022-11-30T20:37:30","rxt_solutions":"Databases","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Change Data Capture in Databases| Rackspace Technology","field_topics":"","field_slug":"introduction-to-change-data-capture-cdc","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-10201","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/10201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/comments?post=10201"}],"version-history":[{"count":8,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/10201\/revisions"}],"predecessor-version":[{"id":10222,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/10201\/revisions\/10222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media\/10203"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media?parent=10201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/categories?post=10201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/tags?post=10201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}