ORA-704 ORA-702錯誤處理

關機重啓數據時遇到報錯如下:

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00702: bootstrap verison '' inconsistent with version '8.0.0.0.0'
Process ID: 13067
Session ID: 1057 Serial number: 3

啓動10046trace定位bootstrap$基表那個快損害

alter session set events '10046 trace name context forever,level 12';

SQL> alter session set events '10046 trace name context forever,level 12';

Session altered.

SQL> oradebug setmypid
Statement processed.
SQL> oradebug tracefile_name
/data/oracle/app/diag/rdbms/orcl/orcl/trace/orcl_ora_22183.trc
SQL> alter database open;

=====================
PARSING IN CURSOR #139956944536880 len=55 dep=1 uid=0 oct=3 lid=0 tim=1697943560758427 hv=2111436465 ad='1027e932e8' sqlid='6apq2rjyxmxpj'
select line#, sql_text from bootstrap$ where obj# != :1
END OF STMT
PARSE #139956944536880:c=395,e=396,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1697943560758426
BINDS #139956944536880:
Bind#0
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
kxsbbbfp=7f4a43f680e8 bln=22 avl=02 flg=05
value=59
EXEC #139956944536880:c=1225,e=4093,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=867914364,tim=1697943560762622
WAIT #139956944536880: nam='db file sequential read' ela= 25 file#=1 block#=520 blocks=1 obj#=59 tim=1697943560762722
WAIT #139956944536880: nam='db file scattered read' ela= 15 file#=1 block#=521 blocks=3 obj#=59 tim=1697943560762950
FETCH #139956944536880:c=367,e=367,p=4,cr=5,cu=0,mis=0,r=0,dep=1,og=4,plh=867914364,tim=1697943560763021
STAT #139956944536880 id=1 cnt=0 pid=0 pos=1 obj=59 op='TABLE ACCESS FULL BOOTSTRAP$ (cr=5 pr=4 pw=0 time=371 us)'

*** 2023-10-22 10:59:20.763
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x0] [PC:0x9767E2C, lmebucp()+24] [flags: 0x0, count: 1]
Incident 144217 created, dump file: /data/oracle/app/diag/rdbms/orcl/orcl/incident/incdir_144217/orcl_ora_22183_i144217.trc
ORA-07445: exception encountered: core dump [lmebucp()+24] [SIGSEGV] [ADDR:0x0] [PC:0x9767E2C] [Address not mapped to object] []

讀取基表BOOTSTRAP$ 520、521快數據時報錯,通過bbed copy 正常數據快來修復

11g下編譯bbed

(1)複製Oracle 10g文件
cp ssbbded.o $ORACLE_HOME/rdbms/lib
cp sbbdpt.o $ORACLE_HOME/rdbms/lib
cp bbedus.msb $ORACLE_HOME/rdbms/mesg
(2)編譯
make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

創建par文件

1 /data/oracle/app/oradata/orcl/system01.dbf 524286
2 /tmp/bbedsystem01.dbf 0

啓動bbed

bbed PASSWORD=blockedit mode=edit blocksize=8192 listfile=/home/oracle/bbed.par

BBED> info
File# Name Size(blks)
----- ---- ----------
1 /data/oracle/app/oradata/orcl/system01.dbf 524286
2 /tmp/bbedsystem01.dbf 0

BBED> copy file 2 block 520 to file 1 block 520
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) N
BBED-00311: unable to edit without a BIFILE


BBED> set count 128
COUNT 128

BBED> copy file 2 block 520 to file 1 block 520
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y
File: /data/oracle/app/oradata/orcl/system01.dbf (1)
Block: 520 Offsets: 0 to 127 Dba:0x00400208
------------------------------------------------------------------------
10a20000 08024000 d0010000 00000204 43e40000 00000000 00000000 00000000
00000000 01000000 07000000 20100000 00000000 03000000 07000000 0c024000
00000000 00000000 01000000 03000000 00000000 00000000 00000000 01000000
00000000 3b000000 00000040 09024000 07000000 00000000 00000000 00000000

<32 bytes per line>

BBED> copy file 2 block 521 to file 1 block 521
File: /data/oracle/app/oradata/orcl/system01.dbf (1)
Block: 521 Offsets: 0 to 127 Dba:0x00400209
------------------------------------------------------------------------
06a20000 09024000 d7010000 00000106 fa520000 01000000 3b000000 73010000
00000000 01f80200 00000000 00002500 02000000 11024000 02004c00 18200000
d7010000 00011800 ffff4200 c6048404 84040000 1800a31f 1a1f951d cd1c4e1b
7a1aad19 49177b16 b315d614 0a14ef12 05120e11 380f680e 910d790c 69099c08

<32 bytes per line>

BBED> copy file 2 block 522 to file 1 block 522
File: /data/oracle/app/oradata/orcl/system01.dbf (1)
Block: 522 Offsets: 0 to 127 Dba:0x0040020a
------------------------------------------------------------------------
06a20000 0a024000 d7010000 00000106 e81e0000 01000000 3b000000 bb010000
00000000 01f80200 00000000 00002500 02000000 20024000 04000700 15200000
d7010000 00011500 ffff3c00 b2057605 76050000 1500521d 811cb71b e31a8a18
07172216 ce120312 f9102010 410f750e 590dad0c 800bb30a dc096507 9606b205

<32 bytes per line>

BBED> copy file 2 block 523 to file 1 block 523
File: /data/oracle/app/oradata/orcl/system01.dbf (1)
Block: 523 Offsets: 0 to 127 Dba:0x0040020b
------------------------------------------------------------------------
06a20000 0b024000 d7010000 00000106 7b7e0000 01000000 3b000000 d0010000
00000000 01000300 00000000 00002500 02000000 27024000 04002f00 0f200000
d7010000 00010f00 ffff3000 f50dc50d c50d0000 0f00301d 561c481b 821aab19
9c18c117 f816b113 ea122011 5110890f c00ef50d 00000000 00000000 00000000

<32 bytes per line>

BBED> sum apply
Check value for File 1, Block 523:
current = 0x7e7b, required = 0x7e7b

BBED> exit

啓動數據庫

 

SQL> startup
ORACLE instance started.

Total System Global Area 6.8413E+10 bytes
Fixed Size 2270360 bytes
Variable Size 6308236136 bytes
Database Buffers 6.2009E+10 bytes
Redo Buffers 93585408 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/data/oracle/app/oradata/orcl/system01.dbf'

recover datafile 

SQL> recover datafile 1;
Media recovery complete.
SQL> alter database open;

Database altered.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章