故障案例1:JVM INVALID
此故障经常出现在Oracle打补丁升级后,JAVA VM组件失效,状态变为INVALID
以下SQL查询组件状态:
select comp_name, version, status from dba_registry;
JVM是一个独立的执行环境平台,其可以直接将JAVA源码编译成机器码,然后在特定的处理器架构或者系统下执行。
修复方法:
1.set the following init parameters so that JIT and job processes do not start.
SQL> alter system set java_jit_enabled = FALSE;
SQL> alter system set "_system_trig_enabled"=FALSE; -- Keep a Note of original JOB_QUEUE_PROCESSES value before this
SQL> alter system set JOB_QUEUE_PROCESSES=0;
2. Now attempt to recreate the jvm in the database without affecting any of
the user owned Java objects.
SQL> create or replace java system
3. Reset modified init parameters
SQL> alter system set java_jit_enabled = true;
SQL> alter system set "_system_trig_enabled"=TRUE;
SQL> alter system set JOB_QUEUE_PROCESSES=1000;-- or original JOB_QUEUE_PROCESSES value
4.Then run below script to recompile any invalid objects:
SQL> @?/rdbms/admin/utlrp.sql
故障案例2:Spatial and XDB components are INVALID in DBA_REGISTRY
修复方法:
conn / as sysdba
GRANT EXECUTE ON UTL_FILE TO XDB;
GRANT EXECUTE ON DBMS_JOB TO XDB;
ALTER PACKAGE XDB.DBMS_CLOBUTIL COMPILE;
ALTER PACKAGE XDB.DBMS_XDBT COMPILE;
ALTER PACKAGE XDB.DBMS_XDB_ADMIN COMPILE;
ALTER PACKAGE XDB.DBMS_XMLPARSER COMPILE;
ALTER PACKAGE XDB.DBMS_XSLPROCESSOR COMPILE;
@?/rdbms/admin/utlrp.sql--- run it 3- 4 times
conn / as sysdba
EXEC DBMS_REGXDB.VALIDATEXDB;
官方文档:
Document 2314631.1-Oracle JVM组件修复
Document 2523682.1-Spatial and XDB components are INVALID in DBA_REGISTRY