Search code examples
oracle-sqldeveloperdbeaver

See Oracle SQL Developer Procedure's Details in Dbeaver


I am new for using DBeaver. Can I see Oracle SQL Developer Procedure's Details in Dbeaver?

like this enter image description here


Solution

  • Use the data dictionary.


    You can get details of the object using:

    SELECT *
    FROM   ALL_OBJECTS
    WHERE  object_name = 'PROCEDURE_NAME';
    

    You can get further details on the procedure using:

    SELECT *
    FROM   ALL_PROCEDURES
    WHERE  object_name = 'PROCEDURE_NAME';
    

    You can get even more details on the compilation settings using:

    SELECT *
      FROM all_plsql_object_settings
     WHERE name = 'PROCEDURE_NAME'
    

    You can combine it all into one query:

    SELECT o.owner,
           o.object_name,
           o.subobject_name,
           o.object_id,
           o.data_object_id,
           o.object_type,
           o.created,
           o.last_ddl_time,
           o.timestamp,
           o.status,
           o.temporary,
           o.generated,
           o.secondary,
           o.namespace,
           o.edition_name,
           s.nls_length_semantics,
           s.plsql_ccflags,
           s.plsql_code_type,
           s.plsql_debug,
           s.plsql_optimize_level,
           s.plsql_warnings
    FROM   all_objects o
           LEFT OUTER JOIN all_plsql_object_settings s
           ON (o.owner = s.owner AND o.object_name = s.name AND o.object_type = s.type)
    WHERE  o.object_name = 'PROCEDURE_NAME';
    

    fiddle