Q

Exporting and compressing file

I am running Oracle 8.1.6. I have an export script on Unix that is writing into a pipe and compressing the file. The export barely gets started and fails with an EXP-00002 error. If I run the export and then compress the file, it runs fine. The file is only about 20M.


To hopefully fix your problem, let's look at what the documentation says about your error.

   my_host% oerr exp 2
   00002, 00000, "error in writing to export file"
   // *Cause:  Export could not write to the export file, probably because 
of a
   //          device error. This message is usually followed by a device 
message
   //          from the operating system.
   // *Action: Take appropriate action to restore the device.

Did you receive an error message from the operating system? If so, take action to fix that OS error message. That is what killed you export. But if not, I'll offer a suggestion.

You didn't say how you were using a pipe, so I thought that I would show you how I use a pipe to compress my export. I use this method only when I know that my export will be greater than the 2 GB file limitation of the export utility. The basic steps are

  1. Create the pipe
  2. Start a compression utility on the pipe (I use gzip)
  3. Feed the export to the pipe

It goes something like this:

    mknod exp.pipe p         (this makes a pipe in the filesystem)
    gzip < exp.pipe > exp.dmp.gz &    (Take the contents of the pipe, and 
run it through gzip. The compressed dump file is output. The '&' runs this 
process in the background).
    exp userid=system/manager file=exp.pipe full=y     (start the export and 
dump it into the pipe).

To import, I use gunzip and do the opposite!

    mknod exp.pipe p
    gunzip < exp.dmp.gz > exp.pipe &
    imp userid=system/manager file=exp.pipe full=y

I hope that solves your problem!

For More Information


This was first published in May 2001

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close