| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Procedures
Ed Lufker wrote:
>
> How do you pull out all procedures owned by one user and put
> the
> output into a file, so I can take it to another db and complie them
> there.
> I would like to use sql to do it and do it in a few steps rather than
> using OEM and doing the cut and paste thing.
Run this PL/SQL block under SYSTEM:
declare
cursor c_source is
select *
from all_source
where owner in (...)
order by owner, name, decode(type, 'PACKAGE', 1, 'PACKAGE BODY',
2, 3), line;
dbms_output.put_line('/');
dbms_output.put_line('connect ' || v_source.owner || ';');
v_last_user := v_source.owner;
dbms_output.put_line('/');
dbms_output.put('CREATE OR REPLACE ');
end if;
Bye:
--
.---, G o m b o s B e r t a l a n
: :
:---'-. ,---. ,--. ,-.-. rendszerfejleszto, Oracle mernok
: : :-- : ; mailto:bgombos_at_freemail.c3.hu
,' '---' '---' ' `-'
-- : ------------------------- Az elet megis egy habostorta? --- '10^2-1
Received on Tue Mar 16 1999 - 03:26:18 CST
![]() |
![]() |