经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Oracle » 查看文章
Oracle【ORA-00600 internal error code arguments [2662]】恢复一例
来源:cnblogs  作者:东瑜  时间:2024/5/6 16:15:55  对本文有异议

背景

  • 1.数据库版本:11.2.0.4
  • 2.未开启归档
  • 3.没有备份:无RMAN备份、无DUMP备份
  • 4.数据库redo log全部删除。

解决思路:

  1. Oracle 的隐含参数:
  2. _allow_resetlogs_corruption=TRUE
  3. SYS>alter system set "_allow_resetlogs_corruption"=true scope=spfile;
  4. 数据库关闭数据库,在启动
  5. SQL> shutdown immediate;
  6. SQL> startup

出现如下错误:

  1. ORA-01092: ORACLE instance terminated. Disconnection forced
  2. ORA-00600: internal error code, arguments: [2662], [0], [1030200641], [0],
  3. [1030304018], [12583040], [], [], [], [], [], []
  4. Process ID: 31791
  5. Session ID: 694 Serial number: 5

问题的原因解释:数据库损坏之后,使用_allow_resetlogs_corruption 不一定能打开。也会出现如上的问题。其中[2662]代表的意思如下:ORA-600 [2662]"Block sCN is ahead of Current SCN

说明当前数据库的数据块保存的SCN大于当前的SCN,因为Current SCN会和dependent SCN进行比比较。如果[Current SCN] <[dependent SCN],那么数据库就会产生这个ORA-600[2662]的错误了。这个错误一共有五个参数,分别代表不同的含义,

  • ORA-600 [2662] [a] [b] [c] [d] [e]
  • Arg [a] Current SCN WRAP
  • Arg [b]Current SCN BASE
  • Arg [c] dependent SCN WRAP
  • Arg [d] dependent SCN BASE(数据库块的SCN)

我这边故障的数据库。当前的SCN为[1030200641],而数据库依赖的dependent SCN为[1030304018]。
所以,数据库需要不断推进SCN号,才能正常启动。

实战操作的思路

由于数据库,不断的重启,会不断推进SCN号,直到大于依赖的SCN号。如下:

第一次启动

SCN号为[1030220646],SCN号往前走了20000多。

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 835104768 bytes
  4. Fixed Size 2217952 bytes
  5. Variable Size 671090720 bytes
  6. Database Buffers 155189248 bytes
  7. Redo Buffers 6606848 bytes
  8. Database mounted.
  9. ORA-01092: ORACLE instance terminated. Disconnection forced
  10. ORA-00600: internal error code, arguments: [2662], [0], [1030220646], [0],
  11. [1030304018], [12583040], [], [], [], [], [], []
  12. Process ID: 32058
  13. Session ID: 694 Serial number: 5

第二次启动

SCN号为[1030240651],SCN号往前走了20000多。

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 835104768 bytes
  4. Fixed Size 2217952 bytes
  5. Variable Size 671090720 bytes
  6. Database Buffers 155189248 bytes
  7. Redo Buffers 6606848 bytes
  8. Database mounted.
  9. ORA-01092: ORACLE instance terminated. Disconnection forced
  10. ORA-00600: internal error code, arguments: [2662], [0], [1030240651], [0],
  11. [1030304018], [12583040], [], [], [], [], [], []
  12. Process ID: 32271
  13. Session ID: 694 Serial number: 5

第三次启动

SCN号为[1030260656],SCN号往前走了20000多

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 835104768 bytes
  4. Fixed Size 2217952 bytes
  5. Variable Size 671090720 bytes
  6. Database Buffers 155189248 bytes
  7. Redo Buffers 6606848 bytes
  8. Database mounted.
  9. ORA-01092: ORACLE instance terminated. Disconnection forced
  10. ORA-00600: internal error code, arguments: [2662], [0], [1030260656], [0],
  11. [1030304018], [12583040], [], [], [], [], [], []
  12. Process ID: 32460
  13. Session ID: 694 Serial number: 5

第N次启动

如此反复,不断推进。然后SCN号最终推进到[1030300665],和[1030304018]只相差了4000多。说明最后一次启动,SCN再推进20000,数据库应该能打开,

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 835104768 bytes
  4. Fixed Size 2217952 bytes
  5. Variable Size 671090720 bytes
  6. Database Buffers 155189248 bytes
  7. Redo Buffers 6606848 bytes
  8. Database mounted.
  9. ORA-01092: ORACLE instance terminated. Disconnection forced
  10. ORA-00600: internal error code, arguments: [2663], [0], [1030300665], [0],
  11. [1030304018], [], [], [], [], [], [], []
  12. Process ID: 450
  13. Session ID: 694 Serial number: 5

最后一次启动

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 835104768 bytes
  4. Fixed Size 2217952 bytes
  5. Variable Size 671090720 bytes
  6. Database Buffers 155189248 bytes
  7. Redo Buffers 6606848 bytes
  8. Database mounted.
  9. Database opened.

数据库正常启动,立马做出expdp导出操作,保障数据不丢失。

原文链接:https://www.cnblogs.com/zhangshengdong/p/18174653

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号