RE: display Oracle function objects source code / SQL

  • From: <Joel.Patterson@xxxxxxxxxxx>
  • To: <aluoor@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 21 Jun 2010 10:08:09 -0400

This will work for PACKAGES also as it orders by type (get package and body if 
both exist).  Don't need to specify type as no two types can have the same name.

set pause off
set heading off
set trimout on
set linesize 300
set pagesize 1000
select text from user_source where name like upper('&1')
 order by TYPE, name, line, text;
set heading on
set linesize 300
set pagesize 300

undefine 1


Joel Patterson
Database Administrator
904 727-2546

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Sven Aluoor
Sent: Monday, June 21, 2010 9:17 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: display Oracle function objects source code / SQL

On Mon, Jun 21, 2010 at 3:01 PM, Dunbar, Norman
<norman.dunbar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi Sven,

> You need to look in the USER_SOURCE view:
>
>        Select text
>        from user_source
>        where type = 'FUNCTION'
>        and name = 'WHATEVER'
>        order by line;

[...]

Hi folks

thanks for all answers.

have a nice day

cheers Sven
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: