Re: Piping Exports (Unix)
Date: 4 May 92 03:31:43 GMT
Message-ID: <50711_at_seismo.CSS.GOV>
In <50700_at_seismo.CSS.GOV>, I wrote:
> Our database filled up and we ran out of disk space for exports. I stumbled
> on the following that seems to work on DEC RISC and SUN 4 database hosts (the
> version of exp is 6.0.33.2.2 on both systems):
>
> exp user/account file=stdout | compress > expdat.dmp.Z
> ^^^^^^
> This produces a compressed file called "expdat.dmp.Z" that is 28-30% the
> size of the uncompressed export file.
>
> Does anybody know of any reason that exports should *not* be piped like this?
One of the main problems with my method, besides counting on an undocumented feature :-), was the import didn't work via a pipe on the DEC. I received a much more sensible tip that works reliably both ways:
I have found that the best way to do this is using Unix's named-pipes feature. Simply:
% mknod /tmp/compresspipe p % compress -c </tmp/compresspipe>/backup/oraexp/exp1MAY92.dmp & % exp system/manager full=y ..... file=/tmp/compresspipe
Voila! After the compress receives an EOF (sent by exp), it terminates, leaving a nice compressed file. This saves using various undocumented features (as file=stdout must be?!)
To import, do the same thing:
% uncompress -c </backup/oraexp/exp1MAY92.dmp >/tmp/compresspipe & % imp system/manager .... file=/tmp/compresspipe
I tried this for both export and import on SUN 4 and DEC RISC and had no problems. On the SUN 4 I still get a final message "Import terminated successfully with warnings." when, in fact, no warnings have been output. But everything looks good.
My thanks to everybody who responded,
- jean
+-----------------------------------------------------------------------+ | Jean Anderson, DBA email: jean_at_seismo.css.gov | | SAIC Open Systems Division, MS A2-F or: jean_at_esosun.css.gov | | 10210 Campus Point Drive phone: (619)458-2727 | | San Diego, CA 92121 fax: (619)458-4993 | +-----------------------------------------------------------------------+Received on Mon May 04 1992 - 05:31:43 CEST