19c启动pdb报warning ORA-29548

概述

最近在客户环境新部署19c数据库环境,在建好实例后,启动pdb异常报错,一直没有找到故障原因,后面经排查是由于oracle自带java异常,重新编译后正常。

环境:19.6+redhat 7.8

1.pdb启动报错详情,报错详细如下

SQL> select *from PDB_PLUG_IN_VIOLATIONS;
		[17:59:185.1.74.33]
		[17:59:185.1.74.33]TIME                                                                        NAME                                                                                                                                                                                                                                                             CAUSE                                                                                                                            TYPE               ERROR_NUMBER       LINE
		[17:59:185.1.74.33]--------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------ ------------ ----------
		[17:59:185.1.74.33]MESSAGE
		[17:59:185.1.74.33]---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
		[17:59:185.1.74.33]STATUS
		[17:59:185.1.74.33]------------------
		[17:59:185.1.74.33]ACTION
		[17:59:185.1.74.33]---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
		[17:59:185.1.74.33]    CON_ID
		[17:59:185.1.74.33]----------
		[17:59:185.1.74.33]10-DEC-20 05.10.53.146325 AM                                                PDB$SEED                                                                                                                                                                                                                                                         SQL patch error                                                                                                                  ERROR                         0          1
		[17:59:185.1.74.33]Interim patch 30484981/23301663 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)): APPLY with status WITH ERRORS in the CDB.
		[17:59:185.1.74.33]RESOLVED
		[17:59:185.1.74.33]Call datapatch to reinstall
		[17:59:185.1.74.33]         2
		[17:59:185.1.74.33]
		[17:59:185.1.74.33]10-DEC-20 05.10.53.146325 AM                                                PDB$SEED                                                                                                                                                                                                                                                         SQL Patch                                                                                                                        ERROR                         0          2
		[17:59:185.1.74.33]19.6.2.0.0 Release_Update_Revision 2006181611: APPLY with status WITH ERRORS in the CDB
		[17:59:185.1.74.33]RESOLVED
		[17:59:185.1.74.33]Call datapatch to install in the PDB or the CDB
		[17:59:185.1.74.33]         2
		[17:59:185.1.74.33]
		[17:59:185.1.74.33]10-DEC-20 05.10.53.146325 AM                                                PDB$SEED                                                                                                                                                                                                                                                         SQL patch error                                                                                                                  ERROR                         0          2
		[17:59:185.1.74.33]Interim patch 30484981/23301663 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)): APPLY with status WITH ERRORS in the PDB.
		[17:59:185.1.74.33]RESOLVED
		[17:59:185.1.74.33]Call datapatch to reinstall
		[17:59:185.1.74.33]         2
		[17:59:185.1.74.33]
		[17:59:185.1.74.33]10-DEC-20 05.10.53.146325 AM                                                PDB$SEED   
......
		Patch 30484981 apply (pdb CBSBATDB): WITH ERRORS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CBSBATDB_2020Dec10_04_04_19.log (errors)
		-> Error at line 228: script javavm/install/jvmpsupi.sql
			- ORA-00600: internal error code, arguments: [26599], [1], [445], [], [], [], [],
			- [], [], [], [], []
			- ORA-06512: at "SYS.DBMS_JAVA_TEST", line 2
			- ORA-06512: at "SYS.DBMS_JAVA_TEST", line 55
			- ORA-06512: at line 4
......
		-> Error at line 163299: script md/admin/catmdsdop2.sql
			- ORA-29548: Java system class reported: release of Java system classes in the
			- database (19.0.0.0.0 1.8) does not match that of the oracle executable
			- (19.0.0.0.200114 1.8)
		-> Error at line 163309: script md/admin/catmdsdop2.sql
			- ORA-29548: Java system class reported: release of Java system classes in the
			- database (19.0.0.0.0 1.8) does not match that of the oracle executable
			- (19.0.0.0.200114 1.8)
		-> Error at line 163323: script md/admin/catmdsdop2.sql
			- ORA-29548: Java system class reported: release of Java system classes in the
			- database (19.0.0.0.0 1.8) does not match that of the oracle executable
			- (19.0.0.0.200114 1.8)

2.查询java jdk版本报错

SQL> select dbms_java.get_jdk_version() from dual;
	select dbms_java.get_jdk_version() from dual
											*
	ERROR at line 1:
	ORA-29548: Java system class reported: release of Java system classes in the database (19.0.0.0.0 1.8) does not match that of the oracle executable (19.0.0.0.200114 1.8)

解决方法:

首先要应用ojvm补丁,然后在cdb和pdb都执行@?/javavm/install/update_javavm_db.sql,对java重新编译

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> 
		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> 
		SQL> create or replace java system;
		2  /
		
		Java created.
		
		SQL> 
		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> 
		SQL> commit;
		
		Commit complete.
		
		SQL> 
		SQL> alter session set "_ORACLE_SCRIPT"=false;
		
		Session altered.

故障解决

查询jdk版本不再报错

SQL>  select dbms_java.get_jdk_version() from dual;
		
		DBMS_JAVA.GET_JDK_VERSION()
		--------------------------------------------------------------------------------
		1.8.0_241
		
		1 row selected.

datapatch -verbose成功执行

bash-4.2$ ./datapatch -verbose
		SQL Patching tool version 19.6.2.0.0 Production on Thu Dec 10 18:30:13 2020
		Copyright (c) 2012, 2020, Oracle.  All rights reserved.
		
		Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_24576412_2020_12_10_18_30_13/sqlpatch_invocation.log
		
		Connecting to database...OK
		Gathering database info...done
		
		Note:  Datapatch will only apply or rollback SQL fixes for PDBs
			that are in an open state, no patches will be applied to closed PDBs.
			Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
			(Doc ID 1585822.1)
		
		Bootstrapping registry and package to current versions...done
		Determining current state...done
		
		Current state of interim SQL patches:
		Interim patch 30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)):
		Binary registry: Installed
		PDB CBSBATDB: Applied with errors on 10-DEC-20 06.03.37.338779 PM
		PDB CBSDCIF: Applied with errors on 10-DEC-20 06.03.37.383127 PM
		PDB CBSENSDB: Applied with errors on 10-DEC-20 06.03.37.331657 PM
		PDB CBSHISDB: Applied with errors on 10-DEC-20 06.03.37.367583 PM
		PDB CDB$ROOT: Applied with errors on 10-DEC-20 06.03.37.305551 PM
		PDB PDB$SEED: Applied with errors on 10-DEC-20 06.03.37.324883 PM
		
		Current state of release update SQL patches:
		Binary registry:
			19.6.2.0.0 Release_Update_Revision 200618161105: Installed
		PDB CBSBATDB:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.10.19.474545 AM
		PDB CBSDCIF:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.10.33.131060 AM
		PDB CBSENSDB:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.10.12.697892 AM
		PDB CBSHISDB:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.10.26.246912 AM
		PDB CDB$ROOT:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.09.59.208388 AM
		PDB PDB$SEED:
			Applied 19.6.2.0.0 Release_Update_Revision 200618161105 successfully on 10-DEC-20 05.10.05.998537 AM
		
		Adding patches to installation queue and performing prereq checks...done
		Installation queue:
		For the following PDBs: CDB$ROOT PDB$SEED CBSENSDB CBSBATDB CBSHISDB CBSDCIF
			No interim patches need to be rolled back
			No release update patches need to be installed
			The following interim patches will be applied:
			30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981))
		
		Installing patches...
		Patch installation complete.  Total patches installed: 6
		
		Validating logfiles...done
		Patch 30484981 apply (pdb CDB$ROOT): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CDBROOT_2020Dec10_18_33_00.log (no errors)
		Patch 30484981 apply (pdb PDB$SEED): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_PDBSEED_2020Dec10_18_33_03.log (no errors)
		Patch 30484981 apply (pdb CBSENSDB): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CBSENSDB_2020Dec10_18_33_02.log (no errors)
		Patch 30484981 apply (pdb CBSBATDB): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CBSBATDB_2020Dec10_18_33_02.log (no errors)
		Patch 30484981 apply (pdb CBSHISDB): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CBSHISDB_2020Dec10_18_33_02.log (no errors)
		Patch 30484981 apply (pdb CBSDCIF): SUCCESS
		logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23301663/30484981_apply_CBS_CBSDCIF_2020Dec10_18_33_02.log (no errors)
		SQL Patching tool complete on Thu Dec 10 18:33:39 2020
		bash-4.2$ timed out waiting for input: auto-logout
		$ 
		Shell will time out in 60 seconds.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值