jeudi 8 septembre 2011

Oracle 11g : How to retrieve the source code of a procedure

Look the content of the user_source table:
desc user_source;
NAME   VARCHAR2(30)
TYPE   VARCHAR2(12)
LINE   NUMBER
TEXT   VARCHAR2(4000)

You can issue the following SQL request to find the source code of a specific procedure :
SELECT text
FROM   user_source
WHERE  name = 
AND    type = 'PROCEDURE'
ORDER BY line;