Install JVM
来源:互联网 发布:淘宝详情模板代码 编辑:程序博客网 时间:2024/04/30 08:35
Modified:07-Jan-2014Type:HOWTO
Language:
In this Document
Goal
Solution
References
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.1.0 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.
This article details how to completely de-install and then re-install the JVM in Oracle11g Release 2 on UNIX and Windows.
There are similar notes for previous releases:
Document:209870.1 - How to Reload the JVM in 9.2.0.X
Document:276554.1 - How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video]
Document:457279.1 - How to Reload the JVM in 11.1.0.x
Goal
The actions detailed in this article are highly destructive and should not be attempted by novice users. Additionally, the actions performed in this article make direct changes to the underlying data dictionary tables which should not be attempted unless under the guidance of Oracle Support Services (OSS).
As with all destructive actions, Oracle Corporation strongly advises taking aFULL COLD BACKUP of the database before these actions are performed.
If you have any of the following optional database components installed, they will need to be re-installed after following the steps in this note in order to reload their java dependencies:
- Oracle Multimedia (ORDSYS, ORDIM)
- Oracle Ultra Search (WKSYS)
- Oracle Data Mining (DMSYS)
- Oracle Spatial (MDSYS)
- Oracle Rules Manager and Expression Filter (EXFSYS)
- Oracle Warehouse Builder (OWBSYS)
- OLAP
Here are some Notes to assist with those installs.
Spatial
Note:1283861.1 Reinstalling Spatial Java Class objects after reloading JVM
Multimedia
Run the script as SYS, located in the $ORACLE_HOME/ORD/IM/ADMIN/initimj.sql, that will reload those classes.
OLAP
Note:296187.1 How To Manually Install Oracle OLAP In 9i, 10g Or 11g Database After The DB Has Been Created
Note:332351.1 How To Remove The OLAP Option In 10g And 11g
In addition, as removing the JVM removes ALL user owned JAVA objects, such as APPS schema objects, an export dump of all user schemas containing JAVA objects should be taken if required, so that these objects can be reloaded once the JVM has been re-installed (please see the note detailed below):
Note:183825.1 How to Backup and Restore Java Classes and Privileges only
Oracle Applications customers should contact Oracle Support Services (OSS) rather than attempt the actions in this article, see the following note for the procedure to follow:
Note 191123.1 Process for Performing a Non-Default JVM Reinstallation
It is not necessary to install the XML Developers Kit (XDK) or the XML SQL Utility (XSU) into user schemas unless specifically required by your application, as these products were included in the JVM from 10.1.0.x.
Solution
NOTE: The following steps MUST be executed precisely in the order listed below.
1. Verify that the following System Requirements are available
The Shared Pool has at least 96 MB of free space.
The Java Pool has at least 50 MB of free space
The SYSTEM tablespace has at least 70 MB of free space
The SYSTEM RBS has at least 100 MB of free space
NOTE: The initjvm.sql script in 11g will check to ensure that these resources are available when it is run, and if they aren't available the execution of the script will terminate with an error indicating which resource needs to be increased.
2. Remove the JVM
- Shutdown the database instance
- Create the following REMOVAL script, full_rmjvm.sql
- Run it from a new SQL*Plus session
-- Start of File full_rmjvm.sql
spool full_rmjvm.log
set echo on
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter system enable restricted session;
alter database open;
@?/rdbms/admin/catnoexf.sql
@?/rdbms/admin/catnojav.sql
@?/xdk/admin/rmxml.sql
@?/javavm/install/rmjvm.sql
truncate table java$jvm$status;
select * from obj$ where obj#=0 and type#=0;
delete from obj$ where obj#=0 and type#=0;
commit;
select owner, count(*) from all_objects
where object_type like '%JAVA%' group by owner;
select obj#, name from obj$
where type#=28 or type#=29 or type#=30 or namespace=32;
select o1.name from obj$ o1,obj$ o2
where o1.type#=5 and o1.owner#=1 and o1.name=o2.name and o2.type#=29;
shutdown immediate
set echo off
spool off
exit
-- End of File full_rmjvm.sql
IMPORTANT NOTES
-----------------------
(a) The actions above are required to resolve some known issues, such as:
Bug 1365707 ORA-955 ON CREATE OR REPLACE JAVA SYSTEM (INITJVM) AFTER FULL REMOVAL
Unpublished Bug 1744593 TRYING TO INSTALL JVM IN SAME SESSION AS IT WAS REMOVED FROM GENERATES ORA-29549
(b) The SHUTDOWN command is needed here to ensure that the database is synchronized to disk after running rmjvm.sql. Failure to perform this action can result in spurious errors when running initjvm.sql such as:
ORA-29549: class %s.%s has changed, Java session state cleared
(c) The EXIT command is needed here to ensure that the sqlplus session resynchronizes its cache with the database, again to prevent spurious errors occurring when running the JVM initialization scripts.
(d) There is a known unpublished bug 9711406 that causes an ORA-600[17037] when running the rmxml.sql portion of the removal scripts above. This can be fixed by applying a patch for unpublished Base Bug 8940094 to any 11.2.0.1 installations. This is fixed in 11.2.0.2. These errors will not prevent a successful removal/reinstall though so steps can still be carried out without the patch applied.
(e) If you are using DB Vault, this step may fail with anORA-01031: "insufficient privileges" error. If that happens, you should review the following note to resolve this issue:
NOTE:1465705.1 DB JVM reinstall fails with insufficient privileges
3. Review the log file FULL_RMJVM.LOG
The full_rmjvm.sql script creates the log file full_rmjvm.log. Review the log file and check to see if any unexpected errors were raised.
- You can ignore "object XXX does not exist" errors, for example:
ORA-04043: object XMLGEN does not exist
ORA-01432: public synonym to be dropped does not exist
NOTE: These errors may be raised when running rmxml.sql.
- The last three SELECT statements in the script should show no java objects remaining except in the case of the following query:
SQL> select obj#, name from obj$
2 where type#=28 or type#=29 or type#=30 or namespace=32;
OBJ# NAME
---------- ------------------------------
44909 JAVA$POLICY$SHARED$00000001
44910 JAVA$POLICY$SHARED$00000002
NOTE: These objects can be safely ignored if they only reference object names in the form of JAVA$POLICY$SHARED$<sequence number>', provided they no longer appear once the instance has been restarted. If any other rows are returned be sure to bring this to the attention of Oracle Support Services (OSS).
NOTE: It is not unusual to have numerous errors appear in the log file especially if the DB JVM was never installed or partially installed. Even if the DB JVM is shown to be INSTALLED within the Registry, if it is corrupt the log file could show a number of errors as well.
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_rmjvm.log, to your Service Request (SR) for review.
4. Install the JVM
- Be sure the REMOVAL script, full_rmjvm.sql, completed successfully
- Create the following INSTALL script, full_jvminst.sql
- Run it from a new SQL*Plus session
-- Start of File full_jvminst.sql
spool full_jvminst.log;
set echo on
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;
select obj#, name from obj$
where type#=28 or type#=29 or type#=30 or namespace=32;
@?/javavm/install/initjvm.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/xdk/admin/initxml.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/xdk/admin/xmlja.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/rdbms/admin/catjava.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
@?/rdbms/admin/catexf.sql
select count(*), object_type from all_objects
where object_type like '%JAVA%' group by object_type;
shutdown immediate
set echo off
spool off
exit
-- End of File full_jvminst.sql
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
5. Review the log file FULL_JVMINST.LOG
The full_jvminst.sql script creates 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.
6. Resolve Invalid Objects
- Be sure the INSTALL script, full_jvminst.sql, completed successfully
- Start the database instance
Once the database has been started, resolve any invalid objects by running theutlrp.sql script:
SQL> @?/rdbms/admin/utlrp.sql
7. 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;
Sample Results from an Oracle Database 11.2.0.2.0 P18 on Windows 7 64-bit:
SQL> -- Validation Query 1
SQL> select count(*), object_type
2 from all_objects
3 where object_type like '%JAVA%'
4 and owner = 'SYS'
5 group by object_type;
COUNT(*) OBJECT_TYPE
---------- -------------------
320 JAVA DATA
761 JAVA RESOURCE
20492 JAVA CLASS
2 JAVA SOURCE
SQL> -- Validation Query 2
SQL> select owner, count(*)
2 from all_objects
3 where object_type like '%JAVA%'
4 and owner = 'SYS'
5 group by owner;
OWNER COUNT(*)
------------------------------ ----------
SYS 21575
SQL> -- Validation Query 3
SQL> select owner, object_type, count(*)
2 from all_objects
3 where object_type like '%JAVA%'
4 and status <> 'VALID'
5 and owner = 'SYS'
6 group by owner, object_type;
no rows selected
NOTE: The object counts can vary by a few hundred depending on which Operating Systems the database has been installed. As a general rule, if Validation Query 2 reports approximately 21,500 Java Objects under the SYS schema and Validation Query 3 shows NO invalid SYS objects then this would be considered a valid full JVM installation.
ADDITIONAL NOTE: If you previously had any of the following database options installed
- Oracle Multimedia (ORDSYS, ORDIM)
- Oracle Ultra Search (WKSYS)
- Oracle Data Mining (DMSYS)
- Oracle Spatial (MDSYS)
- Oracle Rules Manager and Expression Filter (EXFSYS)
- Oracle Warehouse Builder (OWBSYS)
- OLAP
then these options will need to be re-installed to reload their java dependencies. This can be achieved by contacting the respective support teams for each product by logging a new Service Request.
References
NOTE:1283861.1 - Reinstalling Spatial Java Class objects after reloading JVM
NOTE:296187.1 - How To Manually Install Oracle OLAP In 9i, 10g Or 11g Database After The DB Has Been Created
NOTE:332351.1 - How To Remove The OLAP Option In 10g And 11g
NOTE:183825.1 - How to Backup and Restore Java Classes and Privileges only
NOTE:191123.1 - Process for Performing a Non-Default JVM Reinstallation (Troubleshooting the JVM in an Oracle Applications environment)
BUG:1365707 - ORA-955 ON CREATE OR REPLACE JAVA SYSTEM (INIJVM) AFTER FULL REMOVAL
NOTE:1465705.1 - DB JVM reinstall fails with insufficient privileges
NOTE:276457.1 - How to Resolve ORA-955 Errors When Running initjvm.sql
NOTE:209870.1 - How to Reload the JVM in 9.2.0.X
NOTE:276554.1 - How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video]
NOTE:457279.1 - How to Reload the JVM in 11.1.0.x
- Install JVM
- install
- install
- install
- Android Studio 安装No JVM Installation found. Please install a 64 bit JDK.解决方法
- Android Stuido启动提示"No JVM installation found.Please install a 32-bit JDK...."
- JVM
- jvm
- JVM
- JVM
- JVM
- JVM
- jvm
- jvm
- jvm
- JVM
- JVM
- jvm
- Android中的事件处理研究
- Qt Quick实现的涂鸦程序
- eclipse常用快捷键
- 如何学习(Java)
- 重装系统后iis
- Install JVM
- PCB顶层与底层布线互换
- Linux基础命令
- Java技术如何改变我的生活?
- Windows 私有堆 - HEAP_NO_SERIALIZE 标志
- ps 模糊工具 制造出蹦跑的效果
- opencv, image处理注意点,eigen库的应用
- Java web自定义标签按钮级别权限控制完美诠释(jplogic 快速开发平台)
- ASIHttpRequest的一个Bug与30秒超时