Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to export a package and a procedure
Here is something i have been using for the last few years with
good results (pulled this one from asktom long ago .. worth its
weight in gold)
$ more getcode_all.sql
set heading off
set feedback off
set linesize 100
set trimspool on
spool getcode_all.out
select [1]'@getcode ' || object_name
from user_objects
where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
/
spool off
set heading on
set feedback on
set linesize 130
set termout on
@getcode_all.out
$ more getcode.sql
set feedback off
set heading off
set termout off
set linesize 1000
set trimspool on
set verify off
spool &1..sql
prompt set define off
prompt set echo off
select decode( type||'-'||to_char(line,'fm99999'),
'PACKAGE BODY-1', '/'||chr(10), null) || decode(line,1,'create or replace ', '' ) || text text
HTH
GovindanK
On Sat, 14 Jul 2007 02:56:15 +0530, "nilesh kumar" <nileshkum_at_gmail.com>
said:
Hello All,
I have an issue i need to export a package and a procedure too
which is present in another package , is there any solution
for this in datapump or exp utility.Or is there any other
solution for this to do pls help , i am using 9i and 10g both
.
Thanks
Nilesh soni
References
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jul 16 2007 - 01:26:33 CDT
![]() |
![]() |