ITPub博客

首页 > 数据库 > Oracle > [20181204]模拟ora-00600[4194]错误.txt

[20181204]模拟ora-00600[4194]错误.txt

原创 Oracle 作者:lfree 时间:2018-12-04 16:01:39 0 删除 编辑

[20181204]模拟ora-00600[4194]错误.txt


--//ORA-600[4194]内部错误一般由重做记录与回滚记录不匹配引发,与ora-00600[4193]类似.


--//Oracle在验证Undo record number时,会对比redo change和回滚段中的undo record number,若发现2者存在差异则报该4194错误。


--//其错误argument[a][b],a代表回滚块中的最大undo record number,b代表重做日志中记录的undo record number。这个错误可能由

--//回滚段或者redo log日志文件讹误引起。


--//ORA-00600[4194]错误的根本原因是 redo记录与回滚段(rollback/undo)记录之间的不一致。当ORACLE在验证undo记录时相对应的变

--//化需要应用到undo数据块的最大undo记录上,此时若检验出错则会报ORA-00600[4194]


--//此错误不像ORA-600[2662]或ORA-600[4000]错误那样必然导致数据库无法打开,因为它很少出现在前滚阶段;当数据库被打开,smon

--//开始执行事务恢复或一些回滚段的管理工作时则很有可能触发该错误。


ORA-600[4194]的2个的含义:

Arg [a] Maximum Undo record number in Undo block

Arg [b] Undo record number from Redo block


--//上午测试模拟ora-00600[4193],链接:http://blog.itpub.net/267265/viewspace-2284078/,下午模拟ora-00600[4194].


--//如果问题发生在system回滚段,就不能按照上面的方法处理.看了网站介绍.

--//链接:archives/【oracle数据恢复】通过bbed修复ora-6004193和ora-6004194的例子.html


--//通过bbed修改系统回滚段的2个参数.在sum apply就ok了.

ktuxc.ktuxcnfb=0x0000

ktuxc.ktuxcfbp[0].ktufbuba.kubadba=0x00000000


--//反向思维一下,我想既然可以这样方法修复,也可以利用同样模拟问题的产生.通过测试环境测试看看.


1.环境:

SYS@book> @ ver1

PORT_STRING                    VERSION        BANNER

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

x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


SYS@book> select HEADER_FILE,HEADER_BLOCK,BLOCKS,EXTENTS from dba_segments where segment_name='SYSTEM' and SEGMENT_TYPE='ROLLBACK';

HEADER_FILE HEADER_BLOCK     BLOCKS    EXTENTS

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

          1          128         48          6


--//system表空间使用MSSM,bbed可以访问段头.

SYS@book> shutdown immediate ;

Database closed.

Database dismounted.

ORACLE instance shut down.


SYS@book> startup mount

ORACLE instance started.

Total System Global Area  643084288 bytes

Fixed Size                  2255872 bytes

Variable Size             205521920 bytes

Database Buffers          427819008 bytes

Redo Buffers                7487488 bytes

Database mounted.


SYS@book> alter system dump datafile '/mnt/ramdisk/book/system01.dbf' block 128;

System altered.


--//检查转储文件:

  Extent Control Header

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

  Extent Header:: spare1: 0      spare2: 0      #extents: 6      #blocks: 47

                  last map  0x00000000  #maps: 0      offset: 4128

      Highwater::  0x00400088  ext#: 1      blk#: 0      ext size: 8

  #blocks in seg. hdr's freelists: 0

  #blocks below: 0

  mapblk  0x00000000  offset: 1

                   Unlocked

     Map Header:: next  0x00000000  #extents: 6    obj#: 0      flag: 0x40000000

  Extent Map

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

   0x00400081  length: 7

   0x00400088  length: 8

   0x00400210  length: 8

   0x00400218  length: 8

   0x00400220  length: 8

   0x00400228  length: 8


  TRN CTL:: seq: 0x002b chd: 0x005a ctl: 0x0003 inc: 0x00000000 nfb: 0x0001

                                                   ~~~~~~~~~~~

            mgc: 0x8002 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)

            uba: 0x00400088.002b.15 scn: 0x0003.37752d38

Version: 0x01

  FREE BLOCK POOL::

    uba: 0x00400088.002b.1e ext: 0x1  spc: 0x28a

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    uba: 0x00000000.001a.02 ext: 0x2  spc: 0x1f16

    uba: 0x00000000.0018.3a ext: 0x0  spc: 0x80e

    uba: 0x00000000.0000.00 ext: 0x0  spc: 0x0

    uba: 0x00000000.0000.00 ext: 0x0  spc: 0x0

  TRN TBL::


  index  state cflags  wrap#    uel         scn            dba            parent-xid    nub     stmt_num

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

   0x00    9    0x00  0x002c  0x0003  0x0003.3776beed  0x00400088  0x0000.000.00000000  0x00000001   0x00000000

   0x01    9    0x00  0x002b  0x0007  0x0003.37752d3e  0x00400084  0x0000.000.00000000  0x00000001   0x00000000

...

   0x5f    9    0x00  0x002a  0x000e  0x0003.3775454f  0x00400084  0x0000.000.00000000  0x00000001   0x00000000

   0x60    9    0x00  0x002a  0x005c  0x0003.37752d44  0x00400084  0x0000.000.00000000  0x00000001   0x00000000

   0x61    9    0x00  0x002b  0x0005  0x0003.3776bee7  0x00400088  0x0000.000.00000000  0x00000001   0x00000000

End dump data block from file /mnt/ramdisk/book/system01.dbf minblk 128 maxblk 128


--//注意下划线部分内容与bbed的观察对上.关闭数据库.


2.通过bbed观察:

BBED> set dba 1,128

        DBA             0x00400080 (4194432 1,128)


BBED> p ktuxc

struct ktuxc, 104 bytes                     @4148

   struct ktuxcscn, 8 bytes                 @4148

      ub4 kscnbas                           @4148     0x37752d38

      ub2 kscnwrp                           @4152     0x0003

   struct ktuxcuba, 8 bytes                 @4156

      ub4 kubadba                           @4156     0x00400088

      ub2 kubaseq                           @4160     0x002b

      ub1 kubarec                           @4162     0x15

   sb2 ktuxcflg                             @4164     1 (KTUXCFSK)

   ub2 ktuxcseq                             @4166     0x002b

   sb2 ktuxcnfb                             @4168     1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   

   ub4 ktuxcinc                             @4172     0x00000000

   sb2 ktuxcchd                             @4176     90

   sb2 ktuxcctl                             @4178     3

   ub2 ktuxcmgc                             @4180     0x8002

   ub4 ktuxcopt                             @4188     0x7ffffffe

   struct ktuxcfbp[0], 12 bytes             @4192

      struct ktufbuba, 8 bytes              @4192

         ub4 kubadba                        @4192     0x00400088

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  

         ub2 kubaseq                        @4196     0x002b

         ub1 kubarec                        @4198     0x1e

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

      sb2 ktufbext                          @4200     1

      sb2 ktufbspc                          @4202     650


--//注意看下划线,如果出现问题,正常就是修改这2处.

--//修改dba 1,128 ktuxc.ktuxcfbp[0].ktufbuba.kubarec=0x1f

BBED> assign dba 1,128 ktuxc.ktuxcfbp[0].ktufbuba.kubarec=0x1f

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y

ub2 kubaseq                                 @4196     0x002f


BBED> sum apply dba 1,128

Check value for File 1, Block 128:

current = 0x52ea, required = 0x52ea


3.测试看看:

SYS@book> startup

ORACLE instance started.

Total System Global Area  643084288 bytes

Fixed Size                  2255872 bytes

Variable Size             205521920 bytes

Database Buffers          427819008 bytes

Redo Buffers                7487488 bytes

Database mounted.

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-00600: internal error code, arguments: [4194], [], [], [], [], [], [], [], [], [], [], []

Process ID: 26370

Session ID: 274 Serial number: 3


--//alert.log记录如下:

Undo initialization errored: err:600 serial:0 start:3992256618 end:3992258058 diff:1440 (14 seconds)

Errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_26370.trc:

ORA-00600: internal error code, arguments: [4194], [], [], [], [], [], [], [], [], [], [], []

Errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_26370.trc:

ORA-00600: internal error code, arguments: [4194], [], [], [], [], [], [], [], [], [], [], []

Error 600 happened during db open, shutting down database

USER (ospid: 26370): terminating the instance due to error 600

Instance terminated by USER, pid = 26370

ORA-1092 signalled during: ALTER DATABASE OPEN...

opiodr aborting process unknown ospid (26370) as a result of ORA-1092

Tue Dec 04 15:47:36 2018

ORA-1092 : opitsk aborting process


--//模拟的没有[a][b]参数.


4.继续测试:

--//奇怪我执行如下,修改原值

assign dba 1,128 ktuxc.ktuxcfbp[0].ktufbuba.kubarec=0x1e


--//startup依旧报ora-00600[4194].


assign dba 1,128 ktuxc.ktuxcnfb=0x0000

assign dba 1,128 ktuxc.ktuxcfbp[0].ktufbuba.kubadba=0x00000000


BBED> assign dba 1,128 ktuxc.ktuxcnfb=0x0000

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y

sb2 ktuxcnfb                                @4168     0


BBED> assign dba 1,128 ktuxc.ktuxcfbp[0].ktufbuba.kubadba=0x00000000

ub4 kubadba                                 @4192     0x00000000


BBED> sum apply dba 1,128

Check value for File 1, Block 128:

current = 0x7d27, required = 0x7d27


SYS@book> startup

ORACLE instance started.

Total System Global Area  643084288 bytes

Fixed Size                  2255872 bytes

Variable Size             205521920 bytes

Database Buffers          427819008 bytes

Redo Buffers                7487488 bytes

Database mounted.

Database opened.


--//OK,现在启动成功!!


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2284080/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2859
  • 访问量
    6645333