oracle 恢复后成功起库,但是做DDL相关的操作就会报ORA-00600的错误
<p>【环境信息】
Oracle 11.2.0.4
AB 7.0.18.2
【排查过程】
1.Oracle 异机恢复后数据库成功起库,但是做 create table,alter tablespace,create tablespace 等操作就会报错ORA-00600 [qcisSetPlsqlCtx:tzi init]
2.查看数据库的open_mode是读写模式,手动切归档也没有问题
3.查看alert日志,恢复完起库的时候日志中就有如下报错信息
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=f6f1efc902458d1592f1621a5bd5fb5b&amp;file=file.png" alt="" /></p>
<p>4.MOS中有一篇文章:</p>
<pre><code>ORA-600 [qcisSetPlsqlCtx:tzi init] after Database Restart (文档 ID 362036.1)
A) Oracle version 11.2 and higher:
A.1) check if the required DSt patch is applied/available in the $ORACLE_HOME
In 11.2 there are no timezlrg.dat and timezone.dat, this is normal and intended.
please do NOT make any symbolic links for timezlrg.dat and timezone.dat or copy any of the files in \oracore\zoneinfo\ and rename them to timezlrg.dat and timezone.dat
in 11.2 there should be NO timezlrg.dat and timezone.dat in $ORACLE_HOME/oracore/zoneinfo/ (unix) or %ORACLE_HOME%\oracore\zoneinfo\ (windows)
Oracle 11.2.0.1 has by default all RDBMS DST updates from DSTv1 to DSTv11 included in the software installation.
Oracle 11.2.0.2 through 11.2.0.4 has by default all RDBMS DST updates from DSTv1 to DSTv14 included in the software installation.
Oracle 12.1.0.1 and 12.1.0.2 has by default all RDBMS DST updates from DSTv1 to DSTv18 included in the software installation.
These files are found in $ORACLE_HOME/oracore/zoneinfo and have a prefix indicating the DST version.
For example timezlrg_4.dat is the DSTv4 &quot;large&quot; file, timezlrg_11.dat is the DSTv11 &quot;large&quot; file.
connect and check:
select NAME, VALUE$ from SYS.PROPS$ where NAME like ('DST_%_TT_VERSION');
DST_SECONDARY_TT_VERSION -&gt; should normally be 0 , if this has a value then also check if it is applied
DST_PRIMARY_TT_VERSION -&gt; required TZ file
if DST_PRIMARY_TT_VERSION is for example &quot;16&quot; 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
NOTE: this does not means you always need to apply DSTV16, the needed patch is depending on the version found by the select.
List of all DST patch numbers: Note 412160.1 &quot;Updated DST transitions and new Time Zones in Oracle Time Zone File patches&quot; / H) Overview of what DST version is by default used / included in what Oracle RDBMS version and all DST patch numbers
Again do NOT create yourself any timezlrg.dat and timezone.dat files or links.
</code></pre>
<p>表示在11.2.0.1及更高版本,时区和时区文件需要一一对应
执行如下命令查询当前数据库的时区
<code>select NAME, VALUE$ from SYS.PROPS$ where NAME like ('DST_%_TT_VERSION'); $ORACLE_HOME/oracore/zoneinfo or %ORACLE_HOME%\oracore\zoneinfo</code>
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=fb53a80c0423fd670e80860d05269c6d&amp;file=file.png" alt="" />
时区为28,到 $ORACLE_HOME/oracore/zoneinfo or %ORACLE_HOME%\oracore\zoneinfo 目录下未查到有28的时区文件,判定是因为这个问题导致的。
【解决方案】
将原机28时区的文件复制到恢复机,再重启数据库解决。</p>