Introduction
For a couple of databases I had to install the Java Virtual Machine after the Database had been created. First attempt was using the DBCA gui to get that done so i started it and made the obvious choices to work with A Rac database , to configure the database options and selected the Database I wanted to work with ( in the list only databases showing no instances). DBCA was not so nice to me this time, telling me: “service name or Instance name not specified”. Hmm well since i knew i can do without GUI anyhow i decided to take the manual route and leave DBCA be for the moment. So lets saddle up and do it the old – still – going strong command line way .
My environment is a Linux 5 enterprise edition, my Oracle version is 11.2.3.0. My Database is a two Instance Rac Database.
Manual Installation:
In order to install the JVM i decided it would be best to have the database in an exclusive way so after contacting customer and getting his okay my first step was to shut down the Rac database. I had two screens open one to tail the alertlog and in the other in the Linux Prompt i had :
srvctl stop database -d MYDB
Alert log showed that the database was coming down smoothly so it was time to set up a script to get things working:
— Start of Installation the JVM manually.
— Important note this will only work this way if there is no JVM or part of JVM present in the database
— Investigate MOS if you suspect a former wrong installation or partly installation before proceeding
spool InstallJvm.lst; set echo on -- connecting as sysdba cause this is required for this install -- and mount the database. connect / as sysdba startup mount -- set_system_trig_enabled to false and open the database alter system set "_system_trig_enabled" = false scope=memory; alter database open; -- 28= 'JAVA SOURCE', 29= 'JAVA CLASS', --30= 'JAVARESOURCE', 32='JAVA DATA' 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
starting the database again via the cluster: srvctl start database -d MYDB ## Time to go and check Health of JVM in Oracle : select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS -------------------------------------------- --------------- ----------- Oracle Expression Filter 11.2.0.3.0 VALID Oracle Application Express 4.1.1.00.23 VALID Oracle XML Database 11.2.0.3.0 VALID Oracle Database Catalog Views 11.2.0.3.0 VALID Oracle Database Packages and Types 11.2.0.3.0 VALID JServer JAVA Virtual Machine 11.2.0.3.0 VALID Oracle XDK 11.2.0.3.0 VALID Oracle Database Java Packages 11.2.0.3.0 VALID ##More proof: select owner, status, count(*) from all_objects where object_type like '%JAVA%' group by owner, status; OWNER STATUS COUNT(*) -------------------- ------- ---------- SYS VALID 21580 --> In 11GR2 approx. # of objects. EXFSYS VALID 48 select role from dba_roles where role like '%JAVA%'; ROLE ------------------------------ JAVAUSERPRIV JAVAIDPRIV JAVASYSPRIV JAVADEBUGPRIV JAVA_ADMIN JAVA_DEPLOY 6 rows selected. --> in 11GR2 # of roles. select owner,status, count(status) from dba_objects group by owner,status order by 1,2; OWNER STATUS COUNT(STATUS) ------------------------------ ------- ------------- APEX_040100 VALID 3341 APPQOSSYS VALID 5 DBSNMP VALID 55 ERUNBK11 VALID 5 EXFSYS VALID 191 FLOWS_FILES VALID 13 ORACLE_OCM VALID 8 OUTLN VALID 10 PUBLIC VALID 24187 SYS VALID 31674 SYSTEM VALID 563 XDB VALID 1658 ## If needed consider utlrp to see if recompile is helpful. @?/rdbms/admin/utlrp
As always Happy reading. Mathijs