612.Examine the following command used to perform incremental level 0 backup:

RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;

To enable the block change tracking, after the incremental level 0 backup you issued the following

command:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/

rman_change_track.f';

To perform incremental level 1 cumulative backup, you issued the following command:

RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

Which two statements are true in the above situation? (Choose two.)

A. The block change tracking data will be used only from the next incremental 0 backup.

B. The incremental backup will use change tracking data for accomplishing the backup.

C. The incremental backup will not use change tracking data for accomplishing the backup.

D. The block track file will scan all the blocks and create bitmap for all the blocks backed up in the level 0

backup.

Answer: AC

 

答案解析:

参考:​​http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89535​

The first level 0 incremental backup scans the entire data file ,是以第一次增量0级备份为基础。

D错误, in the level 0改为 in the first level 0为正确。

A,答案,题中是在level 0后才enable block change tracking,故在下一次的level 0 会扫描所有的数据文件,随后的增量备份就会用到block change tracking file。所以,A正确,必须在下一次的增量备份0级后才能开始使用。

BC答案相反,因为block change tracking file必须要在增量备份0级备份后才能被使用,是接下来的增量累积1级备份没有用到block change tracking file。





Space Management in the Block Change Tracking File

The change tracking file maintains bitmaps that mark changes in the datafiles between backups. The database performs a bitmap switch before each backup. Oracle Database automatically manages space in the change tracking file to retain block change data that covers the eight most recent backups. After the maximum of eight bitmaps is reached, the oldest bitmap is overwritten by the bitmap that tracks the current changes.

The first level 0 incremental backup scans the entire data file. Subsequent incremental backups use the block change tracking file to scan only the blocks that have been marked as changed since the last backup. An incremental backup can be optimized only when it is based on a parent backup that was made after the start of the oldest bitmap in the block change tracking file.

Consider the eight-bitmap limit when developing your incremental backup strategy. For example, if you make a level 0 database backup followed by seven differential incremental backups, then the block change tracking file now includes eight bitmaps. If you then make a cumulative level 1 incremental backup, then 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.



Location of the Block Change Tracking File

One block change tracking file is created for the whole database. By default, the change tracking file is created as an ​​Oracle managed file​ ​ in the destination specified by the ​​DB_CREATE_FILE_DEST​​ initialization parameter. You can also place the change tracking file in any location that you choose, by specifying its name when enabling block change tracking. Oracle recommends against using a raw device (that is, a disk without a file system) as a change tracking file.



Note:

In an Oracle RAC environment, the change tracking file must be located on shared storage accessible from all nodes in the cluster.

RMAN does not support backup and recovery of the change tracking file. The database resets the change tracking file when it determines that the change tracking file is invalid. If you restore and recover the whole database or a subset, then the database resets the block change tracking file and starts tracking changes again. After you make a level 0 incremental backup, the next incremental backup can use change tracking data.






参考:​​javascript:void(0)​


通过启用块更改跟踪,可执行快速增量备份。块更改跟踪会将有更改的每个块的物理地址写入到一个文件中。


需要执行增量备份时,RMAN 可查看块更改跟踪文件,并只备份该文件所引用的块,而无需通过扫描每个块来确定该块自上次备份以来是否发生过更改。


这会加快增量备份的速度。


 


题中:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/rman_change_track.f';

 

启动快速增量备份。

 

实验一次:

1.BACKUP INCREMENTAL LEVEL 0 DATABASE

执行0级增量备份

 

 


sys@TEST0924> SELECT filename,status, bytes FROM v$block_change_tracking;


 


FILENAME                                                     STATUS          BYTES


------------------------------------------------------------ ---------- ----------


/u01/app/oracle/oradata/test0924/changed_block_tracking.log  ENABLED      11599872


 


sys@TEST0924> alter database disable BLOCK CHANGE TRACKING ;


 


Database altered.


 


sys@TEST0924> SELECT filename,status, bytes FROM v$block_change_tracking;


 


FILENAME                                                     STATUS          BYTES


------------------------------------------------------------ ---------- ----------


                                                             DISABLED


 


sys@TEST0924>  ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/u01/app/oracle/oradata/test0924/changed_block_tracking.log';


Database altered.


 


sys@TEST0924> SELECT filename,status, bytes FROM v$block_change_tracking;


 


FILENAME                                                     STATUS          BYTES


------------------------------------------------------------ ---------- ----------


/u01/app/oracle/oradata/test0924/changed_block_tracking.log  ENABLED      11599872


 


sys@TEST0924> alter database disable BLOCK CHANGE TRACKING;


                                                                                                                                        1ï