#22 Java in the objects list

Future
open
nobody
SQL (16)
3
2005-01-06
2005-01-06
Drzewiecki T.
No

It will be usefull to have the same functionality as TOAD
have for java classes. General query:

SELECT * FROM all_objects WHERE OBJECT_TYPE IN
('JAVA CLASS', 'JAVA RESOURCE', 'JAVA SOURCE')

Different object types and its usage:
SELECT object_type,Count(*) FROM ALL_objects GROUP
BY object_type

Discussion

  • Logged In: YES
    user_id=423922

    What can we do with Java stuff? Should we just list those
    objects or provide some operations?

     
  • Drzewiecki T.
    Drzewiecki T.
    2005-01-07

    Logged In: YES
    user_id=747155

    TOAD has:
    - compile,create public synonym,drop (for class)
    - create script, compile, save to file, edit, drop (for source)

    I think, that most useful will be:
    - list&drop for class/source/resource

     
  • Drzewiecki T.
    Drzewiecki T.
    2005-06-15

    Logged In: YES
    user_id=747155

    DDL Generation:
    http://www.dbonline.cn/source/oracle/20031213before/SQL/ge
    nerating%20DDL%20using%20DBMS_METADATA.htm

    I have got amazing results with
    DBMS_METADATA.GET_DDL!
    Example of getting java sources:

    SELECT DBMS_METADATA.GET_DDL('JAVA_SOURCE',
    object_name) FROM all_objects WHERE object_type='JAVA
    SOURCE'

     
  • Drzewiecki T.
    Drzewiecki T.
    2005-06-22

    Logged In: YES
    user_id=747155

    I found a good way to extract information about Java
    resources:

    SELECT object_name, SYS.DBMS_JAVA.LONGNAME
    (object_name) long_object_name, object_type, status
    FROM sys.all_objects
    WHERE object_type IN
    ('JAVA CLASS', 'JAVA SOURCE', 'JAVA
    RESOURCE', 'JAVA DATA')
    AND owner=USER;