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
- Create the pipe
- Start a compression utility on the pipe (I use gzip)
- 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
- What do you think about this answer? E-mail us at editor@searchDatabase.com with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
- Ask your technical Oracle questions--or help out your peers by answering them--in our live discussion forums.
- Ask the Experts yourself: Our Oracle gurus are waiting to answer your toughest questions.
Dig deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.