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

Home -> Community -> Usenet -> c.d.o.server -> Re: split

Re: split

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 09 Aug 1999 22:17:07 +0800
Message-ID: <37AEE2E3.658F@yahoo.com>


Thomas Kyte wrote:
>
> A copy of this was sent to andreyNSPAM_at_bookexchange.net (NetComrade)
> (if that email address didn't require changing)
> On Fri, 06 Aug 1999 18:55:08 GMT, you wrote:
>
> >Hi,
> >
> >Let's say I used split to split the file for an Oracle Export. (over 2
> >Gig)
> >
> >How would I put the file together during import.
> >
> >Thanx
> >---------------
> >Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 373-5417
> >AOL: NetComrade ICQ: 11340726 remove NSPAM to email
>
> could look like this:
>
> -----------------------------------------------
> #!/bin/csh -vx
>
> setenv UID sys/xxxxxxx
> setenv FN exp.`date +%j_%Y`.dmp
> setenv PIPE /tmp/exp_tmp.dmp
>
> setenv MAXSIZE 500m
> setenv EXPORT_WHAT full=y
>
> echo $FN
>
> cd /nfs/atc-netapp1/expbkup
> ls -l
>
> rm expbkup.log export.test exp.*.dmp* $PIPE
> mknod $PIPE p
>
> date > expbkup.log
> ( gzip < $PIPE ) | split -b $MAXSIZE - $FN. &
> exp userid=$UID buffer=20000000 file=$PIPE $EXPORT_WHAT >>& expbkup.log
> date >> expbkup.log
>
> date > export.test
> cat `echo $FN.* | sort` | gunzip > $PIPE &
> imp userid=sys/o8isgr8 file=$PIPE show=y full=y >>& export.test
> date >> export.test
>
> tail expbkup.log
> tail export.test
>
> ls -l
> rm -f $PIPE
> -----------------------------------------------
>
> that uses gzip to compress the files and split to break them out 500m at a time.
>
> To put them back together again, I use
>
> cat `echo $FN.* | sort` | gunzip > $PIPE &
>
> this script exports a full database and runs import on the export to 'test' it
> afterwards (with show=y so it just creates a file full of DDL, doesn't import it
> actually)
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle Corporation

On a similar note, is there any workaround to "show=y" putting nice little line breaks in the middle of DDL strings...

I've been doing strings on the raw export files for years - but surely there is a nicer way ???

--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Mon Aug 09 1999 - 09:17:07 CDT

Original text of this message

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