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: Is it possible to import a package alone?

RE: Is it possible to import a package alone?

From: KLOPPING, JEFFREY L <jklopping_at_oppd.com>
Date: Thu, 26 Oct 2000 15:19:58 -0500
Message-Id: <10661.120346@fatcity.com>


When writing the results of a query to a flat file (dynamic sql, etc) and you get tired of typing all that junk in each time or cutting and pasting just create a couple scripts (I call them @flatfile.sql and @flatoff.sql... @there and @backagain would work as well) and put everything in the first one that you want to turn off and put the undo's in the second.

then you can do

@flatfile
spool xxxx.log

Select stuff from tables where things are true;

spool off
@flatoff

set feedback off
set pagesize 60
set linesize 200
set newpage 0
break on name skip page
col " " format a80 wrapped

clear breaks
clear columns
clear buffer
set heading on
set linesize 200
set pagesize 60
set feedback on

> -----Original Message-----
> From: Holman, Rodney [SMTP:rodney.holman_at_lodgenet.com]
> Sent: Thursday, October 26, 2000 2:40 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Is it possible to import a package alone?
>
> I give!
> I'll make it easier. Here's a script that pulls it from the data
> dictionary
> to a spool file. Add another where clause to specify the package name and
> you can narrow it down to specifics. This script as it is will pull all
> the
> packages for a given user. It is ment to be run from SQL*Plus so that you
> can format the output into standard readable output with lines joined and
> everything.
>
> set feedback off
> set pagesize 60
> set linesize 200
> set newpage 0
> break on name skip page
> col " " format a80 wrapped
>
> select decode(line,1,'CREATE OR REPLACE ',null) as "/", text as " "
> from dba_source
> where owner = '<SCHEMA OWNER>'
> and type like 'PACKAGE%'
> order by name, line;
>
> -- The following command creates the terminating slash at the end of the
> script.
> set heading off
> select '/'
> from dual;
>
> clear breaks
> clear columns
> clear buffer
> set heading on
> set linesize 200
> set pagesize 60
> set feedback on
>
> Rodd Holman
> Enterprise Data Systems Engineer
> LodgeNet Entertainment Corporation
> rodney.holman_at_lodgenet.com
> Comments made are my own opinions and views. They do not represent views,
> policies, or procedures of LodgeNet Entertainment Corporation
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Holman, Rodney
> INET: rodney.holman_at_lodgenet.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Thu Oct 26 2000 - 15:19:58 CDT

Original text of this message

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