RE: datapump export to pipe

  • From: Fmhabash <fmhabash@xxxxxxxxx>
  • To: <tony.adolph.dba@xxxxxxxxx>, Oracle Discussion List <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 9 Oct 2009 10:58:46 -0400

Let me propose an elgant way to do it. I always use it when needing to
export a db on a host with scarce storage.
I run my expdp in network mode. With this setup, I connect to db 1 on
host 1 and create a link to db 2 on host 2 inside db 1. I then run expdp
on host 1 using parameter 'network=link_to_db2. This causes db2 to get
exported to a file on host 1 over the network.
There are may exciting manuevers you can perform with the 'netwoek'
params while importing or exporting.
You can actually exp/imp from/to local/remote without ever needing to
use a dump file.

Hope this helps

---------------
Thank You.

-----Original Message-----
From: Tony Adolph <tony.adolph.dba@xxxxxxxxx>
Sent: Monday, October 05, 2009 8:53 PM
To: Oracle Discussion List <oracle-l@xxxxxxxxxxxxx>
Subject: datapump export to pipe

Hi all,

Env:  Oracle EE 10.2.0.4  RH 4.6

I'm doing exports to a filesystem with limited space so want to compress the
export on the fly, e.g.

.
.
cd $BACKUP_DIR
if [ ! -p $PIPE ] ; then
    mkfifo $PIPE
fi

echo "gzipping from $PIPE ..."
nohup gzip -c  < $PIPE > ${DMPFILE}.gz &

echo "expdp started ..."
expdp $CREDENTIALS \
      DIRECTORY=DP_EXP_DIR \
      DUMPFILE=$PIPE \
      FULL=y \
      LOGFILE=$LOGFILE
.
.

BUT,.. as you may have guessed, my plan is flawed as expdp doesn't allow
writing to a file that already exists, and of course the pipe must (exist
that is)

Does anyone have a work around for this (that doesn't involve upgrading to
11g, buying new disks, exporting to a different dir)

Thanks in advance
Tony

--
//www.freelists.org/webpage/oracle-l


Other related posts: