Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How do I see the source code of a stored procedure through Sql*plus ?

Re: How do I see the source code of a stored procedure through Sql*plus ?

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Wed, 17 Mar 1999 22:25:13 +0100
Message-ID: <36f021e2$0$22598@newton>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US