SQL to show code of stored procedure

by lordog
by lordog

I was doing some system checking the other day and I needed to find out what a certain stored procedure did. But I couldn’t readly see how to view the code of the stored procedure. After some digging of google I found how to use SQL command to show code of stored procedure in Oracle at AjaxApp.com.
I had to make a few changes to view what I wanted and came up with this

SELECT text FROM dba_source WHERE name=’proc_name';

Of course you will need to replace proc_name with the name of the stored procedure you want to view the code of.