首页 > Linux操作系统 > Linux操作系统 > ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for
今天数据库由10.2.0.2升级到10.2.0.5时,运行catupgrd.sql脚本时。出现了这个错误。在网上找到这篇文章。所以记录一下。谢谢 原创作者。
作者:shenguokun
http://sinobestdba.itpub.net
1 问题描述
当给已创建好的数据库安装oracle10.2.0.4或oracle10.2.0.5补丁,运行catupgrd.sql脚本时会出现 ORA-29558: JAccelerator (NCOMP) not installed报错。
select dbms_java.full_ncomp_enabled from dual
*
ERROR at line 1:
ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for
instructions.
ORA-06512: at "SYS.DBMS_JAVA", line 236
2 处理过程
2.1 查询资料
1) 补丁readme文档给出的解释
If
any of the databases use Java Virtual Machine or Oracle interMedia,
then install the Oracle Database 10g Products installation type from the
Oracle Database 10g Companion CD before installing the 10.2.0.5 patch
set. For information about installing the Oracle Database 10g Products
installation type from the Companion CD, see the Oracle Database
Companion CD Installation Guide for the platform. This installation type
includes the Natively Compiled Java Library files to improve Java
performance. If you do not install the Natively Compiled Java Library
files, the ORA-29558: JAccelerator (NCOMP) not installed error occurs
when a database that uses Java Virtual Machine is upgraded to the patch
release.
See Also:
My Oracle Support (formerly OracleMetaLink)
document 293658.1 for more information about the ORA-29558:JAccelerator
(NCOMP) not installed error
2) metalink文档293658.1给出的解释
The Oracle
Companion CD was either not installed or specifically the Natively
Compiled Java Libraries (NCOMP) were not installed.
The Installation
documentation is not explicit; however, the NCOMPs are optional and the
error, ORA-29558 is informational not an actual error. NCOMPs do not
have to be installed and the error can be ignored. The drawback is the
potential of slower performance due to javabyte code having to be
translated into machine code when used, but has no effect on an upgrade
or migration. The Database Upgrade Assistant (DBUA) and the utility
script. utlu102i.sql will show that the NCOMPs are not installed but it
will not affect the upgrade or migration.
Also, for clarification
purposes, an Oracle Application Server 10g, version 10.1.2.0.2 Metadata
Repository installation, JAccelerator (NCOMP) is not used for the Oracle
Applicaton Server.
2.2 分析
从补丁readme文档和metalink文档可以看出,这个问题有两个解决思路:
解决思路1:忽略这个报错
当我们没有使用Native PL/SQL compilation时,可以忽略这个报错。Metalink 文档394422.1对Native PL/SQL compilation的解释如下。
1) What is Native PL/SQL compilation ?
Native
compilation is a way of speeding up PL/SQL procedures by compiling them
into native code residing shared libraries. The procedures are
translated into C code and then compiled with an by Oracle certified
C-compiler and linked into the Oracle process.
Procedures compiled
this way will work in all server environments as dedicated connections,
shared connections (formerly known as MTS) and starting with 10g even
within a Real Application Cluster (RAC) environment.
2) When to use native compilation with PL/SQL ?
Native
compilation is a way of speeding up operations like loops,
calculations, recursion etc. If the PL/SQL code is mainly based on SQL
statement adding native compilation will not add any great advantages
since SQL statements themselves will not perform. any faster.
However instructions like loops, branches, recursive calls and calculations will benefit allot from native compilation.
Since
native compilation is taking longer time then interpretated compilation
it is recommended to not use native compilation in the middle, or
during the busiest part of a development cycle where PL/SQL code is
often recompiled. Either use a specific test environment for performance
tests or wait until the end of the development cycle.
解决思路2:下载并安装 Oracle Companion CD,该Companion CD包含了Natively Compiled Java Libraries (NCOMP)。安装Oracle Companion CD后,再重新安装patchset补丁文件和运行catupgrd.sql脚本。
2.3 处理步骤(安装Oracle Companion CD,并重装补丁)
1. 在网站下载相应平台的Oracle Companion CD
2. 安装Oracle Companion CD
3. 重新安装patchset
4. 重新运行catupgrd.sql脚本
3 总结
当
oracle10g数据库已安装了Java Virtual Machine 或者 Oracle
interMedia选项,打补丁运行catupgrd.sql脚本时会出现这个报错,如果数据库的PL/SQL脚本中没有使用Native
PL/SQL compilation时,这个报错可以忽略,当然这个报错也可以通过安装Oracle Companion CD并重装补丁来解决。
与plsql相关的几个初始化参数:
plsql_ccflags string
plsql_code_type string INTERPRETED
plsql_compiler_flags string INTERPRETED, NON_DEBUG
plsql_debug boolean FALSE
plsql_native_library_dir string
plsql_native_library_subdir_count integer 0
plsql_optimize_level integer 2
plsql_v2_compatibility boolean FALSE
plsql_warnings string DISABLE:ALL
默认情况下,plsql_code_type = 'INTERPRETED',如果想使用Native PL/SQL compilation,则修改plsql_code_type = 'NATIVE',这是一个动态参数,可以在session级别调整:
alter session set plsql_code_type = 'NATIVE';
或
alter session set plsql_code_type = 'INTERPRETED';
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24113018/viewspace-1736210/ ,如需转载,请注明出处,否则将追究法律责任。