expdp in 10g [message #420924] |
Thu, 03 September 2009 05:50 |
jayraj005
Messages: 6 Registered: January 2009 Location: Hyderabad
|
Junior Member |
|
|
Hi,
Can we use pipe and compress with expdp in 10g. I need to convert following exp script to use expdp. But it is not working with expdp.
export DBNAME=$1
export EXPORT_DIR=/stg/export/$DBNAME/daily
export LOG_DIR=/stg/export/$DBNAME/log
export OUTFILE=$LOG_DIR/dwexp_daily.out
cd $EXPORT_DIR
echo "Export starting at: `date`" > $OUTFILE 2>&1
#
# set maximum file size for each chunk of the export file
#
MAXFILESIZE=1000m
export MAXFILESIZE
#
# create filenames for the parts of the backup... for now let's go to 3
#
FILENAME1=$EXPORT_DIR/daily1.dmp
FILENAME2=$EXPORT_DIR/daily2.dmp
FILENAME3=$EXPORT_DIR/daily3.dmp
LOGFILE=$LOG_DIR/dwexp_daily.log
#
# create the pipes
#
mkfifo dailypipeaa
mkfifo dailypipeab
mkfifo dailypipeac
mkfifo dailywrkpipe
umask 000
#
# start the readers from the pipes to create the export files
#
dd if=dailypipeaa of=$FILENAME1 >> $OUTFILE 2>&1 &
dd if=dailypipeab of=$FILENAME2 >> $OUTFILE 2>&1 &
dd if=dailypipeac of=$FILENAME3 >> $OUTFILE 2>&1 &
#
# start the reader from the wrkpipe to compress and split the export
#
dd if=dailywrkpipe 2>> $OUTFILE | compress | split -b $MAXFILESIZE - dailypipe >> $OUTFILE 2>&1 &
#
# start the export for real
#
exp dwuser/<pwd> FILE=dailywrkpipe parfile=daily_expparms.dat LOG=$LOGFILE >> $OUTFILE 2>&1
STATUS=$?
#
# clean up after ourselves
#
rm dailypipeaa
rm dailypipeab
rm dailypipeac
rm dailywrkpipe
#
# if you haven't used all the pipes, the dd may still linger on
# make sure to REALLY clean up
#
ps -ef|grep dailypipe|grep -vi grep|awk '{printf ("kill -9 %d; \n",$2)}'>kill1.lst
chmod u+x kill1.lst
sh kill1.lst
rm kill1.lst
echo "Export finishing at: `date`" >> $OUTFILE 2>&1
And dat file is
[oracle@server daily]$ cat daily_expparms.dat
include=index
tables=(
ACTUAL_RETURN_DIM,
ACTUAL_RETURN_HEADER_FACT,
ACTUAL_RETURN_LINE_FACT,
AGG_CUST_PRDCLASS_OUTLOOK_FACT,
AGG_ITEM_ORDER_CYCLE_FACT,
AGG_PRDCLASS_OUTLOOK_FACT)
In our enviornment, previously we used to use exp in 9i, now we need to convert it into expdp in 10g. Is it possible to use pipe in 10g?
Thanks,
Jay
|
|
|
|
|
|