RMAN's change tracking feature for incremental backups improves incremental backup performance by recording
changed blocks in each datafile in a change tracking file. If change tracking is enabled, RMAN uses the
change tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan
every block in the datafile.
Prior to 10.2, all incremental backups had to read every single block in the database, and if the block
has changed, it was backed up. This meant the RMAN backup job took nearly as long as a normal full backup
because every block had to be read regardless.
Change tracking is disabled by default, because it introduces some minimal performance overhead on
database during normal operations. However, the benefits of avoiding full datafile scans during backup
are considerable, especially if only a small percentage of data blocks are changed between backups.
If backup strategy involves incremental backups, then we should enable change tracking.
From Oracle 10g, the background process Block Change Tracking Writer (CTWR) will do the job of writing
modified block details to block change tracking file.
Checking Whether Change Tracking is enabled:-
SQL> SELECT status FROM v$block_change_tracking;
STATUS
----------
DISABLED
Enabling and Disabling Change Tracking:-
We can enable or disable change tracking when the database is either open or mounted as sysdba.
To enable:-
SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/prim/rman_change_track.f' ;
The REUSE option tells Oracle to overwrite any existing file with the specified name.
SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/prim/rman_change_track.f' REUSE;
To disable:-
SQL> alter database disable block change tracking ;
Moving the Change Tracking File:-
If you need to move the change tracking file, the ALTER DATABASE RENAME FILE command updates the control file
to refer to the new location.
1.Check the file name
SQL> SELECT filename FROM V$BLOCK_CHANGE_TRACKING;
FILENAME
-------------------------------------------------------------
/u01/app/oracle/oradata/prim/rman_change_track.f
2.Shutdown the dbase
SQL> shut immediate;
exit
3.Move the file into different location
[oracle@server1 ~]$mv /u01/app/oracle/oradata/prim/rman_change_track.f /home/oracle/rman_change_track.f
4.Mount the database and move the change tracking file to a location.
SQL> ALTER DATABASE RENAME FILE '/u01/app/oracle/oradata/prim/rman_change_track.f' TO '/home/oracle/rman_change_track.f';
5.Open the database
SQL> alter database open;
6.Determine the new location of block change tracking file
SQL> SELECT filename FROM V$BLOCK_CHANGE_TRACKING;
FILENAME
--------------------------------------------------------------------------------
/home/oracle/rman_change_track.f
If you cannot shutdown the database, then you must disable change tracking and re-enable it, at the new location:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/home/oracle/rman_change_track.f';
changed blocks in each datafile in a change tracking file. If change tracking is enabled, RMAN uses the
change tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan
every block in the datafile.
Prior to 10.2, all incremental backups had to read every single block in the database, and if the block
has changed, it was backed up. This meant the RMAN backup job took nearly as long as a normal full backup
because every block had to be read regardless.
Change tracking is disabled by default, because it introduces some minimal performance overhead on
database during normal operations. However, the benefits of avoiding full datafile scans during backup
are considerable, especially if only a small percentage of data blocks are changed between backups.
If backup strategy involves incremental backups, then we should enable change tracking.
From Oracle 10g, the background process Block Change Tracking Writer (CTWR) will do the job of writing
modified block details to block change tracking file.
Checking Whether Change Tracking is enabled:-
SQL> SELECT status FROM v$block_change_tracking;
STATUS
----------
DISABLED
Enabling and Disabling Change Tracking:-
We can enable or disable change tracking when the database is either open or mounted as sysdba.
To enable:-
SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/prim/rman_change_track.f' ;
The REUSE option tells Oracle to overwrite any existing file with the specified name.
SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/prim/rman_change_track.f' REUSE;
To disable:-
SQL> alter database disable block change tracking ;
Moving the Change Tracking File:-
If you need to move the change tracking file, the ALTER DATABASE RENAME FILE command updates the control file
to refer to the new location.
1.Check the file name
SQL> SELECT filename FROM V$BLOCK_CHANGE_TRACKING;
FILENAME
-------------------------------------------------------------
/u01/app/oracle/oradata/prim/rman_change_track.f
2.Shutdown the dbase
SQL> shut immediate;
exit
3.Move the file into different location
[oracle@server1 ~]$mv /u01/app/oracle/oradata/prim/rman_change_track.f /home/oracle/rman_change_track.f
4.Mount the database and move the change tracking file to a location.
SQL> ALTER DATABASE RENAME FILE '/u01/app/oracle/oradata/prim/rman_change_track.f' TO '/home/oracle/rman_change_track.f';
5.Open the database
SQL> alter database open;
6.Determine the new location of block change tracking file
SQL> SELECT filename FROM V$BLOCK_CHANGE_TRACKING;
FILENAME
--------------------------------------------------------------------------------
/home/oracle/rman_change_track.f
If you cannot shutdown the database, then you must disable change tracking and re-enable it, at the new location:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/home/oracle/rman_change_track.f';
Nenhum comentário:
Postar um comentário