Wednesday, April 6, 2011

Installing JVM on Oracle Database 11gR2

JVM was not installed on our Oracle 11gR2 database and we installed it manually by executing below steps from sqlplus login directly on the server [please follow all th steps]:

spool /home/oracle/ODMRINSTL/JVM/jvm_install.txt
set echo on
connect / as sysdba
shutdown immediate
startup mount
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
@?/rdbms/admin/catexf.sql
shutdown immediate
set echo off
spool off
exit

Verify with below queries & outputs:

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

OWNER COUNT(*)
------ ----------
SYS 21313
EXFSYS 48

SQL> select comp_id,comp_name from dba_registry where comp_id in('CATJAVA','JAVAVM');

COMP_ID COMP_NAME
------- ------------------------------
JAVAVM JServer JAVA Virtual Machine
CATJAVA Oracle Database Java Packages

We have followed above for our case. For details and uninstallation please go through MOS Note:1112983.1 and prepare steps for your case.

7 comments:

  1. wonderful..this helped me a lot

    ReplyDelete
  2. Love this information. It helps me struggling using the oracle 10g method which is cannot be applied to oracle 11g for JVM.

    ReplyDelete
  3. Awesome...Thank You for the easy instructions!!!!

    ReplyDelete
  4. Thanks a lot, works like a charm

    Just make sure you have enough free space in the system tablespace. It is a real pain to get rid of a partially installed jvm.
    In my case less than 150MB was sufficient.

    ReplyDelete
  5. i had this error
    SP2-0606: can not create spool file "/home/oracle/ODMRINSTL/JVM/jvm_install.txt"

    ReplyDelete
  6. Excellent directions! Thank you!

    ReplyDelete