首页 > 数据库 > Oracle > Oracle 12c ORA-29548 报错处理
OS:Red Hat Enterprise Linux Server release 6.6
GI:12.1.0.2
DB:12.1.0.2
PSU:12.1.0.2.180717
Opatch:12.2.0.1.14
cd $ORACLE_HOME/jdk/bin
./java –version
Java version “1.6.0_75”
Java(TM) SE Runtime Environment (build 20.75-b01,mixed mode)
cd $ORACLE_HOME/Opatch
./opatch lsinv
SQL> select dbms_java.get_jdk_version() from dual;
ERROR at line 1:
ORA-29548: Java system class reported: release of classes.bin in the database(12.1.0.2.0.1.6)
does not match that of the oracle executable(12.1.0.2.180717.1.6)
SQL> @?/javavm/install/update_javavm_db.sql
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> alter session set “_ORACLE_SCRIPT”=true;
Session altered.
SQL> — If Java is installed, do CJS.
SQL>
SQL> — If CJS can deal with the SROs inconsistent with the new JDK,
SQL> — the drop_sros() call here can be removed.
SQL> call initjvmaux.drop_sros();
Call completed.
SQL> create or replace java system;
2 /
Java created.
SQL> update dependency$
2 set p_timestamp=(select stime from obj$ where obj#=p_obj#)
3 where (select stime from obj$ where obj#=p_obj#)!=p_timestamp and
4 (select type# from obj$ where obj#=p_obj#)=29 and
5 (select owner# from obj$ where obj#=p_obj#)=0;
0 rows updated.
SQL> commit;
Commit complete.
SQL>
SQL> alter session set “_ORACLE_SCRIPT”=false;
Session altered.
CDB中可以检查数据库jdk版本,pdb中仍然报错
SQL> select dbms_java.get_jdk_version() from dual;
ERROR at line 1:
ORA-29548: Java system class reported: release of classes.bin in the database(12.1.0.2.0.1.6)
does not match that of the oracle executable(12.1.0.2.180717.1.6)
-解决办法
在pdb再次执行
SQL> @?/javavm/install/update_javavm_db.sql
生产环境进行Oracle 12c数据库迁移和升级时如应用系统使用了数据库中的java对象,ORA-29548是常见报错,本人在12.1和12.2迁移和升级过程中使用rman或数据泵都遇到过该报错。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28373936/viewspace-2674299/ ,如需转载,请注明出处,否则将追究法律责任。