Friday, September 6, 2013

Oracle Database JVM Integrity Test

To check if you have any issues with Oracle Database JVM:

Login to Oracle Database as sysdba and run the following queries.

1. Determine if any Java (custom or seeded) objects exist:
   
SELECT owner, count(*) FROM ALL_OBJECTS  WHERE object_type LIKE '%JAVA%' GROUP BY owner;
   
2. List of all java valid objects:

select OWNER, OBJECT_TYPE, COUNT(*) FROM ALL_OBJECTS WHERE OBJECT_TYPE LIKE 'JAVA%' AND STATUS = 'VALID'  GROUP BY OWNER, OBJECT_TYPE;
   
3. List of all java invalid objects:

select OWNER, OBJECT_TYPE, COUNT(*) FROM ALL_OBJECTS WHERE OBJECT_TYPE LIKE 'JAVA%' AND STATUS = 'INVALID'  GROUP BY OWNER, OBJECT_TYPE;
   
4. Determine if the component JAVAVM was loaded / installed etc  (For 9i and above)

select comp_id, comp_name, status, version from dba_registry;
   
5. Check for the JVM packages:

select object_name, object_type, owner, status from all_objects where object_name like '%DBMS_JAVA%';
   
select object_name, object_type, owner, status from all_objects where object_name like '%INITJVMAUX%';
   
6. Check what java roles exist

select role from dba_roles where role like '%JAVA%';

Thanks.

No comments:

Post a Comment