{"id":33030,"date":"2021-02-27T09:44:31","date_gmt":"2021-02-27T09:44:31","guid":{"rendered":"https:\/\/ittutorial.org\/?p=33030"},"modified":"2021-02-27T09:47:31","modified_gmt":"2021-02-27T09:47:31","slug":"data-warehouse-change-data-capture-cdc","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/data-warehouse-change-data-capture-cdc\/","title":{"rendered":"DATA WAREHOUSE \u2013 CHANGE DATA CAPTURE (CDC)"},"content":{"rendered":"<p><strong>CDC (Change Data Capture) <\/strong><\/p>\n<p>It can be called the process of defining and capturing changes made in the database. It is also referred to as a design pattern to identify and track changes in this type of database.<\/p>\n<p>Unlike traditional methods, it finds and updates changes in data instantaneously instead of batch processing. Differences between CDC and batch processing can be as follows.<\/p>\n<p><strong>CDC<\/strong><\/p>\n<p>&#8211; Updates the target database instantly.<\/p>\n<p>&#8211; Continuously monitors changes in the source database.<\/p>\n<p>&#8211; Uses the process flow to provide instant changes.<\/p>\n<p><strong>Batch Processing<\/strong><\/p>\n<p>&#8211; Data are not synchronized immediately.<\/p>\n<p>&#8211; Allocating resources to maintain synchronization slows production.<\/p>\n<p>&#8211; Replication process takes place during batch Windows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-33031 size-full\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/cdc.png\" alt=\"\" width=\"667\" height=\"188\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/cdc.png 667w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/cdc-300x85.png 300w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/p>\n<p>First state and last state information can be logged from modern databases. The current sysdate is printed in a field in the form of Update date.\u00a0 Triggers from the source database can be used to capture data with CDC changes.<\/p>\n<p>CDC can be used in two ways. It can be divided into asynchronous and asynchronous.<\/p>\n<p><strong>Synchronous Change Data Capture\u00a0<\/strong><\/p>\n<p>Represents the SYNC SOURCE source database. Triggers run after performing DML operations on source tables populate the SYNC_SOURCE change resource.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33034\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/src.png\" alt=\"\" width=\"477\" height=\"399\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/src.png 477w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/src-300x251.png 300w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Asynchronous\u00a0 HotLog\u00a0 Change Data Capture<\/strong><\/p>\n<p>HOTLOG_SOURCE represents online log files in the source database. It cannot be changed or deleted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33032\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/eszamanli.png\" alt=\"\" width=\"485\" height=\"401\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/eszamanli.png 485w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/eszamanli-300x248.png 300w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/p>\n<p>We can use the table below to query on source db.<\/p>\n<p><strong>\u00a0SELECT * FROM ALL_CHANGE_SOURCES.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33033\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/dw.png\" alt=\"\" width=\"1266\" height=\"355\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/dw.png 1266w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/dw-300x84.png 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/dw-1024x287.png 1024w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/dw-768x215.png 768w\" sizes=\"auto, (max-width: 1266px) 100vw, 1266px\" \/><\/p>\n<p>Asynchronous CDC has different methods. In summary, Oracle offers us as follows. The method can be used according to the need.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-33035\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/sync_async.png\" alt=\"\" width=\"746\" height=\"337\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/sync_async.png 746w, https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/sync_async-300x136.png 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Factors Influencing Choice of Change Data Capture Mode<\/strong><\/p>\n<table style=\"height: 1926px\" width=\"1177\">\n<tbody>\n<tr>\n<td width=\"151\"><strong>Mode<\/strong><\/td>\n<td width=\"151\"><strong>Location of, Hardware, and Software on Staging Database<\/strong><\/td>\n<td width=\"151\"><strong>Capture Mechanism<\/strong><\/td>\n<td width=\"151\"><strong>Source Database<\/strong><\/p>\n<p><strong>Performance Impact<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"151\">Synchronous<\/td>\n<td width=\"151\">Location must be the same as the source database and<\/p>\n<p>therefore hardware, operating system, and Oracle Database release are the same as source system.<\/td>\n<td width=\"151\">Change data is automatically committed as part of the same transaction it reflects.<\/td>\n<td width=\"151\">Adds overhead to source<\/p>\n<p>database transactions to<\/p>\n<p>perform change data capture.<\/td>\n<\/tr>\n<tr>\n<td width=\"151\">Asynchronous HotLog<\/td>\n<td width=\"151\">Location must be the same as the source database and therefore hardware, operating system, and Oracle Database release are the same as source system.<\/td>\n<td width=\"151\">Change data is captured from the current online redo log file. Change sets are populated automatically as new transactions are committed.<\/td>\n<td width=\"151\">Minimal impact on source<\/p>\n<p>database transactions to<\/p>\n<p>perform supplemental<\/p>\n<p>logging. Additional source<\/p>\n<p>database overhead to perform change data capture.<\/td>\n<\/tr>\n<tr>\n<td width=\"151\">Asynchronous Distributed HotLog<\/td>\n<td width=\"151\">Location is remote from the<\/p>\n<p>source database. Hardware,<\/p>\n<p>operating system, and Oracle database release can be different from the source system.<\/td>\n<td width=\"151\">Change data is captured from the current online redo log file. The change set is populated automatically as new committed transactions arrive on the staging database.<\/td>\n<td width=\"151\">Minimal impact on source<\/p>\n<p>database transactions to<\/p>\n<p>perform supplemental<\/p>\n<p>logging.<\/p>\n<p>&nbsp;<\/p>\n<p>Some overhead on the source database is incurred when mining the online redo log files.<\/td>\n<\/tr>\n<tr>\n<td width=\"151\">Asynchronous AutoLog<\/p>\n<p>Online<\/td>\n<td width=\"151\">Location is remote from the<\/p>\n<p>source database. Hardware,<\/p>\n<p>operating system, and Oracle database release are the same as source system.<\/td>\n<td width=\"151\">Change data is captured from the standby redo log files. The change set is populated automatically as new committed transactions arrive on the staging database.<\/td>\n<td width=\"151\">Minimal impact on source<\/p>\n<p>database transactions to<\/p>\n<p>perform supplemental<\/p>\n<p>logging.<\/p>\n<p>&nbsp;<\/p>\n<p>Minimal source database<\/p>\n<p>overhead for redo transport<\/p>\n<p>services.<\/td>\n<\/tr>\n<tr>\n<td width=\"151\">Asynchronous AutoLog<\/p>\n<p>Archive<\/td>\n<td width=\"151\">Location is remote from the<\/p>\n<p>source database. Hardware,<\/p>\n<p>operating system, and Oracle database release are the same as source system.<\/td>\n<td width=\"151\">Change data is captured from archived redo log files. Change sets are populated automatically as archived redo log files arrive on the staging database.<\/td>\n<td width=\"151\">Minimal impact on source<\/p>\n<p>database transactions to<\/p>\n<p>perform supplemental<\/p>\n<p>logging.<\/p>\n<p>Minimal source database<\/p>\n<p>overhead for redo transport<\/p>\n<p>services<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>It will be practical in the following articles&#8230;<\/p>\n<p>If you any question. You can send the mail or comment this post..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CDC (Change Data Capture) It can be called the process of defining and capturing changes made in the database. It is also referred to as a design pattern to identify and track changes in this type of database. Unlike traditional methods, it finds and updates changes in data instantaneously instead of batch processing. Differences between &hellip;<\/p>\n","protected":false},"author":10478,"featured_media":33036,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12300],"tags":[16511,16512,16505,16506,16509,6097,16507,16508,16510],"class_list":["post-33030","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-data-warehouse","tag-asynchronous-cdc","tag-asynchronous-change-data-capture","tag-cdc","tag-change-data-capture","tag-data-modelling","tag-data-warehouse","tag-data-warehouse-cdc","tag-data-warehouse-change-data-capture","tag-synchronous-cdc"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2021\/02\/Change-Data-Capture.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/33030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/10478"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=33030"}],"version-history":[{"count":2,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/33030\/revisions"}],"predecessor-version":[{"id":33038,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/33030\/revisions\/33038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/33036"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=33030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=33030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=33030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}