当给已创建好的数据库安装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
ORA-06512: at "SYS.DBMS_JAVA", line 236
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.
My Oracle Support (formerly OracleMetaLink) document 293658.1 for more information about the ORA-29558:JAccelerator (NCOMP) not installed error
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.
当我们没有使用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. 在www.oracle.com网站下载相应平台的Oracle Companion CD
2. 安装Oracle Companion CD
当oracle10g数据库已安装了Java Virtual Machine 或者 Oracle interMedia选项，打补丁运行catupgrd.sql脚本时会出现这个报错，如果数据库的PL/SQL脚本中没有使用Native PL/SQL compilation时，这个报错可以忽略，当然这个报错也可以通过安装Oracle Companion CD并重装补丁来解决。
plsql_code_type string INTERPRETED
plsql_compiler_flags string INTERPRETED, NON_DEBUG
plsql_debug boolean FALSE
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博客 ” ，链接：http://blog.itpub.net/8410760/viewspace-732312/，如需转载，请注明出处，否则将追究法律责任。