3
votes

I am able to retrieve a list of all procedures by querying dba_procedures. However I am only able to extract the procedure names. But I also need their parameters.

Now, I know that I can access the "text source of the stored objects accessible to the current user" by querying the all_source table.

However is there any other way to retrieve the parameters of a procedure?

2
There is no db_procedures view or table in Oraclea_horse_with_no_name
@Ben meant DBA_PROCEDURESMark Stewart
Sorry - yes, I meant DBA_PROCEDURES. Thanks Mark. Edited my post with correction.JB2

2 Answers

9
votes

You can query the parameters using SYS.ALL_ARGUMENTS Table:

SELECT * FROM SYS.ALL_ARGUMENTS WHERE 
  PACKAGE_NAME = '<null_or_package_name>' AND 
  OBJECT_NAME = '<procedure_name>';
2
votes

From SQL*Plus or SQL Developer, you can use the DESCribe procedure_name command:

Oracle> desc dbms_metadata
FUNCTION ADD_TRANSFORM RETURNS NUMBER
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 HANDLE                         NUMBER                  IN
 NAME                           VARCHAR2                IN
 ENCODING                       VARCHAR2                IN     DEFAULT
 OBJECT_TYPE                    VARCHAR2                IN     DEFAULT
FUNCTION CHECK_MATCH_TEMPLATE RETURNS NUMBER
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 POBJNO                         NUMBER                  IN
 SPCNT                          NUMBER                  IN
...