Block Change Tracking

How to enable Block Change Tracking for RMAN incremental backup performance gain.

Prior to Oracle 10g, RMAN incremental backup has to scan whole datafile & read each and every single block to identified changed blocks, in short RMAN incremental backup is as equal as RMAN full backup.

 

This performance issue has been overcome with Oracle 10g version with “Block Change Tracking” using a change tracking file. This file is more than enough to provide information of changed blocks since the last backup & this file is read instead of all the blocks in the database to arrive at changed blocks & then these blocks were backed up.

 

Let’s consider hands-on on “BLOCK CHANGE TRACKING” feature:

Issue the following query to check current change tracking status:

SQL> select status from v$block_change_tracking;

STATUS
———-
DISABLED
Issue “ALTER DATABASE” command to enable “Change tracking feature”.

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING using file ‘/home/oracle/data/block_change_tracking.dbf’;

Database altered.

SQL> select status from v$block_change_tracking;

STATUS
———-
ENABLED

SQL> select filename,status from v$block_change_tracking;

FILENAME                                                               STATUS
———————————————————————- ———
/home/oracle/data/block_change_tracking.dbf                            ENABLED

 

To disabled “Block Change tracking, issue the following command:

SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

Database altered.
Advantage:

  • Improves RMAN incremental backup performance.
  • No need to go through datafile every time it backup.
  • This reduces backup time and hardly takes few minutes to backup database.

Disadvantage:

  • Enabling change tracking does produce a small overhead.

 

Note:

By default, the change tracking file is created as an OMF.( Oracle Managed File )

Tracking file created with very minimum size and grows in very slow manner.
Renaming and moving change tracking file is as same as normal datafile with help of “ALTER DATABASE RENAME FILE” command.
As per oracle docs, If the instance can not be restarted you can simply disable and re-enable change tracking to create a new file. This method does result in the loss of any current change information.
***********************************************************************
Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have a easy life ahead.

Leave a Reply