| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I see the source code of a stored procedure through Sql*plus ?
Emmanuel Bontemps wrote
>select line, text
>from user_source
>where name = upper(<proc_name>);
and type = 'PROCEDURE'
order by line;
Also, as text is a varchar(4000), you might want to format your output:
set pagesize 0
column line format 9990
column text format a74 word_wrapped
This is escpecially needed when you want to capture the output to create a script. Then you could also use something like:
set pagesize 0
set linesize 4000
set trimspool on
spool my_proc.sql
prompt create or replace
select text
from user_source
where name = ...
and type = 'PROCEDURE'
order by line;
spool off
Arjan. Received on Wed Mar 17 1999 - 15:25:13 CST
![]() |
![]() |