eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle的小工具dbfsize | Blog首页 | 再次选择Google桌面搜索 »

转储日志文件头 获得日志信息

我们可以通过如下命令Dump日志文件头,获得关于Redo Log File的一些重要信息:

SQL> ALTER SESSION SET EVENTS 'immediate trace name redohdr level 10';
Session altered. 

从Trace文件中,我们可以获得如下信息:

  (name #3) /opt/oracle/oradata/conner/redo01.log
 Thread 1 redo log links: forward: 2 backward: 0
 siz: 0x5000 seq: 0x0000011e hws: 0x4 bsz: 512 nab: 0xffffffff flg: 0x8 dup: 1
 Archive links: fwrd: 0 back: 0 Prev scn: 0x0819.002784de
 Low scn: 0x0819.00310b39 03/15/2006 21:39:05
 Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
 FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=153092096=0x9200000
        Db ID=3152029224=0xbbe02628, Db Name='CONNER'
        Activation ID=3189651419=0xbe1e37db
        Control Seq=14132=0x3734, File size=20480=0x5000
        File Number=1, Blksiz=512, File Type=2 LOG 

我们看到,这里的Blksiz=512 bsz: 512 都说明redo log file的块大小为512 bytes.Next scn: 0xffff.ffffffff,表明该日志文件为当前日志文件.

当然,使用dbfsize工具也可以得到这个信息.

 

收录Trace文件中更多信息供参考:

DUMP OF LOG FILES: 4 logs in database
LOG FILE #1:
  (name #3) /opt/oracle/oradata/conner/redo01.log
 Thread 1 redo log links: forward: 2 backward: 0
 siz: 0x5000 seq: 0x0000011e hws: 0x4 bsz: 512 nab: 0xffffffff flg: 0x8 dup: 1
 Archive links: fwrd: 0 back: 0 Prev scn: 0x0819.002784de
 Low scn: 0x0819.00310b39 03/15/2006 21:39:05
 Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
 FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=153092096=0x9200000
        Db ID=3152029224=0xbbe02628, Db Name='CONNER'
        Activation ID=3189651419=0xbe1e37db
        Control Seq=14132=0x3734, File size=20480=0x5000
        File Number=1, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000286, SCN 0x081900310b39-0xffffffffffff"
 thread: 1 nab: 0xffffffff seq: 0x0000011e hws: 0x4 eot: 1 dis: 0
 reset logs count: 0x226e3fed scn: 0x0819.000348e3
 Low scn: 0x0819.00310b39 03/15/2006 21:39:05
 Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
 Enabled scn: 0x0819.000348e3 12/21/2005 18:31:09
 Thread closed scn: 0x0819.0031b7ee 03/17/2006 10:08:31
 Log format vsn: 0x8000000 Disk cksum: 0x7784 Calc cksum: 0x7784
 Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
 Most recent redo scn: 0x0000.00000000
 Largest LWN: 0 blocks
 Miscellaneous flags: 0x0
LOG FILE #2:
  (name #2) /opt/oracle/oradata/conner/redo02.log
 Thread 1 redo log links: forward: 3 backward: 1
 siz: 0x5000 seq: 0x0000011d hws: 0x15 bsz: 512 nab: 0x4fff flg: 0x0 dup: 1
 Archive links: fwrd: 0 back: 0 Prev scn: 0x0819.002784d9
 Low scn: 0x0819.002784de 02/20/2006 13:37:51
 Next scn: 0x0819.00310b39 03/15/2006 21:39:05
 FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=153092096=0x9200000
        Db ID=3152029224=0xbbe02628, Db Name='CONNER'
        Activation ID=3189651419=0xbe1e37db
        Control Seq=14132=0x3734, File size=20480=0x5000
        File Number=2, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000285, SCN 0x0819002784de-0x081900310b39"
 thread: 1 nab: 0x4fff seq: 0x0000011d hws: 0x15 eot: 0 dis: 0
 reset logs count: 0x226e3fed scn: 0x0819.000348e3
 Low scn: 0x0819.002784de 02/20/2006 13:37:51
 Next scn: 0x0819.00310b39 03/15/2006 21:39:05
 Enabled scn: 0x0819.000348e3 12/21/2005 18:31:09
 Thread closed scn: 0x0819.002e469d 03/08/2006 11:26:29
 Log format vsn: 0x8000000 Disk cksum: 0xbbc2 Calc cksum: 0xbbc2
 Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
 Most recent redo scn: 0x0000.00000000
 Largest LWN: 0 blocks
 Miscellaneous flags: 0x0
LOG FILE #3:
  (name #1) /opt/oracle/oradata/conner/redo03.log
 Thread 1 redo log links: forward: 4 backward: 2
 siz: 0x5000 seq: 0x0000011b hws: 0x9 bsz: 512 nab: 0x2 flg: 0x0 dup: 1
 Archive links: fwrd: 0 back: 0 Prev scn: 0x0819.002784cb
 Low scn: 0x0819.002784d6 02/20/2006 13:37:39
 Next scn: 0x0819.002784d9 02/20/2006 13:37:46
 FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=153092096=0x9200000
        Db ID=3152029224=0xbbe02628, Db Name='CONNER'
        Activation ID=3189651419=0xbe1e37db
        Control Seq=14132=0x3734, File size=20480=0x5000
        File Number=3, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000283, SCN 0x0819002784d6-0x0819002784d9"
 thread: 1 nab: 0x2 seq: 0x0000011b hws: 0x9 eot: 0 dis: 0
 reset logs count: 0x226e3fed scn: 0x0819.000348e3
 Low scn: 0x0819.002784d6 02/20/2006 13:37:39
 Next scn: 0x0819.002784d9 02/20/2006 13:37:46
 Enabled scn: 0x0819.000348e3 12/21/2005 18:31:09
 Thread closed scn: 0x0819.002784d6 02/20/2006 13:37:39
 Log format vsn: 0x8000000 Disk cksum: 0xf8e7 Calc cksum: 0xf8e7
 Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
 Most recent redo scn: 0x0000.00000000
 Largest LWN: 0 blocks
 Miscellaneous flags: 0x0
LOG FILE #4:
  (name #5) /opt/oracle/oradata/conner/redo04.log
 Thread 1 redo log links: forward: 0 backward: 3
 siz: 0x800 seq: 0x0000011c hws: 0x9 bsz: 512 nab: 0x3 flg: 0x0 dup: 1
 Archive links: fwrd: 0 back: 0 Prev scn: 0x0819.002784d6
 Low scn: 0x0819.002784d9 02/20/2006 13:37:46
 Next scn: 0x0819.002784de 02/20/2006 13:37:51
 FILE HEADER:
        Software vsn=153092096=0x9200000, Compatibility Vsn=153092096=0x9200000
        Db ID=3152029224=0xbbe02628, Db Name='CONNER'
        Activation ID=3189651419=0xbe1e37db
        Control Seq=14132=0x3734, File size=2048=0x800
        File Number=4, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000284, SCN 0x0819002784d9-0x0819002784de"
 thread: 1 nab: 0x3 seq: 0x0000011c hws: 0x9 eot: 0 dis: 0
 reset logs count: 0x226e3fed scn: 0x0819.000348e3
 Low scn: 0x0819.002784d9 02/20/2006 13:37:46
 Next scn: 0x0819.002784de 02/20/2006 13:37:51
 Enabled scn: 0x0819.000348e3 12/21/2005 18:31:09
 Thread closed scn: 0x0819.002784d9 02/20/2006 13:37:46
 Log format vsn: 0x8000000 Disk cksum: 0xa8b8 Calc cksum: 0xa8b8
 Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
 Most recent redo scn: 0x0000.00000000
 Largest LWN: 0 blocks
 Miscellaneous flags: 0x0 

 

 


历史上的今天...
    >> 2011-03-17文章:
    >> 2009-03-17文章:
    >> 2007-03-17文章:
           新书最后章节框架性定稿
    >> 2005-03-17文章:
           Oracle WareHouse Builder培训

无觅

By eygle on 2006-03-17 14:30 | Comments (0) | Internal | 709 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com