Check source code for procedure & function in PL/SQL

Check the source code of PL/SQL objects

User: only user created one access the source, DBA prefix access all source present in database, ALL prefix access user created plus user has permission to access.

SELECT * FROM user_source;
OR
SELECT * FROM dba_source;
OR
SELECT * FROM all_source WHERE owner=:owner;

Check the source code for Procedure:

SELECT * FROM user_source WHERE TYPE='PROCEDURE' order by line;

Check the source code for Function:

SELECT * FROM user_source WHERE TYPE='FUNCTION' order by line;

Check the source code for trigger:

SELECT * FROM user_source WHERE TYPE='TRIGGER' order by line;

Check the source code for Package and Package Body:

SELECT * FROM user_source WHERE TYPE='PACKAGE' order by line;
SELECT * FROM user_source WHERE TYPE='PACKAGE BODY' order by line;

Check the source code for type and type body:

SELECT * FROM user_source WHERE TYPE='TYPE' order by line;
SELECT * FROM user_source WHERE TYPE='TYPE BODY' order by line;

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.