Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 网络资源 > How to deal with ORA-600 2662 Error
【标  题】:How to deal with ORA-600 2662 Error
【关键字】:How,to,deal,with,ORA-600,2662,Error
【来  源】:http://www.cublog.cn/u/10757/showart.php?id=143604

How to deal with ORA-600 2662 Error

Your Ad Here

转自:http://www.eygle.com/archives/2005/12/oracle_diagnostics_howto_deal_2662_error.html

ORA-00600 2262错误解决一文中,我曾经提到过,很多时候使用隐含参数_ALLOW_RESETLOGS_CORRUPTION后resetlogs打开数据库,我们可能会由于SCN不一致而遭遇到ORA-00600 2662号错误,这里给出一个完整的例子及解决过程。

当然模拟2662错误需要技巧,本文并不会涉及这个内容。

通过正常方式启动数据库时,从alert文件中,我们可以看到ora-00600 2662号错误。

Sun Dec 11 18:02:25 2005
Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:
ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []
Sun Dec 11 18:02:27 2005
Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:
ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []
Sun Dec 11 18:02:27 2005
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600

此时我们可以通过Oracle的内部事件来调整SCN:

增进SCN有两种常用方法:

1.通过immediate trace name方式(在数据库Open状态下)

alter session set events 'IMMEDIATE trace name ADJUST_SCN level x';

2.通过10015事件(在数据库无法打开,mount状态下)

alter session set events '10015 trace name adjust_scn level x';

注:level 1为增进SCN 10亿 (1 billion) (1024*1024*1024),通常Level 1已经足够。也可以根据实际情况适当调整。

本例由于数据库无法打开,只能使用的二种方法。

[oracle@jumper dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=initconner.ora
ORACLE instance started.
Total System Global Area   97588504 bytes
Fixed Size                   451864 bytes
Variable Size              33554432 bytes
Database Buffers           62914560 bytes
Redo Buffers                 667648 bytes
Database mounted.
SQL> alter session set events '10015 trace name adjust_scn level 10';
Session altered.
SQL> alter database open;
Database altered.

注意,由于我使用了10015事件,使得SCN增进了10 billion,稍后我们可以验证。 

[oracle@jumper dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=initconner.ora
ORACLE instance started.
Total System Global Area   97588504 bytes
Fixed Size                   451864 bytes
Variable Size              33554432 bytes
Database Buffers           62914560 bytes
Redo Buffers                 667648 bytes
Database mounted.
SQL> alter session set events '10015 trace name adjust_scn level 10';
Session altered.
SQL> alter database open;
Database altered.

此时数据库可以打开,从alert文件中我们可以看到如下提示:

Sun Dec 11 18:27:04 2005
SMON: enabling cache recovery
Sun Dec 11 18:27:05 2005
Debugging event used to advance scn to 10737418240

SCN被增进了10 billion,即 10 * (1024*1024*1024) = 10737418240,正好是日志里记录的数量。

我们从数据库内部看一下检查点的增进情况:

SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
SQL> select file#,CHECKPOINT_CHANGE# from v$datafile;
     FILE# CHECKPOINT_CHANGE#
---------- ------------------
         1          547783998
         2          547783998
         3          547783998
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area   97588504 bytes
Fixed Size                   451864 bytes
Variable Size              33554432 bytes
Database Buffers           62914560 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL> select file#,CHECKPOINT_CHANGE# from v$datafile;
     FILE# CHECKPOINT_CHANGE#
---------- ------------------
         1         1.0737E+10
         2         1.0737E+10
         3         1.0737E+10
SQL> col CHECKPOINT_CHANGE# for 99999999999999999
SQL>  select file#,CHECKPOINT_CHANGE# from v$datafile;
     FILE# CHECKPOINT_CHANGE#
---------- ------------------
         1        10737418447
         2        10737418447
         3        10737418447

我们看到CHECKPOINT_CHANGE# 最终被增进了10 Billion.这要是账户上的钱该有多好

oracle联机热备份的原理:【上一篇】
NBU异机恢复ORACLE 数据库.:【下一篇】
【相关文章】
  • 51CTO存储专家:解读存储虚拟化
  • Telnet to PIX Firewall From Outside Interface
  • linux AS4+apache+tomcat整合
  • Navigator对象
  • System Administrators Toolkit: Monitoring a slow s
  • How-to: OpenBSD 3.8+Apache+PHP+MySQL
  • Secure dynamic DNS howto
  • How to Use RAM as Swap
  • 用rdesktop链接windows的远程桌面
  • Solaris 9 编译cyrus-sasl-2.1.20 时候提示 "digestmd5.c:77: des.h: No such file or directory" 的解决
  • 【随机文章】
  • ISA系列谈
  • EhLib 3.3 汉化版 (增加排序)
  • Samba服务器的使用(二)
  • Pro visual c++/cli and .net 2.0 platform2 学习笔记(12 第九章到第十二章)
  • Properties的store()方法和load()方法 示例
  • 用ASP读INI配置文件的函数
  • UPS电源滤波质量下降,接地通路故障,谐波大量涌入系统,导致网络变慢、数据出错
  • 网卡网络配置基础
  • 个人安全三部曲
  • 服务器硬盘
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.