ORA-00600 [2662] 错误

前面一篇文章介绍 使用oradebug增进scn,如果缩减scn会怎么样呢?
SQL> oradebug setmypid
Statement processed.
SQL> oradebug dumpvar sga kcsgscn_
kcslf kcsgscn_ [060019360, 060019390) = 80000C2A 00000000 00000000 00000000 00000445 00000000 00000000 00000000 00000000 00000000 60019040 00000000
当前SCN为2G左右,我们缩减到1G
SQL> oradebug poke 0x060019360 4 0x40000000
BEFORE: [060019360, 060019364) = 80000C37
AFTER:  [060019360, 060019364) = 40000000
SQL>  oradebug dumpvar sga kcsgscn_
kcslf kcsgscn_ [060019360, 060019390) = 40000002 00000000 00000000 00000000 00000452 00000000 00000000 00000000 00000000 00000000 60019040 00000000
SQL>  oradebug dumpvar sga kcsgscn_
kcslf kcsgscn_ [060019360, 060019390) = 40000004 00000000 00000000 00000000 00000454 00000000 00000000 00000000 00000000 00000000 60019040 00000000
oradebug dumpvar显示有正常增进,此时我们执行alter system checkpoint将内存中的SCN写入控制文件和数据文件。
SQL> alter system checkpoint;
alter system checkpoint
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 25281
Session ID: 1549 Serial number: 23

此时发生Crash。
alert中内容如下:
Thu Oct 17 14:21:23 2013
Errors in file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_mmon_16647.trc  (incident=228215):
ORA-00600: internal error code, arguments: [ktcsna: min-act-scn > env-scn], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u/ora11g/diag/rdbms/bentest/bentest/incident/incdir_228215/bentest_mmon_16647_i228215.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Oct 17 14:21:24 2013
Restarting dead background process MMON
Thu Oct 17 14:21:24 2013
MMON started with pid=22, OS id=25423
Errors in file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_mmon_25423.trc  (incident=228216):
ORA-00600: internal error code, arguments: [ktcsna: min-act-scn > env-scn], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u/ora11g/diag/rdbms/bentest/bentest/incident/incdir_228216/bentest_mmon_25423_i228216.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Oct 17 14:21:25 2013
Dumping diagnostic data in directory=[cdmp_20131017142125], requested by (instance=1, osid=16647 (MMON)), summary=[incident=228215].
Errors in file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_mmon_25423.trc  (incident=228217):
ORA-00600: internal error code, arguments: [ktcsna: min-act-scn > env-scn], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u/ora11g/diag/rdbms/bentest/bentest/incident/incdir_228217/bentest_mmon_25423_i228217.trc
Dumping diagnostic data in directory=[cdmp_20131017142126], requested by (instance=1, osid=25423 (MMON)), summary=[incident=228216].
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Oct 17 14:21:33 2013
Errors in file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_ckpt_16632.trc  (incident=228191):
ORA-00600: internal error code, arguments: [2662], [0], [1073741831], [0], [2147486722], [0], [], [], [], [], [], []
Incident details in: /u/ora11g/diag/rdbms/bentest/bentest/incident/incdir_228191/bentest_ckpt_16632_i228191.trc
Dumping diagnostic data in directory=[cdmp_20131017142134], requested by (instance=1, osid=16632 (CKPT)), summary=[incident=228191].
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_ckpt_16632.trc:
ORA-00600: internal error code, arguments: [2662], [0], [1073741831], [0], [2147486722], [0], [], [], [], [], [], []
CKPT (ospid: 16632): terminating the instance due to error 469
System state dump requested by (instance=1, osid=16632 (CKPT)), summary=[abnormal instance termination].
System State dumped to trace file /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_diag_16567.trc
Instance terminated by CKPT, pid = 16632

这里可以发现:
1:mmon进程首先反应,报错ORA-00600: internal error code, arguments: [ktcsna: min-act-scn > env-scn], [], [], [], [], [], [], [], [], [], [], [],失败之后,重新启动了mmon进程。(这里从侧面也反应,mmon进程是可以被kill的,跟arch进程一样,会重新启动。
2:ckpt报错ORA-00600: internal error code, arguments: [2662], [0], [1073741831], [0], [2147486722], [0], [], [], [], [], [], [],实例中止。

看下详细的trace file内容:
mmon tracefile:
*** 2013-10-17 14:21:23.274
*** SESSION ID:(793.1) 2013-10-17 14:21:23.274
*** CLIENT ID:() 2013-10-17 14:21:23.274
*** SERVICE NAME:(SYS$BACKGROUND) 2013-10-17 14:21:23.274
*** MODULE NAME:() 2013-10-17 14:21:23.274
*** ACTION NAME:() 2013-10-17 14:21:23.274
 
Dump continued from file: /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_mmon_16647.trc
ORA-00600: internal error code, arguments: [ktcsna: min-act-scn > env-scn], [], [], [], [], [], [], [], [], [], [], []

========= Dump for incident 228215 (ORA 600 [ktcsna: min-act-scn > env-scn]) ========
----- Beginning of Customized Incident Dump(s) -----
env [0x7fffcca52bb0]: (scn: 0x0000.40000002  xid: 0x0000.000.00000000  uba: 0x00000000.0000.00  statement num=0  parent xid: 0x0000.
000.00000000  st-scn: 0x0000.00000000  hi-scn: 0x0000.00000000  ma-scn: 0x0000.80000c2b  flg: 0x00000040)
Start Dumping Min-Act Trace latched
ts:1381988510[10/17/2013 13:41:50] [1:1] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:918980568 min-scn: 0x0000.80000512 global-recent-s
cn: 0x0000.80000512 calc-scn: 0x0000.80000512
ts:1381988686[10/17/2013 13:44:46] [2:2] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.8000056f global-recent-scn: 0x00
00.8000056f calc-scn: 0x0000.8000056f
ts:1381988866[10/17/2013 13:47:46] [3:3] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.800005b0 global-recent-scn: 0x00
00.800005b0 calc-scn: 0x0000.800005b0
ts:1381989046[10/17/2013 13:50:46] [4:4] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.800005f0 global-recent-scn: 0x00
00.800005f0 calc-scn: 0x0000.800005f0
ts:1381989226[10/17/2013 13:53:46] [5:5] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000631 global-recent-scn: 0x00
00.80000631 calc-scn: 0x0000.80000631
ts:1381989406[10/17/2013 13:56:46] [6:6] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.8000066f global-recent-scn: 0x00
00.8000066f calc-scn: 0x0000.8000066f
ts:1381989586[10/17/2013 13:59:46] [7:7] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.800006b0 global-recent-scn: 0x00
00.800006b0 calc-scn: 0x0000.800006b0
ts:1381989766[10/17/2013 14:02:46] [8:8] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.8000097a global-recent-scn: 0x00
00.8000097a calc-scn: 0x0000.8000097a
ts:1381989947[10/17/2013 14:05:47] [9:9] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.800009c7 global-recent-scn: 0x00
00.800009c7 calc-scn: 0x0000.800009c7
ts:1381990126[10/17/2013 14:08:46] [10:10] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000a05 global-recent-scn: 0x
0000.80000a05 calc-scn: 0x0000.80000a05
ts:1381990306[10/17/2013 14:11:46] [11:11] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000a45 global-recent-scn: 0x
0000.80000a45 calc-scn: 0x0000.80000a45
ts:1381990486[10/17/2013 14:14:46] [12:12] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000a89 global-recent-scn: 0x
0000.80000a89 calc-scn: 0x0000.80000a89
ts:1381990666[10/17/2013 14:17:46] [13:13] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000bfa global-recent-scn: 0x
0000.80000bfa calc-scn: 0x0000.80000bfa
ts:1381990846[10/17/2013 14:20:46] [14:14] type:3 [MASTER UPD MIN-SCN] inst#:0 inc#:0 min-scn: 0x0000.80000c2b global-recent-scn: 0x
0000.80000c2b calc-scn: 0x0000.80000c2b
 grec-scn: 0x0000.80000c2b gmin-scn: 0x0000.80000c2b calc-scn: 0x0000.80000c2b
scn-map not available - probably slave
End Dumping Min-Act Trace
----- End of Customized Incident Dump(s) -----

*** 2013-10-17 14:21:23.353
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=772s25v1y0x8k) -----
select shared_pool_size_for_estimate s,          shared_pool_size_factor * 100 f,          estd_lc_load_time l, 0             from v
$shared_pool_advice

----- Call Stack Trace -----
...(后面省略)

ckpt tracefile:
*** 2013-10-17 14:21:33.494
*** SESSION ID:(685.1) 2013-10-17 14:21:33.494
*** CLIENT ID:() 2013-10-17 14:21:33.494
*** SERVICE NAME:(SYS$BACKGROUND) 2013-10-17 14:21:33.494
*** MODULE NAME:() 2013-10-17 14:21:33.494
*** ACTION NAME:() 2013-10-17 14:21:33.494
 
Dump continued from file: /u/ora11g/diag/rdbms/bentest/bentest/trace/bentest_ckpt_16632.trc
ORA-00600: internal error code, arguments: [2662], [0], [1073741831], [0], [2147486722], [0], [], [], [], [], [], []

========= Dump for incident 228191 (ORA 600 [2662]) ========

*** 2013-10-17 14:21:33.495
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- SQL Statement (None) -----
Current SQL information unavailable - no cursor.
...(下面省略)


重新启动实例,发现可以正常启动,SCN也恢复到之前正常的序列上来。

SQL> startup mount
ORACLE instance started.

Total System Global Area 4175568896 bytes
Fixed Size                  2233088 bytes
Variable Size            1560284416 bytes
Database Buffers         2566914048 bytes
Redo Buffers               46137344 bytes
Database mounted.
SQL> alter database open;

Database altered.

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
 2147506898


ORA-600 [1662]的说明信息 (取自ORA-600 [2662] "Block SCN is ahead of Current SCN" (Doc ID 28929.1)
VERSIONS:
  versions 6.0 to 10.1
 
DESCRIPTION:

  A data block SCN is ahead of the current SCN.

  The ORA-600 [2662] occurs when an SCN is compared to the dependent SCN
  stored in a UGA variable.

  If the SCN is less than the dependent SCN then we signal the ORA-600 [2662]
  internal error.

ARGUMENTS:
  Arg [a]  Current SCN WRAP
  Arg [b]  Current SCN BASE
  Arg [c]  dependent SCN WRAP
  Arg [d]  dependent SCN BASE
  Arg [e]  Where present this is the DBA where the dependent SCN came from.
 
FUNCTIONALITY:     
  File and IO buffer management for redo logs
 
IMPACT:
  INSTANCE FAILURE
  POSSIBLE PHYSICAL CORRUPTION
 
SUGGESTIONS:       
    
  There are different situations where ORA-600 [2662] can be raised.

  It can be raised on startup or duing database operation.

  If not using Parallel Server, check that 2 instances have not mounted
  the same database.

  Check for SMON traces and have the alert.log and trace files ready
  to send to support.

  Check the SCN difference [argument d]-[argument b].

  If the SCNs in the error are very close, then try to shutdown and startup
  the instance several times.

  In some situations, the SCN increment during startup may permit the
  database to open. Keep track of the number of times you attempted a
  startup.

  If the Known Issues section below does not help in terms of identifying
  a solution, please submit the trace files and alert.log to Oracle
  Support Services for further analysis.


在我们这个案例中:
ORA-00600: internal error code, arguments: [2662], [0], [1073741831], [0], [2147486722], [0], [], [], [], [], [], []

1073741831 < 2147486722

由于修改之后并没有写入成功,因此我们重新启动实例后,正常恢复了。

如果在日常环境中碰到此问题,可以根据下面的办法解决:
参考:http://www.xifenfei.com/1509.html
解决办法
1、如果SCN相差不多,可以通过多次重起数据库解决(每次加1)
2、通过10015 ADJUST_SCN事件来增进current SCN
1)计算level
1.1) Arg {c}* 4得出一个数值,假设为V_Wrap
1.2) 如果Arg [d]=0,则V_Wrap值为需要的level
Arg [d] < 1073741824,V_Wrap+1为需要的level
Arg [d] < 2147483648,V_Wrap+2为需要的level
Arg [d] < 3221225472,V_Wrap+3为需要的level
1.3)SCN被增进了1024*1024*1024*level(level*10 billion)

2)执行内部事件
alter session set events ’10015 trace name adjust_scn level N’;
注:mount状态下执行(open下无效)
或者
alter session set events 'IMMEDIATE trace name ADJUST_SCN level x';
注:open状态下执行

3:如果SCN相差加大,可以使用_minimum_giga_scn隐含参数来增进SCN
4:如果打了scn过度增长的补丁或者实施了 2012 JAN 的CPU 的情况下,

如果打了打上scn过度增长的补丁之后,或者应用了 2012 JAN 的CPU 的情况下,使用上面的event和隐含参数不能再用来提升SCN,此时可以使用oradebug来增进scn。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29154652/viewspace-774543/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29154652/viewspace-774543/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值