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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Tip of the Month

Re: PL/SQL Tip of the Month

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: 1998/05/11
Message-ID: <35569555.197F@bhp.com.au>#1/1

Rudi Demeulenaere wrote:
>
> info_at_revealnet.com wrote:
>
> > Have you ever wondered how you can get a list of the names of the procedures
> > and functions in your package? The data dictionary does not, unfortunately,
> > offer a view that contains the list of elements defined in a package
> > specification (that would be so incredibly useful!). There are, however, a
> > couple of ways to get at this information.
>
> Speaking of which,does anyone know a way to export the *packages* (+proc's,
> functions) of a *user*
> and only the packages (so no tables, not even the empty versions of them) ?
> This in a way that these can be imported in another database (so without
> exporting
> the whole database).
>
> A lead to a solution is also welcome.
>
> Thanks in advance,
>
> r u d i
> (remove anti-spam measure from reply-address)

A (very) quick and dirty...

select
  decode(line,1,'/'||chr(10)||'create or replace '||text,text) from user_source
order by name, type, line;

spool the output to file and run it thru SQL Plus...

(Not a great soln since it does not preserve dependencies)

Cheers

-- 
==========================================
Connor McDonald
BHP Information Technology
Perth, Western Australia
"These views mine not BHP..etc etc"

"The only difference between me and a madman is that I am not mad."
Received on Mon May 11 1998 - 00:00:00 CDT

Original text of this message

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