Home » SQL & PL/SQL » SQL & PL/SQL » How to view a stored procedure definition in Oracle
How to view a stored procedure definition in Oracle [message #21287] Wed, 24 July 2002 09:19 Go to next message
Del Wester
Messages: 2
Registered: July 2002
Junior Member
I wanted to know if there is a system stored procedure or other PL-SQL method for viewing the definition of a stored procedure? The equivalent in MS SQL Server is the system stored procedure sp_helptext.
Thanks.
Re: How to view a stored procedure definition in Oracle [message #21289 is a reply to message #21287] Wed, 24 July 2002 09:54 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
There is no built-in procedure. You can view the code in user_source (or all_ or dba_) or use a script to extract and format the code, like:

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:743825617527
Re: How to view a stored procedure definition in Oracle [message #21321 is a reply to message #21287] Fri, 26 July 2002 00:42 Go to previous messageGo to next message
Laxman Chepuri
Messages: 8
Registered: May 2002
Junior Member
SELECT TEXT FROM USER_SOURCE WHERE NAME='PROCEDURE NAME(UPPER CASE)'
Re: How to view a stored procedure definition in Oracle [message #21328 is a reply to message #21287] Fri, 26 July 2002 06:29 Go to previous message
Del Wester
Messages: 2
Registered: July 2002
Junior Member
Thanks guys. The SELECT TEXT FROM USER_SOURCE WHERE NAME='PROCEDURE NAME(UPPER CASE)' works great with a paragraph format function. Just what I was looking for.
Previous Topic: Getting total sum
Next Topic: reverse
Goto Forum:
  


Current Time: Fri Apr 26 03:49:34 CDT 2024