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: Using split and pipe to avoid 2 GB file size limit on HP-UX for exports

Re: Using split and pipe to avoid 2 GB file size limit on HP-UX for exports

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 30 Nov 1999 10:45:47 -0500
Message-ID: <q2s74scb84m3lm01dkc4l0pdmqtlqnhh9b@4ax.com>


A copy of this was sent to "Fender" <efender_at_ix.netcom.com> (if that email address didn't require changing) On Tue, 30 Nov 1999 10:10:26 -0500, you wrote:

>I saw a procedure to do this posted here a couple months ago. It involved
>creating a FIFO pipe and split file. I have an export that has now grown
>past 2 GB. I can change the file systems to allow files greater than 2 GB,
>but some utilities (gzip, tar) do not work with files that large. If
>someone could repost the procedure, I'd appreciate it.
>
>Thanks,
>
>Eric
>
>

here it is. this uses compression and split (for when the compressed file exceeds 2gig). shows how to restore from this export as well as it uses imp show=y to test the integrity of the export file.

#!/bin/csh -vx

setenv UID sys/xxxxx
setenv FN exp.`date +%j_%Y`.dmp
setenv PIPE /tmp/exp_tmp_ora8i.dmp

setenv MAXSIZE 500m
setenv EXPORT_WHAT "full=y COMPRESS=n"

echo $FN

cd /nfs/atc-netapp1/expbkup_ora8i
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=$UID file=$PIPE show=y full=y >>& export.test date >> export.test

tail expbkup.log
tail export.test

ls -l
rm -f $PIPE

--
See http://osi.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 Tue Nov 30 1999 - 09:45:47 CST

Original text of this message

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