Sunday, November 11, 2018

How to Enable Block Change Tracking


In RMAN incremental backup strategy, enabling block change tracking significantly increases incremental RMAN backups performance by helping RMAN to find out only changed/modified blocks (since last full backup) very fast, because only these are the blocks to be backed up during an incremental backup. List of these blocks (changed since last full backup) is maintained in the block change tracking file. In this article I will explain how to enable block change tracking.

Best practice is to create block change tracking file at the same location where datafiles are being stored. If you are using OMF (Oracle Managed Files) and have already set db_create_file_dest, block change tracking will automatically be created at this location as soon as you enable the block change tracking using ALTER DATABASE command. Alternatively, you can mention block change tracking file path/name while enabling the block change tracking.
SQL> set lines 200
SQL> col filename for a40

SQL> Select * from v$block_change_tracking
STATUS                   FILENEM                  BYTES
------------             ------------------------------------------------------
DISABLED

SQL> alter database enable block change tracking using file ‘/u01/app/oracle/oradata/mydb/change_tracking.dbf’


SQL Select status,filename,bytes from v$block_change_tracking
STATUS                   FILENEM                                                                   BYTES
------------             ------------------------------                                                  ------------------------
ENABLED            ‘/u01/app/oracle/oradata/mydb/change_tracking.dbf’    11599872



To disable block change tracking.
SQL> alter database disable block change tracking;

Database altered.

SQL> select status,file_name,bytes from v$block_change_tracking;

STATUS     FILENAME                                      BYTES    
---------- ---------------------------------------- ---------- ----------
DISABLED

No comments:

Post a Comment

Popular Posts - All Times