All technological notes.
Block Change Tracking
Fast Incremental Backup to improve the performance of incremental backup’s by recording information of changed database blocks in change tracking file.block chunks that have changed since the last backupincremental backups20 percent or less.incremental backup, RMAN can look at the block change tracking file, determine the modified block chunks, and back up only those blocks.Block Change Tracking File
incremental backups.Characteristics:
change tracking file is stored in the database area with your database files, it is deleted when you disable change tracking. 如果文件在数据库文件中, 自动删除level 0 database backup followed by seven differential incremental backups, then the block change tracking file now includes eight bitmaps. 包括 level 0cumulative level 1 incremental backup, RMAN cannot optimize the backup because the bitmap corresponding to the parent level 0 backup is overwritten with the bitmap that tracks the current changes.tracking file is fully automatic and does not require your intervention.block change tracking file is 10 MB, and any new space is allocated in 10 MB increments.should not place block change tracking file in the fast recovery area.
block change tracking file.Prerequisite:
MOUNT stateTools:
Enterprise Manager Cloud ControlInitialization Parameter:
DB_CREATE_FILE_DEST:
BCT fileSQL Command:
show parameter DB_CREATE_FILE_DEST
-- Enable the block change tracking
ALTER DATABASE
ENABLE BLOCK CHANGE TRACKING
[USING FILE 'path'];
-- Disable the block change tracking
ALTER DATABASE
DISABLE BLOCK CHANGE TRACKING;
-- Rename the block change tracking
-- The database must be in MOUNT state.
ALTER DATABASE
RENAME FILE 'path' TO 'path';
| View | Description |
|---|---|
V$BLOCK_CHANGE_TRACKING |
Show info of block change tracking file |
V$BACKUP_DATAFILE |
how effective the block change tracking is |
-- Query block change tracking file
SELECT filename, status, bytes
FROM v$block change_tracking;
-- Query efficiency of block change tracking file
SELECT file#, avg(datafile_blocks), avg(blocks_read),
avg (blocks_read/datafile_blocks) * 100 AS PCT_READ_FOR_BACKUP,
avg (blocks)
FROM v$backup_datafile
WHERE used_change_tracking = 'YES' AND incremental_level > 0
GROUP BY file#;
-- shows how **effective** the `block change tracking` is in minimizing the `incremental backup` I/O - `PCT_READ_FOR_BACKUP` column:
-- A **high** value indicates that RMAN reads **most** blocks in the data file during an incremental backup.
-- You can **reduce** this ratio by **decreasing the time** between the `incremental backups`.
-- view the parameter before configuration
show parameter DB_CREATE_FILE_DEST
-- Set the DB_CREATE_FILE_DEST initialization parameter
ALTER SYSTEM SET DB_CREATE_FILE_DEST =
'/u01/app/oracle/oradata/ORCL';
-- confirm
show parameter DB_CREATE_FILE_DEST
-- Enable block change tracking
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
