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: Export Split Script

RE: Export Split Script

From: Rachel Carmichael <carmichr_at_hotmail.com>
Date: Wed, 16 May 2001 19:46:31 -0700
Message-ID: <F001.00305B27.20010516193031@fatcity.com>

de nada -- just trying to beat my fan club (thanks Ruth and Bill :) ) to the punch.

Now..... in 8i (not sure which flavor) you can have export do the split as part of the export. I don't think it compresses it but it will at least break the files down

>From: "Armstead, Michael A" <maa25681_at_GlaxoWellcome.com>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: Export Split Script
>Date: Wed, 16 May 2001 14:05:29 -0800
>
>Thanks, Rachel. You're a sweetheart.
>
>Michael Armstead
>Application Database Administrator, OCP-Certified
>US Pharmaceuticals IT
>Glaxo SmithKline
>
> > -----Original Message-----
> > From: Rachel Carmichael [SMTP:carmichr_at_hotmail.com]
> > Sent: Wednesday, May 16, 2001 5:28 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: Export Split Script
> >
> > there is a note out on Metalink on how to do this. You can also break
>the
> > export into separate files in later versions of Oracle8i. or you can run
> > the
> > following script (modified to suit your system, it was last tested on
> > Solaris/Oracle 7.3.4)
> >
> > #!/bin/sh
> > #
> > cd $EXPORT_DIR
> > #
> > # set maximum file size for each chunk of the export file
> > #
> > MAXFILESIZE=2000m
> > export MAXFILESIZE
> > #
> > # create filenames for the parts of the backup... for now let's go to 3
> > #
> > FILENAME1=$EXPORT_DIR/backup1_$ORACLE_SID.dmp
> > FILENAME2=$EXPORT_DIR/backup2_$ORACLE_SID.dmp
> > FILENAME3=$EXPORT_DIR/backup3_$ORACLE_SID.dmp
> > LOGFILE=$EXPORT_DIR/backup_$ORACLE_SID.log
> > #
> > # save off the old ones
> > #
> > mv $FILENAME1 $FILENAME1.old
> > if [ -f $FILENAME2 ]
> > then
> > mv $FILENAME2 $FILENAME2.old
> > fi
> > if [ -f $FILENAME3 ]
> > then
> > mv $FILENAME3 $FILENAME3.old
> > fi
> > mv $LOGFILE $LOGFILE.old
> > #
> > # create the pipes
> > #
> > mkfifo exportpipeaa
> > mkfifo exportpipeab
> > mkfifo exportpipeac
> > mkfifo wrkpipe
> > umask 000
> > #
> > # start the readers from the pipes to create the export files
> > #
> > dd if=exportpipeaa of=$FILENAME1 &
> > dd if=exportpipeab of=$FILENAME2 &
> > dd if=exportpipeac of=$FILENAME3 &
> > #
> > # start the reader from the wrkpipe to compress and split the export
> > #
> > dd if=wrkpipe|compress|split -b $MAXFILESIZE - exportpipe &
> > #
> > # start the export for real
> > #
> > exp "/" file=wrkpipe full=y compress=n buffer=4096000 LOG=$LOGFILE
> > #
> > # clean up after ourselves
> > #
> > rm exportpipeaa exportpipeab exportpipeac wrkpipe
> > #
> > # if you haven't used all the pipes, the dd may still linger on
> > # make sure to REALLY clean up
> > #
> > ps -ef|grep exportpipe|grep -vi grep|awk '{printf ("kill -9 %d;
> > \n",$2)}'>kill.lst
> > chmod u+x kill.lst
> > sh kill.lst
> > rm kill.lst
> >
> >
> >
> > now to import from those split files"
> >
> >
> > #!/bin/sh
> > #
> > cd $EXPORT_DIR
> > #
> > # create filenames for the parts of the backup... for now let's go to 3
> > #
> > FILENAME1=$EXPORT_DIR/backup1_$ORACLE_SID.dmp
> > FILENAME2=$EXPORT_DIR/backup2_$ORACLE_SID.dmp
> > FILENAME3=$EXPORT_DIR/backup3_$ORACLE_SID.dmp
> > LOGFILE=$EXPORT_DIR/backup_$ORACLE_SID.log
> > #
> > # create the pipe to import from
> > #
> > mkfifo wrkpipe
> > umask 000
> > #
> > # start the reader from the import pipe
> > #
> > imp "/" file=wrkpipe full=y commit=y buffer=4096000 LOG=$LOGFILE &
> > #
> > # create the import stream coming from the pipes
> > #
> > cat $FILENAME1 $FILENAME2 $FILENAME3 | uncompress | dd of=wrkpipe
> > #
> > # clean up the import pipe
> > #
> > rm wrkpipe
> >
> >
> >
> > >From: "Armstead, Michael A" <maa25681_at_GlaxoWellcome.com>
> > >Reply-To: ORACLE-L_at_fatcity.com
> > >To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> > >Subject: RE: Export Split Script
> > >Date: Wed, 16 May 2001 13:07:24 -0800
> > >
> > >Rajaram,
> > >
> > >Please give me details on how to use mknod to split export files larger
> > >than
> > >2 GB. We have broken our jobs into over 50 separate export jobs on the
> > >table
> > >level just to keep our files less than 2GB.
> > >
> > >Michael Armstead
> > >Application Database Administrator, OCP-Certified
> > >US Pharmaceuticals IT
> > >Glaxo SmithKline
> > >
> > > > -----Original Message-----
> > > > From: Rajaram [SMTP:rajaram_k_at_netzero.net]
> > > > Sent: Wednesday, May 16, 2001 4:31 PM
> > > > To: Multiple recipients of list ORACLE-L
> > > > Subject: RE: Export Split Script
> > > >
> > > > If you are using Oracle on Unix , You may want to use unix pipes (
> > >mknod).
> > > > - most people use this method to manage files > 2GB.
> > > >
> > > > Rajaram
> > > > (Now that I am at the top of a mountain - I dont know how to get
> > down!)
> > > >
> > > > -----Original Message-----
> > > > From: Smith, Ron L. [SMTP:rlsmith_at_kmg.com]
> > > > Sent: Wednesday, May 16, 2001 3:57 PM
> > > > To: Multiple recipients of list ORACLE-L
> > > > Subject: Export Split Script
> > > >
> > > > I tries using a compressed export and the output is still over 2G.
> > Does
> > > > anyone have the export script that splits the export files into
> > multiple
> > > > files?
> > > >
> > > > Ron Smith
> > > > Database Administration
> > > > rlsmith_at_kmg.com
> > > >
> > > >
> > > > NetZero Platinum
> > > > No Banner Ads and Unlimited Access
> > > > Sign Up Today - Only $9.95 per month!
> > > > http://www.netzero.net
> > > > --
> > > > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > > > --
> > > > Author: Rajaram
> > > > INET: rajaram_k_at_netzero.net
> > > >
> > > > 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
> > > > also send the HELP command for other information (like subscribing).
> > >
> > >--
> > >Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > >--
> > >Author: Armstead, Michael A
> > > INET: maa25681_at_GlaxoWellcome.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
> > >also send the HELP command for other information (like subscribing).
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Rachel Carmichael
> > INET: carmichr_at_hotmail.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
> > also send the HELP command for other information (like subscribing).
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Armstead, Michael A
> INET: maa25681_at_GlaxoWellcome.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
>also send the HELP command for other information (like subscribing).



Get your FREE download of MSN Explorer at http://explorer.msn.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: carmichr_at_hotmail.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
also send the HELP command for other information (like subscribing).
Received on Wed May 16 2001 - 21:46:31 CDT

Original text of this message

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