Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewing procedures

Status
Not open for further replies.

Jalr2003

Technical User
May 15, 2003
26
0
0
US
Hi,

Is there a way to retreive the source code of a procedure using sqlplus? I use describe, but I does not show the code.

If not, what is the best way?

Thanks,

Jalr2003
 
SELECT text
FROM dba/all/user_source
WHERE name = 'MY_PROCEDURE'
ORDER BY line;

Elbert, CO
0835 MST
 
I'l also suggest to specify TYPE (as both package spec and body share the same name), and probably OWNER for DBA_|ALL_ views.

Regards, Dima
 
to see the full text remember to execute a "set long 20000" before to execute the select command.
 
Sbix, contrary to USER|ALL|DBA_VIEWS, USER|ALL|DBA_TABLES doesn't contain LONG fields: sources are stored line-by-line in VARCHAR2s. So your advise passes ahead of Jalr2003's coming question: how to get view creation statement :)

Regards, Dima
 
Aaaaargh!!!! You're correct ... as usual ... SHAME ON ME!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top