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

简介: [20170518]模拟ora-00600[2608]错误2.txt --//以前模拟过ora-00600[2608]错误.链接http://blog.itpub.net/267265/viewspace-1680801/ --//当时基本按照刘工的帖子重复测试.

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

--//以前模拟过ora-00600[2608]错误.链接http://blog.itpub.net/267265/viewspace-1680801/
--//当时基本按照刘工的帖子重复测试.按照刘工文章介绍:

该ORA-00600[2608]可能由数据文件头中记录的checkpoint scn过小造成,Oracle会将该checkpoint scn与块中的resetlogs scn以及控制
文件中记录的日志文件的Low scn相比较,若文件头中的checkpoint scn远小于对比值,那么就会出现ORA-00600[2608]内部错误。
下面我们通过修改数据文件头中kcvfhckp结构中记录的checkpoint scn到一个较小值,来模拟出发ORA-00600[2608]内部错误:

--//不过当时我为了测试使用bbed解决丢失的归档,链接http://blog.itpub.net/267265/viewspace-1676438/.
--//我数据文件的checkpoint scn不会小于resetlogs scn.而且并不是次次出现,今天重复原来的测试.

1.环境:

SYS@book> @ &r/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

--//正常关闭数据库,重启到mount.
SYS@book> startup mount
ORACLE instance started.
Total System Global Area  634732544 bytes
Fixed Size                  2255792 bytes
Variable Size             197133392 bytes
Database Buffers          427819008 bytes
Redo Buffers                7524352 bytes
Database mounted.

SYS@book> @ &r/logfile
GROUP# STATUS     TYPE       MEMBER                           IS_ GROUP# THREAD# SEQUENCE#       BYTES BLOCKSIZE MEMBERS ARC STATUS     FIRST_CHANGE# FIRST_TIME          NEXT_CHANGE# NEXT_TIME
------ ---------- ---------- -------------------------------- --- ------ ------- --------- ----------- --------- ------- --- ---------- ------------- ------------------- ------------ -------------------
     1            ONLINE     /mnt/ramdisk/book/redo01.log     NO       1       1       764    52428800       512       1 NO  CURRENT      13277712320 2017-05-18 08:56:52 2.814750E+14
     2            ONLINE     /mnt/ramdisk/book/redo02.log     NO       2       1       762    52428800       512       1 YES INACTIVE     13277651683 2017-05-17 20:23:55  13277663643 2017-05-17 22:00:19
     3            ONLINE     /mnt/ramdisk/book/redo03.log     NO       3       1       763    52428800       512       1 YES INACTIVE     13277663643 2017-05-17 22:00:19  13277712320 2017-05-18 08:56:52
     4            STANDBY    /mnt/ramdisk/book/redostb01.log  NO
     5            STANDBY    /mnt/ramdisk/book/redostb02.log  NO
     6            STANDBY    /mnt/ramdisk/book/redostb03.log  NO
     7            STANDBY    /mnt/ramdisk/book/redostb04.log  NO
7 rows selected.
--//最小的scn是group#=2,FIRST_CHANGE#=13277651683.

SYS@book> SELECT file#, CHECKPOINT_CHANGE#, CHECKPOINT_TIME,CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy,name,tablespace_name  FROM v$datafile_header;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME     CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ NAME                             TABLESPACE_NAME
----- ------------------ ------------------- ---------------- ----------------- ---------- ---------------- --- -------------------------------- --------------------
    1        13277716139 2017-05-18 09:46:41                7            925702 ONLINE                  953 NO  /mnt/ramdisk/book/system01.dbf   SYSTEM
    2        13277716139 2017-05-18 09:46:41             1834            925702 ONLINE                  942 NO  /mnt/ramdisk/book/sysaux01.dbf   SYSAUX
    3        13277716139 2017-05-18 09:46:41           923328            925702 ONLINE                  863 NO  /mnt/ramdisk/book/undotbs01.dbf  UNDOTBS1
    4        13277716139 2017-05-18 09:46:41            16143            925702 ONLINE                  948 NO  /mnt/ramdisk/book/users01.dbf    USERS
    5        13277716139 2017-05-18 09:46:41           952916            925702 ONLINE                  859 NO  /mnt/ramdisk/book/example01.dbf  EXAMPLE
    6        13277716139 2017-05-18 09:46:41      13276257767            925702 ONLINE                  333 NO  /mnt/ramdisk/book/tea01.dbf      TEA
6 rows selected.

--//我修改数据文件6的CHECKPOINT_CHANGE#=13277651680,看看.

2.bbed修改:

select 13277716139,trunc(13277716139/power(2,32)) scn_wrap,mod(13277716139,power(2,32))  scn_base from dual
13277716139     SCN_WRAP     SCN_BASE SCN_WRAP16 SCN_BASE16
------------ ------------ ------------ ---------- ----------
13277716139            3    392814251          3   1769deab

select 13277651680,trunc(13277651680/power(2,32)) scn_wrap,mod(13277651680,power(2,32))  scn_base from dual
13277651680     SCN_WRAP     SCN_BASE SCN_WRAP16 SCN_BASE16
------------ ------------ ------------ ---------- ----------
13277651680            3    392749792          3   1768e2e0

BBED> p dba 6,1 kcvfh.kcvfhckp.kcvcpscn
struct kcvcpscn, 8 bytes                    @484
   ub4 kscnbas                              @484      0x1769deab
   ub2 kscnwrp                              @488      0x0003

BBED> assign dba 6,1 kcvfh.kcvfhckp.kcvcpscn.kscnbas=0x1768e2e0
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
ub4 kscnbas                                 @484      0x1768e2e0


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

BBED> verify dba 6,1
DBVERIFY - Verification starting
FILE = /mnt/ramdisk/book/tea01.dbf
BLOCK = 1

SYS@book> SELECT file#, CHECKPOINT_CHANGE#, CHECKPOINT_TIME,CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy,name,tablespace_name  FROM v$datafile_header;
FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME     CREATION_CHANGE# RESETLOGS_CHANGE# STATUS     CHECKPOINT_COUNT FUZ NAME                             TABLESPACE_NAME
----- ------------------ ------------------- ---------------- ----------------- ---------- ---------------- --- -------------------------------- --------------------
    1        13277716139 2017-05-18 09:46:41                7            925702 ONLINE                  953 NO  /mnt/ramdisk/book/system01.dbf   SYSTEM
    2        13277716139 2017-05-18 09:46:41             1834            925702 ONLINE                  942 NO  /mnt/ramdisk/book/sysaux01.dbf   SYSAUX
    3        13277716139 2017-05-18 09:46:41           923328            925702 ONLINE                  863 NO  /mnt/ramdisk/book/undotbs01.dbf  UNDOTBS1
    4        13277716139 2017-05-18 09:46:41            16143            925702 ONLINE                  948 NO  /mnt/ramdisk/book/users01.dbf    USERS
    5        13277716139 2017-05-18 09:46:41           952916            925702 ONLINE                  859 NO  /mnt/ramdisk/book/example01.dbf  EXAMPLE
    6        13277651680 2017-05-18 09:46:41      13276257767            925702 ONLINE                  333 NO  /mnt/ramdisk/book/tea01.dbf      TEA
--//ok,现在已经修改完成.

3.打开看看:
SYS@book> alter database open ;
alter database open
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [3619], [1], [0], [], [], [], [], [], [], [], [], []

SYS@book> recover database ;
ORA-00283: recovery session canceled due to errors
ORA-00600: internal error code, arguments: [2608], [1], [3], [392749792], [3], [392810432], [], [], [], [], [], []

--参数说明:

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

SYS@book> select power(2,32)*3+392810432 from dual;
POWER(2,32)*3+392810432
-----------------------
            13277712320

4.还原正常:

BBED> assign dba 6,1 kcvfh.kcvfhckp.kcvcpscn.kscnbas=0x1769deab
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
ub4 kscnbas                                 @484      0x1769deab

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

BBED> verify dba 6,1
DBVERIFY - Verification starting
FILE = /mnt/ramdisk/book/tea01.dbf
BLOCK = 1

SYS@book> alter database open ;
Database altered.

--//说明文件头中的checkpoint scn远小于当前redo 的的scn,就出现问题.

目录
相关文章
|
Oracle 关系型数据库 数据库管理
20180228手工模拟ORA-00600:[13013] [5001]
[20180228]手工模拟ORA-00600:[13013] [5001]3.txt Oracle中表的数据块由块头、事务槽、行字典、行数据等多种结构组成。 行数据(rowdata)实际是由许多row piece 行片组成的,每一条 row piece的头部都有flag、locks、cols(cc)三个标志位。
1198 0
|
Oracle 关系型数据库 数据库
|
Oracle 关系型数据库 Linux
[20171109]简单探究文件ab_ASM_SID.dat.txt
[20171109]简单探究文件ab_ASM_SID.dat.txt --//昨天看了一篇Solving Communication problems between DB and ASM instances.
1398 0
|
SQL 测试技术
解决导入过程中出现的ORA-02289错误
用expdp导出生产库数据到测试库,执行impdp的时候报了ORA-02298错误,提示生效TBL_B表的外键约束FK_B_ID的时候出错, 看看ORA-02298的错误描述,因为存在独立的字节点记录,导致生效约束操作报错, 通俗一些,就是子表外键对应的主表主键/唯一约束键值不存在,所以此时无法生效外键约束。
1373 0
|
Oracle 关系型数据库 数据库
[20170512]ora-00600[2662]错误3.txt
[20170512]ora-00600[2662]错误3.txt --//前一阵子的测试:链接http://blog.itpub.net/267265/viewspace-2137424/ --//本想测试修改一些重要的信息块,结果提升了scn的结果,但是如果异常关闭,就没有这样的结果.
1098 0
|
监控 Oracle 关系型数据库
[20170315]ORA-19656错误.txt
[20170315]ORA-19656错误.txt --//上午删除测试数据库的归档日志,遇到ORA-19656,做一个记录. 1.环境: SYS@book> @ &r/ver BANNER ----------------------------...
828 0
|
Oracle 关系型数据库 测试技术
[20170207]RMAN-06820错误.txt
[20170207]RMAN-06820 WARNING failed to archive current log at primary database.txt --//生产系统越来越大,备份的时间窗口越来越长,现在生产系统全备从晚上11点开始,基本到第2天早上8点多才结束.
1249 0
|
Oracle 关系型数据库 数据库管理
[20170104]ORA-08103错误的模拟和诊断.txt
[20170104]ORA-08103错误的模拟和诊断.txt 参考连接http://www.oratea.com/2016/12/10/ora-08103%e9%94%99%e8%af%af%e7%9a%84%e6%a8%a1%e6%8b%9f%e5%92%8c%...
1204 0