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;