redolog文件头简单探究

先切换:

SQL> select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 CURRENT
         3 INACTIVE

SQL> alter system archive log current;

System altered.

SQL> select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 ACTIVE
         3 CURRENT

SQL>

再进行dump:

SQL> alter system dump logfile '/u01/app/oracle/oradata/orcl/redo02.log';

System altered.

SQL>

然后再进行比较:

SQL> select group#,first_change# ,next_change# from v$log;

    GROUP# FIRST_CHANGE# NEXT_CHANGE#
---------- ------------- ------------
         1       1022213      1032521
         2       1032521      1037135
         3       1037135   2.8147E+14

SQL> select checkpoint_change# from v$database;

CHECKPOINT_CHANGE#
------------------
           1037135

SQL>

看dump文件的头部:

DUMP OF REDO FROM FILE '/u01/app/oracle/oradata/orcl/redo02.log'
 Opcodes *.*
 RBAs: 0x000000.00000000.0000 thru 0xffffffff.ffffffff.ffff
 SCNs: scn: 0x0000.00000000 thru scn: 0xffff.ffffffff
 Times: creation thru eternity
 FILE HEADER:
        Compatibility Vsn = 186647552=0xb200400
        Db ID=1369801323=0x51a5826b, Db Name='ORCL'
        Activation ID=1369789803=0x51a5556b
        Control Seq=816=0x330, File size=102400=0x19000
        File Number=2, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000008, SCN 0x0000000fc149-0x0000000fd34f"
 thread: 1 nab: 0xccad seq: 0x00000008 hws: 0x2 eot: 0 dis: 0
 resetlogs count: 0x323036ef scn: 0x0000.000e2006 (925702)
 prev resetlogs count: 0x3121c97a scn: 0x0000.00000001 (1)
 Low  scn: 0x0000.000fc149 (1032521) 04/14/2014 15:20:36
 Next scn: 0x0000.000fd34f (1037135) 04/14/2014 17:27:22
 Enabled scn: 0x0000.000e2006 (925702) 03/12/2014 14:36:31
 Thread closed scn: 0x0000.000fc149 (1032521) 04/14/2014 15:20:36

...

fc149 16进制= 1032521

fd34f  16进制= 1037135

 

你可能感兴趣的:(redo)