Re: obtaining the PL/SQL code of packages ??

From: Chris <gagnech_at_rogers.com>
Date: 7 Jul 2004 14:30:06 -0700
Message-ID: <3d4d53e6.0407071330.6e420df6_at_posting.google.com>


afilonov_at_yahoo.com (Alex Filonov) wrote in message news:<336da121.0407060832.6aeead69_at_posting.google.com>...
> gelewyc_at_nyct.com (george lewycky) wrote in message news:<68aecc05.0407020849.2448342d_at_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 Received on Wed Jul 07 2004 - 23:30:06 CEST

Original text of this message