ORA-600 [] 错误解析
ERROR:
Format: ORA-600 [] [a] [b]
VERSIONS:
versions 6.0 to 12.1
DESCRIPTION:
A mismatch has been detected between Redo records and Rollback (Undo)
records.
We are validating the Undo block sequence number in the undo block against
the Redo block sequence number relating to the change being applied.
This error is reported when this validation fails.
ARGUMENTS:
Arg [a] Undo record seq number
Arg [b] Redo record seq number

ORA-600 [4193] 错误解析

人为构造ORA-600 [4193]错误(Cont…)

SQL> select HEADER_FILE,HEADER_BLOCK from dba_segments where segment_name='SYSTEM';

HEADER_FILE HEADER_BLOCK
----------- ------------
1 128
SQL> alter system dump datafile 1 block 128;
System altered.
SQL> select VALUE from v$diag_info where name='Default Trace File';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8493.trc
  Extent Control Header
-----------------------------------------------------------------
Extent Header:: spare1: 0 spare2: 0 #extents: 6 #blocks: 47
last map 0x00000000 #maps: 0 offset: 4128
Highwater:: 0x00400229 ext#: 5 blk#: 1 ext size: 8
#blocks in seg. hdr's freelists: 0
#blocks below: 0
mapblk 0x00000000 offset: 5
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: 0x001d chd: 0x003e ctl: 0x0048 inc: 0x00000000 nfb: 0x0001
mgc: 0x8002 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x00400229.001d.12 scn: 0x0000.0096025c
Version: 0x01
FREE BLOCK POOL::
uba: 0x00400229.001d.12 ext: 0x5 spc: 0xb72
uba: 0x00000000.0018.34 ext: 0x0 spc: 0x942
uba: 0x00000000.0018.02 ext: 0x0 spc: 0x1e62
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 0x0019 0x004a 0x0000.00969848 0x00400227 0x0000.000.00000000 0x00000001 0x00000000
0x01 9 0x00 0x0019 0x000a 0x0000.0096984c 0x00400227 0x0000.000.00000000 0x00000001 0x00000000

模拟的时候先关闭数据库

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

BBED> set file 1 block 128
FILE# 1
BLOCK# 128 BBED> map /v
File: /u01/app/oracle/oradata/orcl/system01.dbf (1)
Block: 128 Dba:0x00400080
------------------------------------------------------------
Unlimited Undo Segment Header
BBED> p ktuxc ##事务控制列表
struct ktuxcfbp[], 12 bytes @4192
struct ktufbuba, 8 bytes @4192
ub4 kubadba @4192 0x00400229
ub2 kubaseq @4196 0x001d
ub1 kubarec @4198 0x12
sb2 ktufbext @4200 5
sb2 ktufbspc @4202 2930
struct ktuxcfbp[], 12 bytes @4204
struct ktufbuba, 8 bytes @4204
ub4 kubadba @4204 0x00000000
ub2 kubaseq @4208 0x0018
ub1 kubarec @4210 0x34
sb2 ktufbext @4212 0
sb2 ktufbspc @4214 2370
BBED> set dba 0x00400229
DBA 0x00400229 (4194857 1,553) BBED> map /v
File: /u01/app/oracle/oradata/orcl/system01.dbf (1)
Block: 553 Dba:0x00400229
------------------------------------------------------------
Undo Data struct kcbh, 20 bytes @0
ub1 type_kcbh @0
ub1 frmt_kcbh @1
ub1 spare1_kcbh @2
ub1 spare2_kcbh @3
ub4 rdba_kcbh @4
ub4 bas_kcbh @8
ub2 wrp_kcbh @12
ub1 seq_kcbh @14
ub1 flg_kcbh @15
ub2 chkval_kcbh @16
ub2 spare3_kcbh @18 struct ktubh, 52 bytes @20
struct ktubhxid, 8 bytes @20
ub2 ktubhseq @28 #####
ub1 ktubhcnt @30
ub1 ktubhirb @31
ub1 ktubhicl @32
ub1 ktubhflg @33
ub2 ktubhidx[] @34 ub1 freespace[] @72 ub1 undodata[] @3004 ub4 tailchk @8188

使用bbed修改并应用

BBED> modify /x 1e offset 28
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
File: /u01/app/oracle/oradata/orcl/system01.dbf (1)
Block: 553 Offsets: 28 to 539 Dba:0x00400229
BBED> sum apply

启动数据报错

SQL> startup mount;
ORACLE instance started. Total System Global Area 784998400 bytes
Fixed Size 2257352 bytes
Variable Size 478154296 bytes
Database Buffers 297795584 bytes
Redo Buffers 6791168 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [],
[], [], [], []
Process ID: 8643
Session ID: 125 Serial number: 5

alert日志

[oracle@DSI ~]$ tail -n 100 /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
Block recovery completed at rba 31.72797.16, scn 0.10127330
Undo initialization errored: err:600 serial:0 start:107136944 end:107138904 diff:1960 (19 seconds)
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8643.trc:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [], [], [], []
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8643.trc:
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [], [], [], []
Error 600 happened during db open, shutting down database
USER (ospid: 8643): terminating the instance due to error 600

10046

SYS@ orcl >oradebug setmypid
Statement processed.
SYS@ orcl >oradebug tracefile_name
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8771.trc
SYS@ orcl >oradebug event 10046 trace name context forever,level 12
SYS@ orcl > alter database open; PARSING IN CURSOR #139713678966960 len=55 dep=1 uid=0 oct=3 lid=0 tim=1561619032814165 hv=2111436465 ad='8e889e30' sqlid='6apq2rjyxmxpj'
select line#, sql_text from bootstrap$ where obj# != :1
END OF STMT
PARSE #139713678966960:c=1000,e=243,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1561619032814165
BINDS #139713678966960:
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=7f11a0347c68 bln=22 avl=02 flg=05
value=59 PARSING IN CURSOR #139713654947120 len=160 dep=1 uid=0 oct=6 lid=0 tim=1561619032979076 hv=1292341136 ad='88bcc840' sqlid='8vyjutx6hg3wh'
update /*+ rule */ undo$ set name=:2,file#=:3,block#=:4,status$=:5,user#=:6,undosqn=:7,xactsqn=:8,scnbas=:9,scnwrp=:10,inst#=:11,ts#=:12,spare1=:13 where us#=:1
END OF STMT
PARSE #139713654947120:c=2000,e=2120,p=6,cr=43,cu=0,mis=1,r=0,dep=1,og=3,plh=0,tim=1561619032979076
BINDS #139713654947120:
Bind#0
oacdty=01 mxl=32(20) mxlc=00 mal=00 scl=00 pre=00
oacflg=18 fl2=0001 frm=01 csi=873 siz=32 off=0
kxsbbbfp=88bdf03a bln=32 avl=20 flg=09
value="_SYSSMU1_1925302723$" WAIT #139713654947120: nam='db file sequential read' ela= 6 file#=1 block#=553 blocks=1 obj#=0 tim=1561619032979636
Incident 55355 created, dump file: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_55355/orcl_ora_8771_i55355.trc
ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [], [], [], [] Error 600 in redo application callback
Dump of change vector:
TYP:0 CLS:16 AFN:1 DBA:0x00400229 OBJ:4294967295 SCN:0x0000.00998c56 SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 288 spc: 642 flg: 0x0012 seq: 0x001d rec: 0x1d
xid: 0x0000.040.00000019

尝试设置free block pool(如果不知道,假设free block pool没有可用的undo block!)如下方法:
1、 ktuxc.ktuxcnfb设置为 0x00
2、 kubadba设为0x00000000

BBED> set file 1 block 128
FILE# 1
BLOCK# 128
BBED> map /v
BBED> p ktuxc
struct ktuxc, 104 bytes @4148
struct ktuxcscn, 8 bytes @4148
ub4 kscnbas @4148 0x0096025e
ub2 kscnwrp @4152 0x0000
struct ktuxcuba, 8 bytes @4156
ub4 kubadba @4156 0x00400229
ub2 kubaseq @4160 0x001d
ub1 kubarec @4162 0x13
sb2 ktuxcflg @4164 1 (KTUXCFSK)
ub2 ktuxcseq @4166 0x001d
sb2 ktuxcnfb @4168 1
ub4 ktuxcinc @4172 0x00000000
sb2 ktuxcchd @4176 64
sb2 ktuxcctl @4178 62
ub2 ktuxcmgc @4180 0x8002
ub4 ktuxcopt @4188 0x7ffffffe
BBED> modify /x 00 offset 4168
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
File: /u01/app/oracle/oradata/orcl/system01.dbf (1)
Block: 128 Offsets: 4168 to 4679 Dba:0x00400080
BBED> modify /x 0x00000000 offset 4192
File: /u01/app/oracle/oradata/orcl/system01.dbf (1)
Block: 128 Offsets: 4192 to 4703 Dba:0x00400080
BBED> sum apply

启动数据库

SQL> startup mount;
ORACLE instance started. Total System Global Area 784998400 bytes
Fixed Size 2257352 bytes
Variable Size 478154296 bytes
Database Buffers 297795584 bytes
Redo Buffers 6791168 bytes
Database mounted.
SQL> alter database open; ##数据库打开
[oracle@DSI ~]$ tail -n 100 /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
SMON: enabling cache recovery
Thu Jun 27 15:18:16 2019
ARC3 started with pid=25, OS id=8873
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Archived Log entry 253 added for thread 1 sequence 32 ID 0x5bac61e6 dest 1:
[] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:108417224 end:108417244 diff:20 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC

ORA-600 [4194] 错误解析

ERROR:
ORA-600 [] [a] [b]
VERSIONS:
versions 6.0 to 10.1
DESCRIPTION:
A mismatch has been detected between Redo records and rollback (Undo)
records.
We are validating the Undo record number relating to the change being
applied against the maximum undo record number recorded in the undo block.
This error is reported when the validation fails.
ARGUMENTS:
Arg [a] Maximum Undo record number in Undo block
Arg [b] Undo record number from Redo block
A mismatch has been detected between Redo records and rollback (Undo) records.
BBED> set file 1 block 128
FILE# 1
BLOCK# 128 BBED> p ktuxc
struct ktuxcfbp[], 12 bytes @4192
struct ktufbuba, 8 bytes @4192
ub4 kubadba @4192 0x0040022a
ub2 kubaseq @4196 0x001d
ub1 kubarec @4198 0x14
sb2 ktufbext @4200 5
sb2 ktufbspc @4202 2342 修改ub1 kubarec @4198 0x14
modify /x 24 offset 4198
sum apply
--修复ORA-600 [4194]
BBED> modify /x 00 offset 4168
BBED> modify /x 0x00000000 offset 4192
sum apply

ORA-600[4193]/[4194]错误总结
从上面测试可以得出:ORA-600[4194]/[4193],====>UNDO问题!
ORA-600[4193] :表示undo和redo不一致(Arg [a] Undo record seq number,Arg [b] Redo record seq number );
ORA-600[4194] :表示也是undo和redo不一致(Arg [a] Maximum Undo record number in Undo block,Arg [b] Undo record number from Redo block)

ORA-600[4193]/[4194]错误解决思路
方法一(推荐使用)

1.修改参数
undo_management= MANUAL
undo_tablespace= SYSTEM
2.打开数据库,删除当前undo空间,重建新undo空间
3.修改参数
undo_management= AUTO
undo_tablespace= UNDOTBSNEW
4.重新启动数据库

方法二(隐含参数)

1.利用隐含参数_offline_rollback_segments和_corrupted_rollback_segments屏蔽掉有问题的undo segment,然后打
开数据库,最后重建undo或者drop掉损坏的回滚段即可
undo_management='MANUAL'
*._offline_rollback_segments=('_SYSSMU1_2820145294$','_SYSSMU2_3242179461$','_SYSSMU3_2848625369$','_SYSSMU4_2009059248$','_SYSSMU5_2273177123$','_SYSSMU6_2776392018$','_SYSSMU7_3805255807$','_SYSSMU8_191510003$','_SYSSMU9_4104046564$','_SYSSMU10_2094815206$')
*._corrupted_rollback_segments=(_SYSSMU1$, _SYSSMU2$, _SYSSMU3$, _SYSSMU4$, _SYSSMU5$,_SYSSMU6$, _SYSSMU7$, _SYSSMU8$, _SYSSMU9$, _SYSSMU10$) # strings system01.dbf | grep _SYSSMU | cut -d $ -f 1 | sort
启动db后,创建新的undo表空间,并切换,修改pfile,创建pfile,在正常启动,删除_corrupted_rollback_segments参数 2.继续可能出现ora-600[],需要推进scn
alter session set events '10015 trace name adjust_scn level 1';

方法三 BBEED
1.modify /x 00 offset 4168
2.modify /x 00000000 offset 4192

10 oracle bbed恢复ora-600[4193][4194]的错误的更多相关文章

  1. Oracle bbed 实用示例-----修改Data内容、恢复delete的rows

    bbed 可以在db open 状态来进行修改,但是建议在做任何修改操作之前先shutdown db. 这样避免checkpoint 进程重写bbed 对block 的修改. 也避免oracle 在b ...

  2. Oracle特殊恢复原理与实战(DSI系列)

    1.深入浅出Oracle(DSI系列Ⅰ) 2.Oracle特殊恢复原理与实战(DSI系列Ⅱ) 3.Oracle SQL Tuning(DSI系列Ⅲ)即将开设 4.Oracle DB Performan ...

  3. 将oracle冷备份恢复到另外一个数据库实例中

    因更换服务器需要将Oracle数据库转移到另外台Oracle中.说明: 1.测试环境为:windows server2003 和 oracle 10g. 2.2台服务器安装的程序目录一样,数据目录不一 ...

  4. Oracle bbed使用说明2---常用命令

    一.BBED常用命令说明 先看帮助的说明 BBED> help all SET DBA [ dba | file#, block# ] SET FILENAME 'filename' SET F ...

  5. 使用BBED恢复数据文件头

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/31018075 @@@@@@@利用BBED模拟损坏5文件1号块(文件头) BBED> ...

  6. oracle数据库恢复与备份

    一.oracle数据库恢复 1.恢复刚才删除的一条数据 delete from emp e where e.empname='SMITH' select * from flashback_transa ...

  7. 利用BBED恢复UPDATE改动前的值

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/30615151 实验步骤例如以下: 1.创建表guo_test1 gyj@PROD> ...

  8. [20190226]测试使用bbed恢复索引.txt

    [20190226]测试使用bbed恢复索引.txt --//上午做tab$删除恢复测试时发现,tab$的索引i_tab1很小.可以尝试使用bbed解决这个问题.--//首先在普通表上做一个测试看看. ...

  9. 利用BBED恢复数据文件头

    转载请注明出处:http: @@@@@@@利用BBED模拟损坏5文件1号块(文件头) BBED block block ) Block: Dba:0x01400001 ---------------- ...

随机推荐

  1. Nagios-Nagios-Nagios系统监控(centos7部署源码)

    一.Nagios简介 Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报 ...

  2. DirectX屏幕捕获和输出视频

    #include <Windows.h> #include <mfapi.h> #include <mfidl.h> #include <Mfreadwrit ...

  3. Windows10家庭版的功能中没有Hyper-V的解决方法

    1.在桌面新建记事本 将下面的内容复制到编辑器或者记事本当中 pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages\*Hyper ...

  4. 常用数列总结&性质记录

    1.斐波那契数列 P.S.:这里首项下标为 1 递推式:\[F_i=F_{i-1}+F_{i-2},F_1=F_2=1\] 性质: \(1.\sum^{n}_{i=1}F_{i}=F_{n+2}-1\ ...

  5. 百度地图api的简单应用(二):轻量级路径规划

    同上篇的原理,我们还是输入url,返回json文件. 而由图可见,路径规划返回的json文件内容可能会很多.杂: 因此后续的处理与上篇略有不同. import json import requests ...

  6. NOIP2016提高A组五校联考2总结

    第一题用组合数各种乱搞,其恶心程度不一般.搞了很久才调对,比赛上出了一点bug,只拿了30分. 第二题我乱搞得出个错误的结论,本来自信满满60分,结果爆零了. 第三题,树形dp,在一开始的时候想到了, ...

  7. JS中for循环嵌套

    for 循环 for语句也是一种前测试循环语句,但它具有在 执行循环之前初始化变量 和 定义循环后要执行的代码的能力 for循环中专门提供了位置来放置循环的三个表达式 定义一个循环需要做实现这三步: ...

  8. postman添加测试

    我们有的时候可能需要登陆才能使用下面的接口 解决方案.在浏览器中找到cookie.然后放在postman中的Headers中

  9. Mysql基本原理和概念

    一.引言 随着互联网应用的广泛普及,海量数据的存储和访问成为了系统设计的瓶颈问题.对于一个大型的互联网应用,每天几十亿的PV无疑对数据库造成了相当高的负载.对于系统的稳定性和扩展性造成了极大的问题.通 ...

  10. Python 爬虫十六式 - 第二式:urllib 与 urllib3

    Python请求标准库 urllib 与 urllib3 学习一时爽,一直学习一直爽!   大家好,我是 Connor,一个从无到有的技术小白.上一次我们说到了什么是HTTP协议,那么这一次我们就要动 ...