Steps to Resolve the Database JAVAVM Component if it Becomes INVALID After Applying an OJVM Patch
11.2.0.2升级到11.2.0.4 memory_target 设置过小,只有800M。 导致jserver jave virtual machine 组件无法安装,
建议升级之前至少memory_target调大到2000M。保证 JAVA_POOL_SIZE = 150M; 升级完成之后,可以memory_target调小到800m .
GOAL
Since the new Oracle JVM PSU patching scheme for 11.2.0.3, 11.2.04, and 12c databases, more and more customers are finding that their Database JVM Component is showing up as INVALID. The goal of this document is to help resolve the most common cases.
1) ORA-29548 classes.bin mismatched in binaries and database
2) ORA-29516: Aurora assertion failure: Assertion failure at eox.c:359 java.lang.UnsatisfiedLinkError sun.net.PortConfig.getLower0
3) ORA-00600:[26599][1][195]
SOLUTION
The Oracle DB JVM is comprised of 2 parts
1. Binaries (opatch) and
2. Database objects (11g postinstall.sql/12c datapatch).
When applying a patch that affects the Oracle Database JVM, one must make sure that both pieces get patched and are in SYNC or the JVM will be unusable. A broken JVM will then cause problems not only for custom Java Stored Procedure applications but also for other database components such as XDB and SDO that depend on it.
Most of the time, the post installation step (postinstall.sql or datapatch) was not run or did not get run properly. The next most likely scenario is that there was some hiccup that caused the binaries to not get relinked with the changes. And finally, on rare occasions and only on some 12c OJVM PSUs, the JDK version needs to be manually upgraded.
Steps to Resolve :
Test the JVM installation by running -
select dbms_java.get_jdk_version() from dual; -- for 12.1
If this returns an ORA-29548, then:
Follow the readme guidelines from the OJVM PSU patch installed and follow post installation instructions to run either postinstall.sql or datapatch. Afterwards, run utlrp.sql.
If the jvm is still invalid or the error was ORA-29516, then relink the binaries using 'make -f ins_rdbms.mk ioracle' from the OH/rdbms/lib directory.
If you are using 12c and the the JVM is still invalid, then run
and retest the installation using:
If you get here and the JVM is still invalid, then use the brute force method to remove the JVM and reinstall it.
JVM Removal and Reinstall steps
For the most part, these steps should be executed one by one rather than in a single script.
1. Connect as SYSDBA and startup the database in restricted mode.
NOTE: The following procedure can be performed while users are accessing the database. However, care should be taken to insure that no one is executing any Java or XML code inside the database. If in doubt, then shutdown and startup the database in restricted mode using the following startup steps.
***NOTE: A restart of the database is required at the end regardless of whether you are in restricted mode or not***
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter system enable restricted session;
alter database open;
2. Start a log of the session so that any problems encountered can be investigated later.
spool force_removal.txt
set echo on
3. Execute version specific scripts one at a time.
SQL> @?/rdbms/admin/catnoexf.sql
SQL> @?/rdbms/admin/catnojav.sql
SQL> @?/xdk/admin/rmxml.sql
4. Next is the part which actually removes the JVM objects from the database.
A value of TRUE removes ALL objects.
A value of FALSE leaves user java objects intact.
If you are concerned about losing user java objects then try running the procedure with a value of FALSE. However, it should be noted that many times this still leaves the database in a state where JVM can not be successfully reinstalled.
execute rmjvm.run(false); -- Use true if false does not fix the problem but be aware
truncate table java$jvm$status;
delete from obj$ where obj#=0 and type#=0;
commit;
set echo off
spool off
5. Now you must shutdown and restart the database in mount mode
***VERY IMPORTANT***
You must shutdown and restart the database at this point in order to remove and remaining traces of JVM from memory. This is especially important if you will be reloading JVM. If you do not restart the database then a subsequent reload will fail.
6. Now reload the JVM using the following INSTALL steps below from a new SQL*Plus session:
-- connect / as sysdba
spool full_jvminst.log;
set echo on
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;
@?/javavm/install/initjvm.sql
@?/xdk/admin/initxml.sql
@?/xdk/admin/xmlja.sql
@?/rdbms/admin/catjava.sql
shutdown immediate
set echo off
spool off
exit
IMPORTANT NOTES
If the initjvm.sql script errors with an ORA-955 error executing the "create or replace java system" command, then see the following note on Metalink for details on how to resolve this.
Note 276457.1 How to Resolve ORA-955 Errors When Running initjvm.sql
7. Review the log file FULL_JVMINST.LOG
Review the log file and check to see if any unexpected errors were raised.
8. Resolve Invalid Objects
Be sure the JVM INSTALL steps completed successfully and restart the database instance
Once the database has been started, resolve any invalid objects by running the utlrp.sql script:
9. Validate the Install
The JVM should now be fully installed.
Execute the following validation queries to retrieve the final count of SYS Java Objects inside the database:
-- Validation Query 1
select count(*), object_type
from all_objects
where object_type like '%JAVA%'
and owner = 'SYS'
group by object_type;
-- Validation Query 2
select owner, count(*)
from all_objects
where object_type like '%JAVA%'
and owner = 'SYS'group by owner;
-- Validation Query 3
select owner, object_type, count(*)
from all_objects
where object_type like '%JAVA%'
and status <> 'VALID'
and owner = 'SYS'
group by owner, object_type;
Steps to Resolve the Database JAVAVM Component if it Becomes INVALID After Applying an OJVM Patch的更多相关文章
- Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU" (OJVM PSU) Patches (文档 ID 1929745.1)
From: https://support.oracle.com What is "Oracle JavaVM Component Database PSU" ? Oracle J ...
- Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct2014) - 傲游云浏览
Skip Headers Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct ...
- P6 EPPM Manual Installation Guide (Oracle Database)
P6 EPPM Manual Installation Guide (Oracle Database) P6 EPPM Manual Installation Guide (Oracle Databa ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- Plugging an Unplugged Pluggable Database issue 3
Multitenant Unplug/Plug Best Practices (文档 ID 1935365.1) 1.source 从0419 升级到1019 ,但是datapatch 没有回退041 ...
- Oracle Created Database Users: Password, Usage and Files References (文档 ID 160861.1)
This document is no longer actively maintained, for info on specific (new) users in recent product e ...
- Use ALTER DATABASE to Move Databases
Use ALTER DATABASE to Move Databases Follow Our Daily Tips •facebook.com/TechNetTips• twitter.com/Te ...
- Quick and Easy Installation of Oracle Database 12c on Oracle Linux in Oracle VM VirtualBox
发贴人 Sergio-Oracle 于2018-4-18 23:10:15在Oracle Linux Introduction How Does This Work? Requirements Bef ...
- angular resolve路由
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router&q ...
随机推荐
- 检測磁盘驱动的健康程度SMART
在server中,全部组件中一般最easy坏掉的就是磁盘.所以一般採取RAID来保证系统的稳定性,通过冗余磁盘的方式防止磁盘故障. 现代硬件驱动器一般支持SMART(自我监測分析和报告技术),它可以监 ...
- Rowkey is the Crux Rowkey Design
Apache HBase ™ Reference Guide http://hbase.apache.org/book.html#rowkey.design The Effect of ColumnF ...
- 编译spark源码 Maven 、SBT 2种方式编译
由于实际环境较为复杂,从Spark官方下载二进制安装包可能不具有相关功能或不支持指定的软件版本,这就需要我们根据实际情况编译Spark源代码,生成所需要的部署包. Spark可以通过Maven和SBT ...
- hdoj 1875 畅通project再续【最小生成树 kruskal && prim】
畅通project再续 Problem Description 相信大家都听说一个"百岛湖"的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其它的小岛时都要通过划小船来实现. ...
- C# 自定义控件及引用自动义控件
1.http://www.cnblogs.com/hjxzjp/p/7823292.html 优先考虑从现有的控件中进行派生,并添加所需要的功能. 在解决方案资源管理器窗口中设置:引用----&g ...
- Qt & opencv 学习(二)
例子:打开图片并显示.打开图片利用Qt的标准文件对话框,第一步是利用OpenCV创建窗口并显示. 添加一个Button,转到信号槽添加代码: using namespace cv; Mat image ...
- poj 2771 Guardian of Decency 解题报告
题目链接:http://poj.org/problem?id=2771 题目意思:有一个保守的老师要带他的学生来一次短途旅行,但是他又害怕有些人会变成情侣关系,于是就想出了一个方法: 1.身高差距 ...
- codeforces B. 4-point polyline 解题报告
题目链接:http://codeforces.com/problemset/problem/452/B 题目意思:给出一个长为n,宽为 m 的矩形,要从这里面(包括边上)找出4个不同的点,使得以某一个 ...
- 屏幕适配-使用autoLayout
当遇见xib中无法删除的控件时. 将这个错误的控件拖离本xib(第一个元素.xib文件是有许多元素组成的集合),确保这个xib是正确的.重新创建一个xib文件,将这个正确的xib元素整个复制过去. 在 ...
- python自动化运维-编写rsync+sersync安装脚本实现文件实时同步
rsync+sersync组合可以实时监听目录的变化,实现实时同步数据. 具体安装教程可查看:http://www.osyunwei.com/archives/7447.html. 安装着实有些复杂, ...