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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to export a package and a procedure

Re: How to export a package and a procedure

From: GovindanK <gkatteri_at_fastmail.fm>
Date: Mon, 16 Jul 2007 06:26:33 UT
Message-Id: <1184567193.7539.1200320749@webmail.messagingengine.com>


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

  from user_source
 where name = upper('&&1')
 order by type, line;
prompt /
prompt set define on
prompt set echo on
spool off
set feedback on
set heading on
set termout on
set linesize 100

 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

  1. mailto:'@getcode
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 16 2007 - 01:26:33 CDT

Original text of this message

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