FETCH A PROCEDURE DEFINITION

HOW TO FETCH A PROCEDURE DEFINITION


SELECT TEXT FROM USER_SOURCE WHERE TYPE = ‘PROCEDURE’ AND NAME = PROCEDURE_NAME;

— EXAMPLE
SELECT DBMS_METADATA.GET_DDL(‘TABLE’,’EMP_TABLE’) FROM DUAL;
SELECT DBMS_METADATA.GET_DDL(‘PROCEDURE’,’EMP_DETAILS_PROC’) FROM DUAL;

SELECT TEXT
FROM USER_SOURCE
WHERE NAME IN (‘application_func_name_here’)
ORDER BY LINE; — order is very important

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s