. 데이터 블록들의 변경된 블록만 추적하는 기능 블록들의 변경사항은 특정 파일에 저장 되어 관리됨
. RMAN 증분 백업 속도 와 정확도가 향상 됨
설정하기
1. 활성화
1
2
3
4
5
|
SQL> alter database enable block change tracking using file ‘/data/backup/rman/block_tracking.txt’;
$ cd /data/backup/rman
$ ls -lSh *.txt
$ vi block_tracking.txt
…
|
바이너리 파일 형태임
2. 비활성화
1
|
SQL> alter database disable block chang tracking;
|
3. 활성화 상태 조회
활성화 전
1
2
3
4
5
6
7
8
9
|
SQL> col status for a10
SQL> col filename for a50
SQL> col MB for 999999
SQL> select status, filename, bytes/1024/1024 MB
from v$block_change_tracking;
STATUS FILENAME MB
———- ————————————————– ——-
DISABLED
|
활성화 후
1
2
3
4
5
6
7
8
9
|
SQL> col status for a10
SQL> col filename for a50
SQL> col MB for 999999
SQL> select status, filename, bytes/1024/1024 MB
from v$block_change_tracking;
STATUS FILENAME MB
———- ————————————————– ——-
ENABLED /data/backup/rman/block_tracking.txt 11
|
Enabling Block Change Tracking
To enable block change tracking for the database, use the following command:
alter database enable block change tracking using file /u01/oracle/product/10.2.0/db_1/oradata/mydb/blk_track.trc’;
If there is already a file named blk_track.trc and it needs to be overwritten, add a REUSE clause as follows:
alter database enable block change tracking using file /u01/oracle/product/10.2.0/db_1/oradata/mydb/blk_track.trc’ REUSE;
If the db_create_file_dest parameter is used, then the name of the tracking file should be omitted as follows:
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
When enabling the change tracking feature, the following lines are added to the alert.log file:
alter database enable block change tracking using file
‘/u01/oracle/product/10.2.0/db_1/oradata/mydb/blk_track.trc’
Mon Mar 8 16:07:20 2015
Block change tracking file is current.
Starting background process CTWR
CTWR started with pid=22, OS id=4796
Block change tracking service is active.
Mon Mar 8 16:07:21 2015
Completed: alter database enable block change tracking using file
‘/u01/oracle/product/10.2.0/db_1/oradata/mydb/blk_track.trc’
And the new CTWR process will be created to track the changes:
[oracle@localhost ~]$ ps -ef | grep ctwr
oracle 4796 1 0 16:07 ? 00:00:00 ora_ctwr_mydb
Rman Performance of Block change Tracking in Oracle 12c
lock Change Tracking :
* Block Change Tracking Feature is used to speed up the RMAN incremental backup.
*After Enabling this feature the records modified since the last backup and log stored of it in a block change tracking file using the change
Tracking writer(CTWR) Process.
*Records modified since the last backup and stores log of it in the blcok change tracking file.
*During backup RMAN uses the logfile to identify the specific blocks that must be backedup.
*Block Change Tracking is not read the whole database blocks but only read the changed blocks which results in the block change tracking file.
*Block Change Tracking file is not read all the datafile blocks but read the changed blocks and take backups.
STEP 1:
Enable the Block Change Tracking Feature.
SQL>alter database enable block change tracking using file ‘/u02/prod/blockfile.log’
STEP 2:
Check the status of the enabled block change tracking file.
SQL>select file_name,status from v$block_change_tracking
STEP 3:
Check the Change Tracking writer (CTWR) is started.
SQL>select * from v$sgastat where name like %CTWR%
SQL>select sid,program,status from v$session where name like %CTWR%
STEP 4:
Disable the Block change Tracking Feature.
SQL>alter database disable block change tracking;
SQL>select sid,program,status from v$session where name like %CTWR%