{"id":13478,"date":"2019-12-30T21:37:05","date_gmt":"2019-12-30T21:37:05","guid":{"rendered":"https:\/\/ittutorial.org\/?p=13478"},"modified":"2020-11-23T07:50:16","modified_gmt":"2020-11-23T07:50:16","slug":"block-change-tracking","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/block-change-tracking\/","title":{"rendered":"Block Change Tracking in Oracle"},"content":{"rendered":"<p>Block change tracking (BCT) is an oracle feature that improves the performance of incremental backups.<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">Block change tracking (BCT) in Oracle<\/span><\/h2>\n<p>Suppose we have a level 0 backup and want to make a level 1 backup. During the level 1 backup, oracle will scan all the blocks from the last level 0 backup and identify those which have been modified. Once this action has been performed, Oracle will save only all of the modified blocks.<\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #ff0000;\">Block change tracking (BCT)<\/span><\/h3>\n<p>With Oracle&#8217;s Block Change Tracking (BCT) functionality, you no longer need to scan all blocks from a previous incremental backup. Indeed BCT uses a background process called Change Tracking Writer (CTWR). The role of the CTWR is to track all the modified blocks and then identify them in a tracking file. By default, the BCT function is disabled. That means, oracle does not save block change information.<\/p>\n<p>To check the status of the BCT, please execute the following command :<\/p>\n<pre>SQL&gt; select status from v$block_change_tracking;\r\n\r\n\r\nSTATUS\r\n\r\n----------\r\n\r\nDISABLED<\/pre>\n<p>&nbsp;<\/p>\n<p>Let&#8217;s activate \u00a0block change<\/p>\n<pre>SQL&gt; alter database enable block change tracking using file '+DATA';<\/pre>\n<p>The &#8220;using file&#8221; clause specifies the location of the BCT file on the OS. If you omit this clause, the Oracle Managed File (OMF) option will be enabled.<\/p>\n<p>&nbsp;<\/p>\n<p>To activate the block change using the OMF option, execute the command below:<\/p>\n<pre>SQL&gt; alter database enable block change tracking;<\/pre>\n<p>&nbsp;<\/p>\n<p>Now, let\u2019s check again the status of the BCT after activation<\/p>\n<pre>SQL&gt; col filename format a46\r\n\r\nSQL&gt; col status format a12\r\n\r\nSQL&gt;\u00a0 select status, filename from v$block_change_tracking;\r\n\r\n\r\n\r\nSTATUS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FILENAME\r\n\r\n------------ ----------------------------------------------\r\n\r\nENABLED\u00a0\u00a0\u00a0\u00a0\u00a0 +DATA\/ACHATS\/CHANGETRACKING\/ctf.288.1027782031<\/pre>\n<p>&nbsp;<\/p>\n<p>To know the size of the BCT, execute the following command:<\/p>\n<pre>SQL&gt; select status, filename, bytes from v$block_change_tracking;\r\n\r\n\r\nSTATUS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FILENAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0BYTES\r\n\r\n------------ ---------------------------------------------- ----------\r\n\r\nENABLED\u00a0\u00a0\u00a0\u00a0\u00a0 +DATA\/ACHATS\/CHANGETRACKING\/ctf.288.1027782031\u00a0\u00a0 11599872<\/pre>\n<p>&nbsp;<\/p>\n<p>To deactivate the block change tracking, execute the following command:<\/p>\n<pre>SQL&gt; alter database disable block change tracking;<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/ittutorial.org\/rman-tutorial-backup-restore-and-recovery-tutorials-for-beginners-in-the-oracle-database\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color: #ff0000;\">Do you want to learn more details about RMAN, then Click this Link and read the articles.<\/span><\/a><\/h4>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Block change tracking (BCT) is an oracle feature that improves the performance of incremental backups.<\/p>\n","protected":false},"author":10459,"featured_media":3422,"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":[1994,5085],"tags":[6823,3518,3471,2637,16057,5083,16056,16055,4232,2672,12479,16058,1166,7202,1483],"class_list":["post-13478","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-oracle","category-performance-tuning","tag-access-path-in-oracle","tag-active-dataguard-in-oracle","tag-addr-performance-tuning","tag-alter-system-set-oracle","tag-bct-oracle","tag-block-change-tracking","tag-block-change-tracking-bct","tag-block-change-tracking-bct-in-oracle","tag-compression-in-oracle","tag-database-tutorial","tag-disable-block-change-tracking","tag-enable-block-change-tracking","tag-oracle-advanced-security-option","tag-performance-tuni","tag-rman-block-change-tracking"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2013\/10\/block-change-tracking.jpeg","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/13478","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\/10459"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=13478"}],"version-history":[{"count":3,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/13478\/revisions"}],"predecessor-version":[{"id":32381,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/13478\/revisions\/32381"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/3422"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=13478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=13478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=13478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}