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;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply