Re: PL/SQL Tip of the Month

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Mon, 11 May 1998 14:06:13 +0800
Message-ID: <35569555.197F_at_bhp.com.au>


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
[Quoted] "These views mine not BHP..etc etc"

[Quoted] "The only difference between me and a madman is that I am not mad."
Received on Mon May 11 1998 - 08:06:13 CEST

Original text of this message