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: Exporting a large database

Re: Exporting a large database

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Thu, 6 Jan 2000 13:13:16 +0100
Message-ID: <947160884.22695.0.pluto.d4ee154e@news.demon.nl>


Try compressing the output first.

Here is an example

#!/usr/bin/ksh
# generic Oracle export script, will export to a COMPRESSed file
# script takes the $ORACLE_SID as command line parameter, and sets the
# correct Oracle_home by running oraenv
# Note: this script exports the database in direct mode
# Thus it will export in the character set of the database only
# the following setting has been set in .profile and needs to be commented
# out here if you want to remove it from .profile
# NLS_LANG="American_America.WE8ISO8859P1; export NLS_LANG
#
# Sybrand Bakker
#
# Revision History
# Date Who Reason
#------------------------ ---------------------------- -----------------
# 23-6-1999 Sybrand Bakker Creation
# 23-6-1999 Sybrand Bakker Include date in
filename
#

if [ $# -eq 0 ]; then
echo "Usage `basename $0` username/password oracle_sid destinationdir" 1>&2 exit
fi
dag=$(date '+%y%m%d')
echo $dag
ORAENV_ASK=NO
typeset -l osid=$2 # lowercase version in file names typeset -u ORACLE_SID=$2
. oraenv
opipe=/afs7/oradata/exp/FIFO$$.dmp
if [ -p $opipe ]; then
rm -r $opipe
fi
mknod $opipe p
destdir=${3:-/afs7/oradata/exp}
echo $destdir
cat < $opipe | compress -c > $destdir/exp${osid}_${dag}.dmp.Z & unpw=$1
exp file=$opipe \

    userid=$unpw \
    full=y\
    log=$HOME/tmp/exp${osid}_${dag}.log\     direct=y\
    compress=n\
    inctype=complete\
    grants=y
    > /dev/null 2>&1
if [ $? -eq 0 ]; then
rm -r $opipe
fi

--
Sybrand Bakker, Oracle DBA
<gcadorel_at_my-deja.com> wrote in message news:851vdd$l0f$1_at_nnrp1.deja.com...

> I'm trying to export a database with the oracle export utility and
> I'have a problem with the datafile size.
> Because, all the databases is exporting to a unique file, I reach the
> Unix size file limit. I could perhaps modify this limit, but I'd like to
> know how could I export data in severals datafiles ?
> Think's for your help
> Gilles
>
>
> Sent via Deja.com http://www.deja.com/

> Before you buy.


Received on Thu Jan 06 2000 - 06:13:16 CST

Original text of this message

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