Alex Rivera | Logout

how to print out the definition of a procedure in Oracle?

Asked 2011-08-23T20:45:10.620
17

Is there a way in oracle to see what a procedure's structure is? I'm trying to log and am running procedures and wanted to store the actual procedure structure in my log.

Edit
Report

1 Answer

5
SELECT TEXT, LINE FROM ALL_SOURCE WHERE 
    NAME = UPPER('$name') -- the table also has an owner field to track the user
    ORDER BY TYPE, -- type is generally procedure, but there are functions and 
                   -- more complex structures as well, such as PACKAGE
    TO_NUMBER( LINE )
answered 2011-08-23T20:48:35.100

Your Answer