[20181204]模擬ora-00600[4194]錯誤.txt

lfree發表於2018-12-04

[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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章