How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video] [ID 276554.1]

本文提供了一步一步的操作指南,详细解释了如何在Oracle Server Enterprise Edition中卸载并重新安装JVM,包括在不同操作系统上执行的具体步骤。确保在操作前备份数据库,并注意一些关键的系统要求和潜在的错误提示。
How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video] [ID 276554.1] 

 修改时间 17-MAR-2010     类型 REFERENCE     状态 PUBLISHED 

In this Document
  Purpose
  Scope
  How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video]
  References


Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.5
Information in this document applies to any platform.

Purpose

This article details how to completely de-install and then re-install the JVM in Oracle10g Release 1 and Release 2 on UNIX, Windows NT/2000/XP and HP OpenVMS.

Scope

The actions detailed in this article are highly destructive and so 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.

As with all destructive actions, Oracle Corporation strongly advises taking a FULL COLD BACKUP of the database before these actions are performed.  In addition, as removing the JVM removes ALL user owned JAVA objects also, such as APPS schema objects, an export dump of all user schema's containing JAVA objects should be taken if required, so that these objects can be reloaded once the JVM has been re-installed (see Note:183825.1).

Oracle Applications customers should contact Oracle Support rather than attempt the actions in this article, see Note:191123.1 for the procedure to follow here.

Oracle Real Application Cluster (RAC) customers should ensure that all nodes of the cluster are shutdown except the master node, and perform. these actions on the master node only.

NOTE

It is not necessary to install the XML Developers Kit (XDK) or the XML SQL Utility (XSU) into user schema's in 10.1.0.x, unless specifically required by your application, as these products are included in the JVM in 10.1.0.x.

How to Reload the JVM in 10.1.0.X and 10.2.0.X [Video]

DownloadAttachment.jspx?attachid=778.1:VIDEOLOGO Video - A video to show steps to reload JVM (10:00) DownloadAttachment.jspx?attachid=778.1:IC.

The above link will play a video to show you the steps you need to follow.

Alternatively, please follow the steps below.

The following steps need to be executed precisely as listed below to ensure that they complete successfully:

1.  Verify that the ORACLE_HOME and ORACLE_SID environment variables are set correctly in the environment, and that the following system requirements are available:

      The Shared Pool has at least 50Mb of free space.
      The Java Pool has at least 20Mb of free space
      The SYSTEM tablespace has at least 70Mb of free space
      The SYSTEM RBS has at least 100Mb of free space

The initjvm.sql script. in 10g will check 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.  Verify that the JAccelerator (NCOMP) is installed in the Oracle home.  The JAccelerator (NCOMP) is a recommended installation component in 10g when using the JVM as specified in the patchset release notes.  Failure to install the JAccelerator (NCOMP) will result in an ORA-29558 error being signaled during the JVM installation and dramatically reduced performance when executing Java code, see Note:293658.1.


3.  Shutdown the instance and then create and run the following sql script. from a new sqlplus 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

The actions above are required to resolve some known issues, such as bug:1365707.

IMPORTANT NOTES

a)  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 such as:

ORA-29549: class %s.%s has changed, Java session state cleared

when running initjvm.sql.

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


4.  Check that the previous script. completed ok.  You can ignore object doesn't exist type errors here such as:

ORA-04043: object XMLGEN does not exist
ORA-01432: public synonym to be dropped does not exist

raised when running rmxml.sql.  The last three select statements should show no java objects remaining, and that the SYS.JAVA$CLASS$MD5$TABLE was removed successfully before proceeding.  In some cases you may see some
rows returned by the last but one query, e.g:

SQL> select obj#, name from obj$ where type#=28 or type#=29 or type#=30 or namespace=32;

OBJ# NAME
---------- ------------------------------
44909 JAVA$POLICY$SHARED$00000001
44910 JAVA$POLICY$SHARED$00000002
2 rows selected.

These can be safely ignored if they only reference object names of the form. 'JAVA$POLICY$SHARED$', providing they no longer appear once the instance is restarted.  If any other rows are returned, or if you have any doubts, stop at this point and contact Oracle Support supplying the log file generated above.  If you encounter an OCI-21500 "internal error code, arguments: [koxsihread1]" error, then please see Note:350972.1 to resolve that error.

If the above commands completed successfully, then create and run the following sql script.:

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

If you encounter an OCI-21500 "internal error code, arguments: [koxsihread1]" error, then please see Note:350972.1 to resolve that error.


5.  Once the database has been restarted, resolve any invalid objects by running the utlrp.sql script. e.g.:The JVM should now be fully installed (including the XDK & XSU).  The count of Java objects returned above should be around 14987 (on NT) for the SYS user.  In a full JVM installation depending upon the platform. and products installed, the objects can be broken down by owner as follows:

 @?/rdbms/admin/utlrp.sql

 The JVM should now be fully installed (including the XDK & XSU). The count of Java objects returned above should be around 14987 (on NT) for the SYS user.  In a full JVM installation depending upon the platform. and products installed, the objects can be broken down by owner as follows:

SQL> select owner, count(*) from all_objects where object_type like '%JAVA%' group by owner;

OWNER COUNT(*)
------------------------------ ----------
DMSYS 467
EXFSYS 40
MDSYS 117
ORDSYS 1354
SYS 14987
WKSYS 20

NOTE: These count totals may be slightly higher on 10g R2 than on 10g R1.

If you previously had the InterMedia (ORDSYS), UltraSearch (WKSYS) Data Mining (DMSYS), Spatial (MDSYS) or (EXFSYS) options installed, then these will need to be re-installed to reload their java dependencies.  This can be achieved by executing the following commands:

 spool jvm_refresh.log
 connect / as sysdba
 @?/ord/im/admin/iminst.sql;
 connect / as sysdba
 @?/dm/admin/dminst1.sql SYSAUX TEMP ;
 connect / as sysdba
 @?/md/admin/mdinst.sql;
 connect / as sysdba
 @?/dm/admin/dminst2.sql;
 connect / as sysdba
 @?/ultrasearch/admin/wk0deinst.sql SYS change_on_install "";
 connect / as sysdba
 @?/ultrasearch/admin/wk0install.sql SYS change_on_install change_on_install
 SYSAUX TEMP "" PORTAL false;
 connect / as sysdba
 alter user WKSYS account unlock identified by change_on_install;
 @?/ultrasearch/admin/wk0config.sql change_on_install
   (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
   (HOST=)(PORT=1521))
   (CONNECT_DATA=(SERVER=DEDICATED)
   (SERVICE_NAME=.)))
   false " ";
 spool off

References

NOTE:149393.1 - What scripts are needed to manually install Oracle9i JVM(9.0.1)
NOTE:175472.1 - How to Reload the JVM in 8.1.7.X
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)
NOTE:197506.1 - TNS listener dies shortly after startup after running jisdr.sql
NOTE:202914.1 - How to Reload the JVM in 9.0.1.X
NOTE:204935.1 - How to Check the System Requirements for a JVM Installation
NOTE:209870.1 - How to Reload the JVM in 9.2.0.X
NOTE:276457.1 - How to Resolve ORA-955 Errors When Running initjvm.sql
NOTE:293658.1 - 10.1 or 10.2 Patchset Install Getting ORA-29558 JAccelerator (NCOMP) And ORA-06512 [VIDEO]
NOTE:350972.1 - OCI-21500 [Koxsihread1] During Manual Upgrade To Oracle10gR2 (10.2)
NOTE:457279.1 - How to Reload the JVM in 11.1.0.x
NOTE:397770.1 - How to Check if the Oracle JVM is Installed Correctly in the Database

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/611609/viewspace-630131/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/611609/viewspace-630131/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值