Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

Oracle

Posted Apr 29, 2003

Getting Control of the Oracle Java Virtual Machine - Page 3

By Marin Komadina



Detecting Java Status



To determine Java status for the database we can query v$option dynamic view:

SQL > Select * from v$option; 
PARAMETER                                                       VALUE
-------------------------------------------------------------- ------
Partitioning					TRUE
Objects						TRUE
Parallel Server					FALSE
Advanced replication					TRUE
Bit-mapped indexes					TRUE
Connection multiplexing				TRUE
Connection pooling					TRUE
Database queuing					TRUE
Incremental backup and recovery				TRUE
Instead-of triggers					TRUE
Parallel backup and recovery				TRUE
Parallel execution					TRUE
Parallel load					TRUE
Point-in-time tablespace recovery			TRUE
Fine-grained access control				TRUE
N-Tier authentication/authorization			TRUE
Function-based indexes				TRUE
Plan Stability					TRUE
Online Index Build					TRUE
Coalesce Index					TRUE
Managed Standby					TRUE
Materialized view rewrite				TRUE
Materialized view warehouse refresh			TRUE
Database resource manager                          		TRUE
Spatial                                                         TRUE
Visual Information Retrieval                                	TRUE
Export transportable tablespaces                         	TRUE
Transparent Application Failover                          	TRUE
Fast-Start Fault Recovery                                   	TRUE
Sample Scan                                                     TRUE
Duplexed backups                                              	TRUE
Java						FALSE
OLAP Window Functions					TRUE 

Information from the view (Java=False) for the database version 8.1.5 - 8.1.7 inaccurately reports a situation with the JVM, that Java VM is not installed. This is not necessarily accurate.

To find out the real Java status we will make two select statements:

a.) count java objects

SQL> SELECT count(*) FROM dba_objects  WHERE object_type LIKE '%JAVA%';

  COUNT(*)
----------
     10401

We have 10401 Java objects, indicating that Java has been installed. If the JVM had not been installed the count for the Java objects would be 0:

SQL> SELECT count(*) FROM dba_objects  WHERE object_type LIKE '%JAVA%';

  COUNT(*)
----------
         0

The total number of Java objects is platform dependent.

An overview of the expected count for Java objects for different Oracle versions follows:

  • Version 8.1.5 - 4000 Java objects
  • Version 8.1.6 - 8000 Java objects
  • Version 8.1.7 - 10,300 Java objects
  • Version 9.2 - 10,452 Java objects

When the Java object count is less than given version/count, Java is only partially installed. For example, a full Java installation on 9.2 will give us following list, broken down by owner:

SQL> select count(*), owner from all_objects where object_type like '%JAVA%' group by owner; 
 
  COUNT(*) OWNER 
---------- ------------------------------ 
       247 ODM             -> Data Mining 
         1 ORDPLUGINS  -> Intermedia  
       903 ORDSYS        -> Intermedia 
      9261 SYS              -> Java Basic 
        40 WKSYS           -> Ultrasearch 

b.) Check for description of all database DBMS_JAVA PL/SQL procedures and functions

SQL>  Describe DBMS_JAVA
PROCEDURE AURORA_SHUTDOWN
PROCEDURE DELETE_EP
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 HOST                           VARCHAR2                IN
 PORT                           NUMBER                  IN
 PRESENTATION                   VARCHAR2                IN
PROCEDURE DELETE_PERMISSION
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 KEY                            NUMBER                  IN
PROCEDURE DEPLOY_CLOSE
. . . 

If the Java option is not installed, an attempt to describe DBMS_JAVA PL/SQL procedures and functions will return the following error:

SQL> Describe DBMS_JAVA
ERROR:
ORA-04043: object DBMS_JAVA does not exist


Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM