- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-5-7 15:13:36
ODM TEST:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database enable block change tracking using file '/s01/bct01';
Database altered.
SQL> create tablespace bct_test datafile size 5M;
Tablespace created.
SQL> select file_id,RELATIVE_FNO from dba_data_files where tablespace_name='BCT_TEST';
FILE_ID RELATIVE_FNO
---------- ------------
6 6
SQL> set linesize 200 pagesize 1400
SQL> select * from x$krcbit where fno=6;
ADDR INDX INST_ID CTFBNO VERCNT VERTIME CSNO FNO BNO BCT
---------------- ---------- ---------- ---------- ---------- --------- ---------- ---------- ---------- ----------
00007F8547511C08 16 1 2624 1 07-MAY-12 1 6 0 4
00007F8547511C08 17 1 2624 1 07-MAY-12 1 6 4 4
00007F8547511C08 18 1 2624 1 07-MAY-12 1 6 8 4
SQL> create table tbct tablespace bct_test as select * from dba_objects where rownum<=1001;
Table created.
SQL> alter system checkpoint;
System altered.
SQL> select * from x$krcbit where fno=6;
ADDR INDX INST_ID CTFBNO VERCNT VERTIME CSNO FNO BNO BCT
---------------- ---------- ---------- ---------- ---------- --------- ---------- ---------- ---------- ----------
00007F8547511C08 27 1 2624 1 07-MAY-12 1 6 0 4
00007F8547511C08 28 1 2624 1 07-MAY-12 1 6 4 4
00007F8547511C08 29 1 2624 1 07-MAY-12 1 6 8 4
00007F8547511C08 30 1 2624 1 07-MAY-12 1 6 12 4
00007F8547511C08 31 1 2624 1 07-MAY-12 1 6 16 4
00007F8547511C08 32 1 2624 1 07-MAY-12 1 6 20 4
00007F8547511C08 33 1 2624 1 07-MAY-12 1 6 24 4
7 rows selected.
SQL> delete tbct;
1001 rows deleted.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select * from x$krcbit where fno=6;
ADDR INDX INST_ID CTFBNO VERCNT VERTIME CSNO FNO BNO BCT
---------------- ---------- ---------- ---------- ---------- --------- ---------- ---------- ---------- ----------
00007F85470E03A0 37 1 2624 1 07-MAY-12 1 6 0 4
00007F85470E03A0 38 1 2624 1 07-MAY-12 1 6 4 4
00007F85470E03A0 39 1 2624 1 07-MAY-12 1 6 8 4
00007F85470E03A0 40 1 2624 1 07-MAY-12 1 6 12 4
00007F85470E03A0 41 1 2624 1 07-MAY-12 1 6 16 4
00007F85470E03A0 42 1 2624 1 07-MAY-12 1 6 20 4
00007F85470E03A0 43 1 2624 1 07-MAY-12 1 6 24 4
7 rows selected.
SQL> insert into tbct select * from dba_objects where rownum<2001;
2000 rows created.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select * from x$krcbit where fno=6;
ADDR INDX INST_ID CTFBNO VERCNT VERTIME CSNO FNO BNO BCT
---------------- ---------- ---------- ---------- ---------- --------- ---------- ---------- ---------- ----------
00007F7F3B144120 85 1 2624 1 07-MAY-12 1 6 0 4
00007F7F3B144120 86 1 2624 1 07-MAY-12 1 6 4 4
00007F7F3B144120 87 1 2624 1 07-MAY-12 1 6 8 4
00007F7F3B144120 88 1 2624 1 07-MAY-12 1 6 12 4
00007F7F3B144120 89 1 2624 1 07-MAY-12 1 6 16 4
00007F7F3B144120 90 1 2624 1 07-MAY-12 1 6 20 4
00007F7F3B144120 91 1 2624 1 07-MAY-12 1 6 24 4
00007F7F3B144120 92 1 2624 1 07-MAY-12 1 6 28 4
00007F7F3B144120 93 1 2624 1 07-MAY-12 1 6 32 4
00007F7F3B144120 94 1 2624 1 07-MAY-12 1 6 36 4
00007F7F3B144120 95 1 2624 1 07-MAY-12 1 6 40 4
11 rows selected.
RMAN> backup incremental level 0 datafile 6;
Starting backup at 07-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=143 devtype=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/s01/oradata/G10R25/datafile/o1_mf_bct_test_7tgwoyyd_.dbf
channel ORA_DISK_1: starting piece 1 at 07-MAY-12
channel ORA_DISK_1: finished piece 1 at 07-MAY-12
piece handle=/s01/flash_recovery_area/G10R25/backupset/2012_05_07/o1_mf_nnnd0_TAG20120507T030810_7tgx6tlh_.bkp tag=TAG20120507T030810 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-MAY-12
Starting Control File and SPFILE Autobackup at 07-MAY-12
piece handle=/s01/flash_recovery_area/G10R25/autobackup/2012_05_07/o1_mf_s_782622491_7tgx6vpt_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 07-MAY-12
SQL> delete tbct;
2000 rows deleted.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select * from x$krcbit where fno=6;
ADDR INDX INST_ID CTFBNO VERCNT VERTIME CSNO FNO BNO BCT
---------------- ---------- ---------- ---------- ---------- --------- ---------- ---------- ---------- ----------
00007FC5EF3CA098 100 1 3072 2 07-MAY-12 1 6 8 4
00007FC5EF3CA098 101 1 3072 2 07-MAY-12 1 6 12 4
00007FC5EF3CA098 102 1 3072 2 07-MAY-12 1 6 16 4
00007FC5EF3CA098 103 1 3072 2 07-MAY-12 1 6 20 4
00007FC5EF3CA098 104 1 3072 2 07-MAY-12 1 6 24 4
00007FC5EF3CA098 105 1 3072 2 07-MAY-12 1 6 28 4
00007FC5EF3CA098 106 1 3072 2 07-MAY-12 1 6 32 4
00007FC5EF3CA098 107 1 3072 2 07-MAY-12 1 6 36 4
00007FC5EF3CA098 108 1 3072 2 07-MAY-12 1 6 40 4
00007FC5EF3CA098 109 1 2624 1 07-MAY-12 1 6 0 4
00007FC5EF3CA098 110 1 2624 1 07-MAY-12 1 6 4 4
00007FC5EF3CA098 111 1 2624 1 07-MAY-12 1 6 8 4
00007FC5EF3CA098 112 1 2624 1 07-MAY-12 1 6 12 4
00007FC5EF3CA098 113 1 2624 1 07-MAY-12 1 6 16 4
00007FC5EF3CA098 114 1 2624 1 07-MAY-12 1 6 20 4
00007FC5EF3CA098 115 1 2624 1 07-MAY-12 1 6 24 4
00007FC5EF3CA098 116 1 2624 1 07-MAY-12 1 6 28 4
00007FC5EF3CA098 117 1 2624 1 07-MAY-12 1 6 32 4
00007FC5EF3CA098 118 1 2624 1 07-MAY-12 1 6 36 4
00007FC5EF3CA098 119 1 2624 1 07-MAY-12 1 6 40 4
20 rows selected.
可以看到 出现了 VERCNT=2 的 bitmap
X$KRCBIT Bitmap block
Table X$KRCBIT
CTFBNO – extent header block#
VERCNT, VERTIME, FNO – as before
BNO – first block# of the chunk
BCT – chunk size in db blocks
Chunk Change Tracking |
|