low cache rba vs on disk rba

low cache rba就是CKPT记录的DBWR写的进度, on disk rba就是LGWR的写进度.
low cache rba 以前的更前的已经写入数据文件,不需要重做, on disk rba以后的
日志还没写入到online logfile.所以不需要恢复.
记录在控制文件的CHECKPOINT PROGRESS RECORDS条目中。
SQL> create table anran(id int)
  2  /
表已创建。
SQL> insert into anran values(7)
  2  /
已创建 1 行。
SQL> commit
  2  /
提交完成。
SQL> shutdown abort
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area  603979776 bytes
Fixed Size                  1298112 bytes
Variable Size             171966784 bytes
Database Buffers          423624704 bytes
Redo Buffers                7090176 bytes
数据库装载完毕。
SQL> oradebug setmypid
已处理的语句
SQL> oradebug dump controlf 4
已处理的语句
打开控制文件找到CHECKPOINT PROGRESS RECORDS:

***************************************************************************
CHECKPOINT PROGRESS RECORDS
***************************************************************************
 (size = 8180, compat size = 8180, section max = 11, section in-use = 0,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 2, numrecs = 11)
THREAD #1 - status:0x2 flags:0x0 dirty:32
low cache rba:(0x12.5c85.0) on disk rba:(0x12.5ced.0)
on disk scn: 0x0000.001414d0 07/09/2010 00:06:12
resetlogs scn: 0x0000.000fffeb 07/05/2010 11:10:48
heartbeat: 723882252 mount id: 886034360
....
THREAD #8 - status:0x0 flags:0x0 dirty:0
low cache rba:(0x0.0.0) on disk rba:(0x0.0.0)
on disk scn: 0x0000.00000000 01/01/1988 00:00:00
resetlogs scn: 0x0000.00000000 01/01/1988 00:00:00
heartbeat: 0 mount id: 0
只有Thread 1 是对我们有用的。其中
low cache rba:(0x12.5c85.0) 0x12.5c85.0 = 18.23685.0
on disk rba:(0x12.5ced.0)   0x12.5ced.0 = 18.23789.0
SQL> alter database open;
数据库已更改。
查看alert.log可以看到:
Beginning crash recovery of 1 threads
 parallel recovery started with 2 processes
Fri Jul 09 00:12:54 2010
Started redo scan
Fri Jul 09 00:12:55 2010
Completed redo scan
 104 redo blocks read, 34 data blocks need recovery
Fri Jul 09 00:12:55 2010
Started redo application at
 Thread 1: logseq 18, block 23685   ---恢复起点
Fri Jul 09 00:12:55 2010
Recovery of Online Redo Log: Thread 1 Group 1 Seq 18 Reading mem 0
  Mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ANRAN\ONLINELOG\O1_MF_1_63007KDR_.LOG
  Mem# 1: D:\ORACLE\PRODUCT\10.2.0\ORADATA\ANRAN\ONLINELOG\O1_MF_1_63007J6X_.LOG
Fri Jul 09 00:12:55 2010
Completed redo application
Fri Jul 09 00:12:55 2010
Completed crash recovery at
 Thread 1: logseq 18, block 23789, scn 1336048  ---恢复终点
 34 data blocks read, 32 data blocks written, 104 redo blocks read

你可能感兴趣的:(oracle,职场,休闲)