Wednesday, July 10, 2013

RMAN Block Change Tracking File



Using block tracking one can improve performance of the backup time of incremental backup from hours to minutes depending on size of database as it no longer needs to scan blocks in data files to find blocks changed it can use the block tracking file to identify changed blocks for incremental backup. Enabling this starts a new background process called Change Tracking Writer (CTWR) which manages this file.
Here are the steps to enable block tracking:
– Note if the file already exists the command will fail unless the REUSE option is used so first check if block tracking is not enabled before overwriting the file.
– If it returns DISABLED it means block tracking is off
SQL> SELECT DISTINCT STATUS FROM V$BLOCK_CHANGE_TRACKING;
STATUS
----———-
DISABLED
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE  ‘/U04/ORADATA/TEST/RMAN_BLOCK_TRACKING.F’;
Database altered.
The below command create a block change tracking file for the database on ASM.

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE ‘+DATA01′;
– indicating block tracking is enabled and the find the block tracking file

SQL> SELECT STATUS, FILENAME FROM V$BLOCK_CHANGE_TRACKING;
STATUS          FILENAME
————————————————————-----------------------------——————–
ENABLED         /U04/ORADATA/TEST/RMAN_BLOCK_TRACKING.F’
To disable block tracking:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
Check the status with below command.
SQL> SELECT DISTINCT STATUS FROM V$BLOCK_CHANGE_TRACKING;
STATUS
——----—-
DISABLED

No comments:

Post a Comment