V$BLOCK_CHANGE_TRACKING displays the status of block change tracking for the database.
Column | Datatype | Description |
STATUS | VARCHAR2(10) | Status of block change tracking in the database:
|
FILENAME | VARCHAR2(513) | Name of the block change tracking file for the database |
BYTES | NUMBER | Size of the block change tracking file (in bytes) |
Note:
1. The CTWR process is responsible for updating the Block Change Tracking File which is used to optimize incremental RMAN backups.
2. Oracle 10g offers a new feature called block change tracking, allowing for faster creation of incremental backups. Changes to the database blocks are tracked by a tracking file. When the block change tracking is enabled, Changes to the blocks are logged into the tracking file. During the incremental backup, RMAN reads the tracking file to determine changed blocks to avoid reading every block in a datafile.
1. Enabling block change tracking: ALTER DATABASE SQL> alter database enable block change tracking using file '/u01/oradata/orcl/change_tracking.dat'; SQL> alter database enable block change tracking using file '/u01/oradata/orcl/change_tracking.dat' resuse; SQL> alter database enable block change tracking; --with DB_CREATE_FILE_DEST set 2. Disabling block change tracking: ALTER DATABASE SQL> alter database disable block change tracking. 3. Determining if block change tracking is enabled Information about block change tracking and the tracking file is stored in the controlfile and can be accessed using the V$BLOCK_CHANGE_TRACKING view: SQL> select status, filename from v$block_change_tracking; --This view always contains ONE record. --If STATUS=ENABLED, then FILENAME=name_of_file, and BYTES=size_of_file. --If STATUS=DISABLED, the other two columns are null. 4. RMAN and V$BACKUP_DATAFILE: The value of column USED_CHANGE_TRACKING of YES for an incremenat backup level > 0 means that RMAN used the tracking file to speed up the incremental backup. select file#, avg(datafile_blocks), avg(blocks_read), avg(blocks_read/datafile_blocks) * 100 as “% read for backup” from v$backup_datafile where incremental_level > 0 and used_change_tracking = 'YES ' group by file# order by file#; 5. Other information --Whenever block change tracking is enabled or disabled, a message is logged into alert.log to indicate the creation or removal of the tracking file. --Tracking file can be renamed using 'alter database rename file ' comamnd. --Tracking file is a binary file. --RMAN does not support the backup and recovery of the tracking file. |
Oracle data dictionary views
Last updated: 2009-11-10 Tuesday |