[20150601]模拟ora-00600[2608]错误.txt

[20150601]模拟ora-00600[2608]错误.txt

--前几天在测试使用bbed解决丢失的归档,链接:
http://blog.itpub.net/267265/viewspace-1676438/ [20150529]使用bbed解决丢失的归档.txt
--出现如下错误:
ORA-00600: internal error code, arguments: [2608], [1], [2], [4101877000], [2], [4101877009], [], []

--不过后续的我做的操作在也没有出现这个错误.上午看了刘工的链接:
http://www.askmaclean.com/archives/oracle%E5%86%85%E9%83%A8%E9%94%99%E8%AF%AFora-00600-2608%E4%B8%80%E4%BE%8B.html

--自己重复模拟看看:
该ORA-00600[2608]可能由数据文件头中记录的checkpoint scn过小造成,Oracle会将该checkpoint scn与块中的resetlogs scn以及控制
文件中记录的日志文件的Low scn相比较,若文件头中的checkpoint scn远小于对比值,那么就会出现ORA-00600[2608]内部错误。

下面我们通过修改数据文件头中kcvfhckp结构中记录的checkpoint scn到一个较小值,来模拟出发ORA-00600[2608]内部错误:

1.测试环境:
SYS@test> @ &r/ver1

PORT_STRING                    VERSION        BANNER
------------------------------ -------------- ----------------------------------------------------------------
x86_64/Linux 2.4.xx            10.2.0.4.0     Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

--启动数据库到mount状态.
SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- ----------
           1        12691983312                     0  12691983312               0              0 SYSTEM
           2        12691983312                     0  12691983312               0              0 ONLINE
           3        12691983312                     0  12691983312               0              0 ONLINE
           4        12691983312                     0  12691983312               0              0 ONLINE
           5        12691983312                     0  12691983312               0              0 ONLINE
           6        12691983312                     0  12691983312     12691975496    12691983100 ONLINE

6 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ---------- ---------------- ---
           1        12691983312                5       12691748925 ONLINE            868465271 NO
           2        12691983312           600647       12691748925 ONLINE            868465271 NO
           3        12691983312             6678       12691748925 ONLINE            868465271 NO
           4        12691983312            10685       12691748925 ONLINE            868465274 NO
           5        12691983312           625439       12691748925 ONLINE            868465271 NO
           6        12691983312      11997383136       12691748925 ONLINE                  292 NO

6 rows selected.

SYS@test> @ &r/logfile
GROUP# THREAD# SEQUENCE#       BYTES MEMBERS ARC STATUS     FIRST_CHANGE# FIRST_TIME          GROUP# STATUS     TYPE       MEMBER                        IS_
------ ------- --------- ----------- ------- --- ---------- ------------- ------------------- ------ ---------- ---------- ----------------------------- ---
     1       1        40    52428800       1 YES INACTIVE     12691887202 2015-05-30 04:05:39      1            ONLINE     /mnt/ramdisk/test/redo01.log  NO
     2       1        41    52428800       1 NO  CURRENT      12691935321 2015-05-31 10:08:21      2            ONLINE     /mnt/ramdisk/test/redo02.log  NO
     3       1        39    52428800       1 YES INACTIVE     12691855595 2015-05-29 10:32:22      3            ONLINE     /mnt/ramdisk/test/redo03.log  NO

--当前数据文件6的scn是12691983312.
12691983312-2^33=4102048720
4102048720 = 0xf4804bd0

0xf4700000 = 4100980736
4100980736+2^33=12690915328
修改为 0xf4700000

--RESETLOGS_CHANGE#
12691748925-2^33=4101814333
4101814333 = 0xf47cb83d

----我准备将scn最后4位修改为f4804bd0=>0xf4700000看看(比RESETLOGS_CHANGE#小).(注意我的测试环境wrap=2,要扣除2^32*2)

2.bbed修改:

BBED> set dba 6,1
        DBA             0x01800001 (25165825 6,1)

BBED> p kcvfh.kcvfhrls
struct kcvfhrls, 8 bytes                    @116
   ub4 kscnbas                              @116      0xf47cb83d
   ub2 kscnwrp                              @120      0x0002

--resetlogset scn,与前面的正好对上.
f47cb83d  = 4101814333
4101814333+2^33=12691748925
-----

BBED> p kcvfh.kcvfhckp
struct kcvfhckp, 36 bytes                   @484
   struct kcvcpscn, 8 bytes                 @484
      ub4 kscnbas                           @484      0xf4804bd0
      ub2 kscnwrp                           @488      0x0002
   ub4 kcvcptim                             @492      0x3486c9dc
   ub2 kcvcpthr                             @496      0x0001
   union u, 12 bytes                        @500
      struct kcvcprba, 12 bytes             @500
         ub4 kcrbaseq                       @500      0x00000029
         ub4 kcrbabno                       @504      0x00012fa6
         ub2 kcrbabof                       @508      0x0010
   ub1 kcvcpetb[0]                          @512      0x02
   ub1 kcvcpetb[1]                          @513      0x00
   ub1 kcvcpetb[2]                          @514      0x00
   ub1 kcvcpetb[3]                          @515      0x00
   ub1 kcvcpetb[4]                          @516      0x00
   ub1 kcvcpetb[5]                          @517      0x00
   ub1 kcvcpetb[6]                          @518      0x00
   ub1 kcvcpetb[7]                          @519      0x00

BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4804bd0

--要颠倒1下.
BBED> modify /x 0000
...

BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4800000

BBED> set offset +2
        OFFSET          486

BBED> modify /x 70f4
...
BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4800000

BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4700000

BBED> sum apply ;
Check value for File 6, Block 1:
current = 0x28e6, required = 0x28e6

3.开始测试:
SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- ----------
           1        12691983312                     0  12691983312               0              0 SYSTEM
           2        12691983312                     0  12691983312               0              0 ONLINE
           3        12691983312                     0  12691983312               0              0 ONLINE
           4        12691983312                     0  12691983312               0              0 ONLINE
           5        12691983312                     0  12691983312               0              0 ONLINE
           6        12691983312                     0  12691983312     12691975496    12691983100 ONLINE

6 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ---------- ---------------- ---
           1        12691983312                5       12691748925 ONLINE            868465271 NO
           2        12691983312           600647       12691748925 ONLINE            868465271 NO
           3        12691983312             6678       12691748925 ONLINE            868465271 NO
           4        12691983312            10685       12691748925 ONLINE            868465274 NO
           5        12691983312           625439       12691748925 ONLINE            868465271 NO
           6        12690915328      11997383136       12691748925 ONLINE                  292 NO

6 rows selected.

SYS@test> alter database open ;
alter database open
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [3619], [1], [0], [], [], [], [], []

SYS@test> select open_mode from v$database ;
OPEN_MODE
----------
MOUNTED

SYS@test> recover datafile 6;
ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [2608], [2], [2], [4100980736], [2], [4102000729], [], []

--第2个参数2,标识log group#(我猜测的)
--第3个参数wrap,第4个参数base scn. 文件头CHECKPOINT_CHANGE#.
--第5个参数wrap,第6个参数base scn. 这个值是log group# =2 ,FIRST_CHANGE#.

2^33+4100980736=12690915328
2^33+4102000729=12691935321

4.还原现场:
BBED> set dba 6,1
        DBA             0x01800001 (25165825 6,1)

BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4700000

BBED> modify /x d04b
..

BBED> set offset +2
        OFFSET          486

BBED> modify /x 80f4

BBED> p kcvfh.kcvfhckp.kcvcpscn.kscnbas
ub4 kscnbas                                 @484      0xf4804bd0

BBED> sum apply ;
Check value for File 6, Block 1:
current = 0x254d, required = 0x254d

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- ----------
           1        12691983312                     0  12691983312               0              0 SYSTEM
           2        12691983312                     0  12691983312               0              0 ONLINE
           3        12691983312                     0  12691983312               0              0 ONLINE
           4        12691983312                     0  12691983312               0              0 ONLINE
           5        12691983312                     0  12691983312               0              0 ONLINE
           6        12691983312                     0  12691983312     12691975496    12691983100 ONLINE

6 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ---------- ---------------- ---
           1        12691983312                5       12691748925 ONLINE            868465271 NO
           2        12691983312           600647       12691748925 ONLINE            868465271 NO
           3        12691983312             6678       12691748925 ONLINE            868465271 NO
           4        12691983312            10685       12691748925 ONLINE            868465274 NO
           5        12691983312           625439       12691748925 ONLINE            868465271 NO
           6        12691983312      11997383136       12691748925 ONLINE                  292 NO

6 rows selected.

SYS@test> shutdown immediate ;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SYS@test> startup mount
ORACLE instance started.
Total System Global Area    473956352 bytes
Fixed Size                    2084776 bytes
Variable Size               260046936 bytes
Database Buffers            201326592 bytes
Redo Buffers                 10498048 bytes
Database mounted.

SYS@test> alter database open ;
Database altered.

SYS@test> select * from scott.deptx;
      DEPTNO DNAME          LOC
------------ -------------- -------------
          10 ACCOUNTING     NEW YORK
          20 RESEARCH       DALLAS
          30 SALES          CHICAGO
          40 OPERATIONS     BOSTON

时间: 2024-10-10 14:47:22

[20150601]模拟ora-00600[2608]错误.txt的相关文章

[20160203]ora-04031错误.txt

[20160203]ora-04031错误.txt --生产系统10g的数据库,修改为手工内存管理后出现ora-04031错误,自己手工模拟看看: 1.环境: SYS@test> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- -------------------------------------------------

[20150601]rman备份出现坏块.txt

[20150601]rman备份出现坏块.txt --昨天看链接: http://www.jydba.net/磁盘损坏造成RMAN备份文件有坏块的恢复案例/ --提到如果备份片存在坏块的恢复案例,他使用的参数,我自己从来没见过. alter system set event='19548 trace name context forever', '19549 trace name context forever' scope=spfile; -- oerr ora 19548,oerr ora

[20160910]低级错误.txt

[20160910]低级错误.txt --记录一个低级错误,要在表ms_yyhy中增加一个字段fyxh,并且要与同步ms_ysks.fyxh相关记录保持一直. --我同事在测试环境下,执行如下: UPDATE ms_yyhy    SET fyxh =           (SELECT fyxh              FROM ms_ysks             WHERE     ms_yyhy.ysdm = ms_ysks.ysdm                   AND ms

[20170315]ORA-19656错误.txt

[20170315]ORA-19656错误.txt --//上午删除测试数据库的归档日志,遇到ORA-19656,做一个记录. 1.环境: SYS@book> @ &r/ver BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Produ

[20140429]ORA-01665 错误.txt

[20140429]ORA-01665 错误.txt $ oerr ora 1665 01665, 00000, "control file is not a standby control file" // *Cause:  Attempting to mount, recover or activate a standby database //          without a standby control file. // *Action: Create a standb

[20120929]ora-55605错误.txt

[20120929]ora-55605错误.txt 昨天在测试机器查看进程,发现一个进程. $ ps -ef | grep fbda 503      13583     1  0 09:27 ?        00:00:00 ora_fbda_test 503      14502 14465  0 09:43 pts/2    00:00:00 grep fbda 查看alert.log也能发现这个进程的启动,我查看以前的日志,发现并没有启动. 我记得当时测试时使用的表空间我前几天已经删除

[20130528]tnsnames.ora的格式问题.txt

[20130528]tnsnames.ora的格式问题.txt --注:为了blog的显示问题,空格使用下划线. 40X =(DESCRIPTION =_(ADDRESS_LIST =_(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.40)(PORT = 1521))_)_(CONNECT_DATA =__(SERVER = DEDICATED)__(SERVICE_NAME = test.com))) 使用上面的连接数据库,会出现:ERROR:OR

【BBED】BBED模拟并修复ORA-08102错误

[BBED]BBED模拟并修复ORA-08102错误   1.1  BLOG文档结构图     1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 使用BBED修复ORA-08102错误(重点) ② BBED的使用 ③ 数据块格式的dump文件解释 ④ ORA-08102错误的trace文件解释 ⑤ 从rdba获取ROWID信息 ⑥ 其它实用技能   Tips: ① 本文在itpub(h

请求-有赞模拟登陆返回500错误

问题描述 有赞模拟登陆返回500错误 1C 我用浏览器打开时正常的,但是在程序中为什么就返回500错误了呢?具体代码如下:地址:http://koudaitong.com/v2/account/user/login /// <summary>/// 获取验证码private void 登陆_Load(object sender EventArgs e){txtUserName.Text=""18076549077"";txtPwd.Text="