How To See Contents Of A Stored Procedure In Oracle?


Ever found yourself in a situation when you need to see the code/content of a Stored Procedure in Oracle? We need to check it for troubleshooting & database optimisation.

So, below is how to do it? 😉 Make sure to use set lines 500 & set pages 500 before executing this query, so as to fit the output in a more readable format.

SELECT line, text FROM dba_source WHERE owner = 'SHASHANK' AND name = 'MY_SP' AND type = 'PROCEDURE' ORDER BY line;
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