环境概述
DG迁移
源端 linux 11.2.0.4 RAC 数据库集群均无补丁
目标端 linux 11.2.0.4 RAC 集群无补丁,数据库、OJVM应用最新202010补丁
迁移完成后,测试应用出现报错
调用java报错ORA-29548: Java system class reported: could not identify release specified in classes.bin
ORA-06512: SYS.DBMS_JAVA", line 139
检查OJVM组件状态是否有效
SELECT comp_name,VERSION, STATUS from dba_registry ;
通过MOS文章 2149046.1
补丁安装或回滚会出现此故障1) The Oracle JVM component became invalid after applying or rolling back an OJVM PSU patch to the database
2) Running “select dbms_java.longname(‘TEST’) from dual;” throws one of the following errors.
解决办法
These errors can be resolved by running the post installation or post de-installation (in the case of a rollback) steps as detailed in the readme of the respective patch.
对比两端发现,源库无补丁,备库补丁打上。切换后主库未执行OJVM补丁脚本。
--对于 Oracle RAC 环境,请使用以下命令在其中一个节点上重新加载软件包。确保远程节点上没有数据库的其他实例。 cd $ORACLE_HOME/sqlpatch/31668908 sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> alter system set cluster_database=false scope=spfile; SQL> SHUTDOWN SQL> STARTUP UPGRADE SQL> @postinstall.sql SQL> alter system set cluster_database=true scope=spfile; SQL> SHUTDOWN SQL> STARTUP --安装修补程序的 SQL 部分后,某些软件包可能会变为无效。这将在访问时重新编译,或者您可以运行以使它们恢复为 VALID 状态。utlrp.sql cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> @utlrp.sql
执行dbms.java测试
select dbms_java.longname(‘1’) from dual;