Path: news.easynews.com!core-easynews!newsfeed3.easynews.com!easynews.com!easynews!news.glorb.com!postnews2.google.com!not-for-mail
From: gagnech@rogers.com (Chris)
Newsgroups: comp.databases.oracle,comp.databases.oracle.misc
Subject: Re: obtaining the PL/SQL code of packages ??
Date: 7 Jul 2004 14:30:05 -0700
Organization: http://groups.google.com
Lines: 38
Message-ID: <3d4d53e6.0407071330.788d34bb@posting.google.com>
References: <68aecc05.0407020849.2448342d@posting.google.com> <336da121.0407060832.6aeead69@posting.google.com>
NNTP-Posting-Host: 192.234.223.100
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1089235806 20131 127.0.0.1 (7 Jul 2004 21:30:06 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 7 Jul 2004 21:30:06 +0000 (UTC)
Xref: core-easynews comp.databases.oracle:28137 comp.databases.oracle.misc:111562
X-Received-Date: Wed, 07 Jul 2004 14:29:15 MST (news.easynews.com)

afilonov@yahoo.com (Alex Filonov) wrote in message news:<336da121.0407060832.6aeead69@posting.google.com>...
> gelewyc@nyct.com (george lewycky) wrote in message news:<68aecc05.0407020849.2448342d@posting.google.com>...
> > Hello,
> > 
> > I'm trying to find out HOW or WHERE to retrieve the actual PL/SQL code
> > of the PACKAGE BODY.
> > 
> > Currently the only means I know of is TOAD's SCHEMA BROWSER.
> > 
> > Any ideas or suggestions would be really appreciated
> > 
> > Thanks 
> > 
> > George Lewycky
> > http://georgenet.net/oracle
> 
> Select text
> from all_source
> where owner = '<Package owner>'
>   and type = 'PACKAGE BODY'
>   and name = '<Package name>'


If you are using Oracle9i, there's also the get_ddl option:

set pagesize 0
set long 90000
SELECT DBMS_METADATA.GET_DDL('PACKAGE_BODY','PK_SOMENAME') FROM dual;


set pagesize 0
set long 90000
SELECT DBMS_METADATA.GET_DDL('PACKAGE','PK_SOMENAME') FROM dual;


you can generate pretty much anything using this.

chris
