Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: split
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:
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 Received on Fri Aug 06 1999 - 15:49:06 CDT
![]() |
![]() |