This discussion is archived
5 Replies Latest reply: Feb 14, 2013 3:06 AM by Paul M. RSS

how to convert the dmp file to gzip file while uploading.

877826 Newbie
Currently Being Moderated
Hi All,

i am using below unix command to exporting table data to other sever . But my requirement is i need to convert dmp file to ".gz" file . is it possible to convert it during exporting .

My Command is given below :

expdp username/password tables=sample directory=test_direcotry dumpfile=sample.dmp.gz logfile=sample.log

but the file has been converted into ".gz" file but i am not sure whether the tables has been ziped or not.

please help me from this problem.

Thanks
Sree
  • 1. Re: how to convert the dmp file to gzip file while uploading.
    Dude! Guru
    Currently Being Moderated
    How about the following:
    # NFS share
    cd /export
    
    mknod pipe_exp p
    # Gzip in the background
    nohup gzip < pipe_exp > sample.dmp.gz &
    
    expdp username/password tables=sample \
    full=y direct=y compress=n buffer=10485760 \
    dumpfile=pipe_exp logfile=sample.log
  • 2. Re: how to convert the dmp file to gzip file while uploading.
    EdStevens Guru
    Currently Being Moderated
    874823 wrote:
    Hi All,

    i am using below unix command to exporting table data to other sever . But my requirement is i need to convert dmp file to ".gz" file . is it possible to convert it during exporting .

    My Command is given below :

    expdp username/password tables=sample directory=test_direcotry dumpfile=sample.dmp.gz logfile=sample.log

    but the file has been converted into ".gz" file but i am not sure whether the tables has been ziped or not.
    What do you mean "i am not sure whether the tables has been ziped".
    expdp is the oracle utility for exporting a database or selected portions of a database. (one could argue that it is not a "unix command", since it is an executable supplied by a third party). The output is a single file. In its simplest conceptual terms, that file contains a bunch of CREATE and INSERT statements. But it is a single file. When you zip it, you are zipping the file. The zip utility itself doesn't know or care about "tables" or anything else that may or may not be in the file. It is simply applying a mathematical algorithm byte by byte.

    please help me from this problem.

    Thanks
    Sree
  • 3. Re: how to convert the dmp file to gzip file while uploading.
    Paul M. Oracle ACE
    Currently Being Moderated
    mknod pipe_exp p
    # Gzip in the background
    nohup gzip < pipe_exp > sample.dmp.gz &

    expdp username/password tables=sample \
    full=y direct=y compress=n buffer=10485760 \
    dumpfile=pipe_exp logfile=sample.log
    Are you sure that works ? Also, isn't there a mix of exp and expdp parameters ?
  • 4. Re: how to convert the dmp file to gzip file while uploading.
    Dude! Guru
    Currently Being Moderated
    Actually I have not used the export or datapump utility for the last 2 years and obviously forgotten some of its command line stuff. I did not think though the utility as such was in the focus of the question. So anyway, I took the chance to refresh my memory and can confirm that the below works for the export utility. Unfortunately not with datapump though.
    exp username/password tables=sample \
    direct=y compress=n buffer=10485760 \
    file=pipe_exp log=sample.log
  • 5. Re: how to convert the dmp file to gzip file while uploading.
    Paul M. Oracle ACE
    Currently Being Moderated
    I did not think though the utility as such was in the focus of the question.
    Yes, and my first (tendentious :) ) question was related to GZIPing "on the fly" using expdp, which does not work, as per MOS Doc.ID 463336.1 Is It Possible To Use DataPump Export (EXPDP) Directly With GZIP?

    Edited by: Paul M. on Feb 14, 2013 12:04 PM

    Of course we can use COMPRESSION option on 11g.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points