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.longname('TEST') from dual; -- for 11g
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

OH/javavm/install/update_javavm_db.sql

and retest the installation using:

select dbms_java.get_jdk_version() from dual;

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.

NOTE: Any or all of these scripts may hang and/or produce errors. If the script hangs then kill the script using CTRL-C and continue on with the next one. All errors in these scripts can be ignored.

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.

NOTE: The parameter for the rmjvm.run procedure determines whether or not user objects are removed.

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:

NOTE: 11.2 reloads only: The install steps below are for 12.1. Please add the following *after* catjava.sql for 11.2 reloads:
@?/rdbms/admin/catexf.sql

-- 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.

NOTE: If any unexpected errors were raised, or if you would like Oracle Support Services (OSS) to review the log file (recommended), please stop at this point and upload the log file, full_jvminst.log, to your Service Request (SR) for review.

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:

SQL> @?/rdbms/admin/utlrp.sql

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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. P6 EPPM Manual Installation Guide (Oracle Database)

    P6 EPPM Manual Installation Guide (Oracle Database) P6 EPPM Manual Installation Guide (Oracle Databa ...

  4. 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 ...

  5. Plugging an Unplugged Pluggable Database issue 3

    Multitenant Unplug/Plug Best Practices (文档 ID 1935365.1) 1.source 从0419 升级到1019 ,但是datapatch 没有回退041 ...

  6. 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 ...

  7. Use ALTER DATABASE to Move Databases

    Use ALTER DATABASE to Move Databases Follow Our Daily Tips •facebook.com/TechNetTips• twitter.com/Te ...

  8. 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 ...

  9. angular resolve路由

    import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router&q ...

随机推荐

  1. JDK提供的几种常用的锁

    可重入互斥锁: Lock lock = new ReentrantLock() lock.lock(); ... lock.unlock(); 信号量: Semaphore semaphore = n ...

  2. Sublime Text web开发神器

    开发工具介绍 开发工具一般分为两种类型:文本编辑器和集成开发环境(IDE) 常用的文本编辑器:Sublime Text.Notepad++.EditPlus等 常用的IDE:WebStorm.Inte ...

  3. 迭代器模式(Iterator.hasNaxt())

    迭代器模式(Iterator Pattern)是 Java 和 .Net 编程环境中非常常用的设计模式.这种模式用于顺序访问集合对象的元素,不需要知道集合对象的底层表示. 迭代器模式属于行为型模式. ...

  4. POJ3436 ACM Computer Factory —— 最大流

    题目链接:https://vjudge.net/problem/POJ-3436 ACM Computer Factory Time Limit: 1000MS   Memory Limit: 655 ...

  5. 2款JS脚本判断手机浏览器跳转WAP手机网站

    随着移动设备的普及,企业的网络宣传已经不能局限在PC端,而需要同时在移动端有所建树.对于公司网站来说,以前都是做的PC端的,当然手机等移动端也可以访问,但是用户体验肯定不如完全适合的手机端来的方便.我 ...

  6. 用 javascript 操作 xml

    1. [代码]js代码     <script language="JavaScript"><!--var doc = new ActiveXObject(&qu ...

  7. POJ - 2142 The Balance(扩展欧几里得求解不定方程)

    d.用2种砝码,质量分别为a和b,称出质量为d的物品.求所用的砝码总数量最小(x+y最小),并且总质量最小(ax+by最小). s.扩展欧几里得求解不定方程. 设ax+by=d. 题意说不定方程一定有 ...

  8. NOSQL安全攻击

    摘自:http://www.infoq.com/cn/articles/nosql-injections-analysis JSON查询以及数据格式 PHP编码数组为原生JSON.嗯,数组示例如下: ...

  9. Codeforces Round #419 (Div. 1) 补题 CF 815 A-E

    A-C传送门 D Karen and Cards 技巧性很强的一道二分优化题 题意很简单 给定n个三元组,和三个维度的上限,问存在多少三元组,使得对于给定的n个三元组中的每一个,必有两个维度严格小于. ...

  10. 动态编译c#脚本(把c#当作脚本执行)

    csscript动态编译C#脚本 This document contains information about the CLR based scripting system CS-Script ( ...