Sunday, June 25, 2006

Oracle Import Through Uncompressing Pipe

If there is not enough disk space to uncompress the dmp file, import can read from a pipe. This is similar to export into a compressing pipe.

Put this into a sh script file, and set your environment with the appropriate Oracle variables.
# The COMPRESSED dump file name.
DMPFILE=/u01/data/exportfile.dmp.Z

DT=`date +%Y%m%d%H`
PIPENAME=/tmp/pipe.$$

$(mknod $PIPENAME p)
/usr/bin/uncompress < $DMPFILE > $PIPENAME &

imp userid=user/pass file=$PIPENAME log=/tmp/imp_$DT.log fromuser=fromschemaowner touser=toschemaowner

No comments:

Post a Comment