适用范围
Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
问题概述
Oracle数据库无法启动,报错如下所示,
SQL> startup
ORACLE instance started.
Total System Global Area 3123322880 bytes
Fixed Size 2257312 bytes
Variable Size 721423968 bytes
Database Buffers 2382364672 bytes
Redo Buffers 17276928 bytes
Database mounted.
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: 23144
Session ID: 191 Serial number: 3
SQL>
问题原因
### 1. 使用bbed检查 bootstrap$信息
BBED> p dba 1,520 ktetb
struct ktetb[0], 8 bytes @108
ub4 ktetbdba @108 0x00400209
ub4 ktetbnbk @112 0x00000007
BBED> set dba 1,521
DBA 0x00400209 (4194825 1,521)
BBED>
BBED> p dba 1,521 *kdbr[0]
rowdata[6877]
-------------
ub1 rowdata[6877] @8167 0x3c
BBED> p dba 1,521 *kdbr[1]
rowdata[6740]
-------------
ub1 rowdata[6740] @8030 0x3c
BBED> p dba 1,521 *kdbr[2]
rowdata[6351]
-------------
ub1 rowdata[6351] @7641 0x3c
BBED> p dba 1,521 *kdbr[3]
rowdata[6151]
-------------
ub1 rowdata[6151] @7441 0x3c
BBED> p dba 1,521 *kdbr[4]
rowdata[5768]
-------------
ub1 rowdata[5768] @7058 0x3c
BBED>
### 2. 行标志位解释
“3c”表示该行被删除。
Thevalues for the row flag are:
#defineKDRHFK 0x80 Cluster K ey #defineKDRHFC 0x40 C lustered table member
#defineKDRHFH 0x20 H ead piece of row
#defineKDRHFD 0x10 D eleted row
#defineKDRHFF 0x08 F irst data piece
#defineKDRHFL 0x04 L ast data piece
#defineKDRHFP 0x02 First column continues from P revious piece
#defineKDRHFN 0x01 Last column continues in N ext piece
### 3. 分析结论
1). 非官方途径下载的数据库软件
2). 破解版plsql/toad运维工具
数据库软件被注入恶意代码,定期删除数据库基表 bootstrap$
解决方案
### 1. 恢复bootstrap$基表数据
从其它正常环境copy 1号数据文件到该服务器,并配置bbed参数如下所示,
BBED> info
File# Name Size(blks)
----- ---- ----------
1 /oradata/orcl/system01.dbf 94720 <-- 异常文件
2 /oradata/orcl/bak_tab/system01.dbf 0 <-- 正常文件
BBED>
BBED> p dba 2,520 ktetb
struct ktetb[0], 8 bytes @108
ub4 ktetbdba @108 0x00400209
ub4 ktetbnbk @112 0x00000007 <-- block#: 520,后面7个blocks为数据块
BBED> p dba 2,521 kdbh.kdbhnrow
sb2 kdbhnrow @70 24 <-- 521块内有24条记录
BBED> p dba 2,522 kdbh.kdbhnrow
sb2 kdbhnrow @70 21 <-- 522块内有21条记录
BBED> p dba 2,523 kdbh.kdbhnrow
sb2 kdbhnrow @70 15 <-- 523块内有15条记录
BBED> p dba 2,524 kdbh.kdbhnrow
BBED-00400: invalid blocktype (00) <-- 未使用该块,块未初始化
BBED>
### 2. copy正常数据块
copy dba 2,521 to dba 1,521
copy dba 2,522 to dba 1,522
copy dba 2,523 to dba 1,523
### 3. 修改数据库参数禁用trigger及自动任务
*._system_trig_enabled=false
*.job_queue_processes=0
### 4. 启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 3123322880 bytes
Fixed Size 2257312 bytes
Variable Size 721423968 bytes
Database Buffers 2382364672 bytes
Redo Buffers 17276928 bytes
Database mounted.
Database opened.
SQL>
### 5. 建议逻辑导出使用官方软件重建数据库
参考文档
OERR: ORA-702 "bootstrap verison '%s' inconsistent with version '%s'" Reference Note (Doc ID 18492.1)
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




