一、在异机NBU恢复后,目标库已经可以开库。但开发却通过PL/SQL Developer无法连接数据库。报错如下

ORA-00604: error occurred at recursive SQL level 1
ORA-01804: failure to initialize timezone information
00604. 00000 -  "error occurred at recursive SQL level %s"
*Cause:    An error occurred while processing a recursive SQL statement
           (a statement applying to internal dictionary tables).
*Action:   If the situation described in the next error on the stack
           can be corrected, do so; otherwise contact Oracle Support.
供应商代码 604

二、版本信息如下:

操作系统内核:Red Hat Enterprise Linux Server release 7.6 (Maipo)
数据库版本:oracle 11.2.0.4

三、问题描述:

PL/SQL Developer 连接测试用户,发现以上告警。同时切换system用户,连接告警相同。

ORA-00604:在递归SQL级别1发生错误。ORA-01804:在初始化时区信息 timezone 00604时失败。
00000-“在递归SQL级别%s发生错误” *原因:处理递归SQL语句时发生错误(一条语句 内部字典表)。
大概锁定到了事由于读取时区信息 timezone时候无法发生递归SQL操作导致通过客户端连接数据库失败。

四、查看数据库段告警日志

Thu Jan 07 10:17:30 2021
Errors in file /oracle/PRD/saptrace/diag/rdbms/prd/SIT/trace/SIT_m002_14323.trc  (incident=2688):
ORA-00600: internal error code, arguments: [qcisSetPlsqlCtx:tzi init], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /oracle/PRD/saptrace/diag/rdbms/prd/SIT/incident/incdir_2688/SIT_m002_14323_i2688.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.

五、那为什么会报这种ora-600错误呢,MOS上给出了答案

if DST_PRIMARY_TT_VERSION is for example “16” then check if
$ORACLE_HOME/oracore/zoneinfo or %ORACLE_HOME%\oracore\zoneinfo

  • contains timezone_16.dat and timezlrg_16.dat if not then apply the missing DSTv16 patch
  • the files are readable for the ORACLE OS user , if not adjust permissions

参考 MOS: ORA-600 [qcisSetPlsqlCtx:tzi init] after Database Restart (Doc ID 362036.1)

五、处理方法:

按照文档上,查看源端异机数据库

image.png

这样,目标端就必须有时区28版本的信息文件
检查目标端安装目录($ORACLE_HOME/oracore/zoneinfo)之后,果然没有这两个文件。

image.png

注意这里需要从源端吧28版本的文件COPY 过来。MOS 上特意注明不要
Again do NOT create yourself any timezlrg.dat and timezone.dat files or links.

然后重启数据库,数据库已经可以正常打开并且无告警。PL/SQL Developer可以正常连接数据库。

大功告成 ,OVER!

六、错误原因:
默认情况下,Oracle 11.2.0.1在软件安装中包含了从DSTv1到DSTv11的所有RDBMS DST更新。
默认情况下,Oracle 11.2.0.2到11.2.0.4在软件安装中包含了从DSTv1到DSTv14的所有RDBMS DST更新。
默认情况下,Oracle 12.1.0.1和12.1.0.2在软件安装中包含了从DSTv1到DSTv18的所有RDBMS DST更新。
可是源端却又28版版本PATCH,Oracle在验证DST PATCH 报错 ORA-00600: 内部错误代码, 参数: [qcisSetPlsqlCtx:tzi init]

扩展阅读:
用于更新11gR2或12c 数据库中的 RDBMS DST (时区)版本的脚本:

Scripts to update the RDBMS DST (timezone) version in an 11gR2 or 12c database . (Doc ID 1585343.1)
                          部分截取自互联网,如有侵权请与我联系。
                          wechat: 704012932
                          email:  pkweibu@163.com
                          CSDN:   https://blog.csdn.net/weixin_37423880
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐