Importing a dump file compressed with inline compression( used gzip)
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Importing a dump file compressed with inline compression( used gzip)

  1. #1
    Join Date
    Apr 2001
    Posts
    42

    Importing a dump file compressed with inline compression( used gzip)

    I am currently doing a export on a database using Oracle 8.0.5 on Solaris 8. I am using inline compression with the gzip utility. I am trying to test importing my data back into the database, but when I run my shell script the import process hangs. Here is my scipt for the inline compression for the export process, it works fine:

    . /oracle/oracle_env.sh
    #NLS_LANG=American_America.US7ASCII; export NLS_LANG

    # First create a named pipe

    mknod exp_pipe p
    #change permssions on the pipe
    chmod 777 exp_pipe

    # export afegdb db

    #Set export dump file name: MMDD

    DX=`date +%m%d.exp.gz`; export DX

    exp ecedi/******* full=Y compress=Y log=/oracle/backups/export.log file=exp_pipe|/usr/bin/gzip < exp_pipe > $DX

    # EOF afegdb_export

    Now to import the the database into a test database, I just modified the script and changed it to do import, Like so:

    . /oracle/oracle_env.sh
    #NLS_LANG=American_America.US7ASCII; export NLS_LANG

    # First create a named pipe

    mknod imp_pipe p
    #change permssions on the pipe
    chmod 777 imp_pipe

    # export afegdb db

    #Set export dump file name: MMDD

    DX=/database/exports/1125.exp.gz; export DX

    imp ecedi/******* full=Y compress=Y log=/oracle/backups/import.log file=imp_pipe|/usr/bin/gunzip < imp_pipe > $DX

    # EOF afegdb_export

    The export script is one that tamilselvan provided in one of his post.

    I am trying find out if I am going down the right path to import the data or I totally off track here?//

    I have tried to do an straight export, but my export keeps bombing out and giving me the following errors:

    EXP-00002: error in writing to export file
    EXP-00222:
    System error message 27
    EXP-00002: error in writing to export file
    EXP-00000: Export terminated unsuccessfully

    I checked the dmp file and it was over 2GB, but I checked my ulimit and it is set to unlimited, so I don't know what is happening there either. After checking for a solution all over, I am stumped at this point....I need help!! Any suggestions anyone. I apologize for the lenghty post here. thanks in advance.
    Utep

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    I think you need to reverse the order of the rows ...

    imp ecedi/******* full=Y compress=Y log=/oracle/backups/import.log file=imp_pipe|/usr/bin/gunzip < imp_pipe > $DX
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Apr 2001
    Posts
    42
    Which rows are you speaking of?// The line you posted looked like the same one in my initial post.
    Utep

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253

    Re: Importing a dump file compressed with inline compression( used gzip)

    Sorry, I was talking and typing at the same time.

    It looks to me as if the imp is trying to read from the pipe before gunzip has written anything to it, which might be the issue. Splitting that line, like ...

    /usr/bin/gunzip < imp_pipe > $DX
    imp ecedi/******* full=Y compress=Y log=/oracle/backups/import.log file=imp_pipe

    ... might be the fix
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    Aug 2000
    Location
    Chicago IL
    Posts
    586
    I use this


    imp...
    mkfifo mfrdb.pipe
    uncompress -c mfrdb.Z > mfrdb.pipe &
    nohup imp userid=/ parfile=mfrdb.par &
    rm mfrdb.pipe

    exp...
    mkfifo mfrdb.pipe
    compress -c mfrdb.Z > mfrdb.pipe &
    nohup exp userid=/ parfile=mfrdb.par &
    goodluck

    -Jigar
    "High Salaries = Happiness = Project Success."

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