DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Oracle export file

  1. #1
    Join Date
    Apr 2007
    Posts
    24

    Oracle export file

    I take oracle export and compress (gzip)on the fly. The export file is about 4.02G and when compressed on the fly, it reduces to about 117KB.

    When I uncompress (gunzip) the export file, I get 2592KB.

    My first concern is when I gunzip the file, why the size of the dmp file is not same as
    when exported (4 GB).
    When I use the uncompressed export file to do an import of the table, it never happens and I do not get any error too. The export is done by system (on prod) and imported by the user sloslive to user sloslive on the test server. The user (sloslive) on both systems (prod and test) are exact replica as the test server is built using backup of the prod.

    Any help is appreciated.
    Thanks

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    1- If you compress it on-the-fly during export you want to uncopress it on-the-fly during import.

    2- Since sloslive exists in both environments, use this account to both export and import.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Apr 2007
    Posts
    24

    parfile

    Could you please let me know what I should have in my parfile? or how to do it on the command line?

    This is what it looks like

    buffer=100000
    fromuser=sloslive
    touser=sloslive
    log=imp_hvh.log
    file=bpcs.dmp (i gunzipped it first)
    tables=hvh

    Should I gzip it and then gunzip during import?

    Thanks for your help

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    As per your initial post you want to export-compress in a single step then...

    you want to export-gzip it on the fly during export and,
    gunzip-import it on the fly during import.

    Please post the shell script you used to export-compress
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Apr 2007
    Posts
    24

    export cmd

    cat $exp_home/${dbname}.dmp | /usr/contrib/bin/gzip > $exp_home/${dbname}.dmp.g
    z & #compress on the fly
    $ORACLE_HOME/bin/exp system/manager FILE=$exp_home/${dbname}.dmp FULL=Y DIRECT=
    Y LOG=$BPCS_BACKUP_HOME/logs/${dbname}.log

  6. #6
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    I can see no pipe in your script so I don't think you are doing it on-the-fly

    I would do something like this...

    Code:
    /etc/mknod pipe.imp p
    nohup $ORACLE_HOME/bin/exp system/manager file=pipe.imp log=$BPCS_BACKUP_HOME/logs/${dbname}.log direct=y full=y &
    nohup /usr/contrib/bin/gzip < pipe.imp > $exp_home/${dbname}.dmp.gz &
    to export-gzip it and the inverse to gunzip-import it.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  7. #7
    Join Date
    Apr 2007
    Posts
    24

    exp an Imp

    Can you please explain what the following does?

    I have to use an old export file. So how do I use that to import.

    1. /etc/mknod pipe.imp p
    2. nohup $ORACLE_HOME/bin/exp system/manager file=pipe.imp log=$BPCS_BACKUP_HOME/logs/${dbname}.log direct=y full=y &
    3. nohup /usr/contrib/bin/gzip < pipe.imp > $exp_home/${dbname}.dmp.gz &

  8. #8
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    You don't.

    I do not think you have a valid export file.

    What I give you is the script you want to execute if you want to have a valid dump file after an export/gzip on-the-fly process.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width