Posts Tagged imp

TOD – Compressing exports on the fly

There is a tip on compressing those wily exports, when there isn’t enough space to store an uncompressed export. I have been doing this since I got off of VMS and on to unix back at V7 and it works fine all the way through 11g exp and datapump.

Perform all of these commands as the oracle user.
1. create a named pipe in unix:

 $ mknod /tmp/pp p

2. Send the output of a compression command (gzip, compress, etc) to the pipe in the background:

$ gzip < /tmp/pp > /backup/full_exp.dmp.gz &
or
$ compress < /tmp/pp > /backup/full_exp.dmp.Z &

3. Send the output of your export command to the named pipe:

 $ exp sys/joepassword file=/tmp/pp full=y ...

That is all there is to it, to import from the same compressed file:
1. make the pipe again if not already there
2. start up a background process to run the uncompress:

$ gunzip < /backup/full_exp.dmp.gz > /tmp/pp &

3. finally import as you normally would:

 $ imp sys/joepassword file=/tmp/pp full=y ...

You can always uncompress the files manually then import if you wish.

, , , ,

No Comments