Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Export to compressed files?

Re: Export to compressed files?

From: Tim Kearsley <tim.kearsley_at_milton-keynes.gov.uk>
Date: 12 Nov 2002 00:33:49 -0800
Message-ID: <725736ef.0211120033.43591df2@posting.google.com>


tim.kearsley_at_milton-keynes.gov.uk (Tim Kearsley) wrote in message news:<725736ef.0211110711.3a8567e4_at_posting.google.com>...
> Hi all,
>
> Environment here is:
>
> Oracle 8i (mostly 8.1.7)
> AIX 4.3.3
> RS6000 SP hardware
>
> For a long time I've used the technique of exporting databases
> directly to a compressed file by using a named pipe as the FILE
> parameter in the export and running a compress command in the
> background to read whatever comes into the pipe and write out a
> compressed file. This works very well.
>
> The question is this:
>
> Will a similar technique work for multiple files? That is, if I want
> to generate a number of compressed files from the export (in my case
> to avoid hitting a 2 Gbyte file size limit in a non large file-enabled
> AIX filesystem) can I specify several named pipes in the FILE
> parameter for the export and fire off a number of background processes
> to read from the pipes? I'm not clear how the FILESIZE parameter for
> the export would be used. Would the export start writing to another
> pipe once it had written FILESIZE bytes to the previous pipe?
>
> I'll experiemnt in the meantime, but would be very interested to know
> whether anyone has tried this and if they were successful.

Well I *have* experimented and have a bit more information now. It seems you can use multiple named pipes in the FILE parameter for the export and if you kick off a similar number of background processes to read those pipes and compress what comes in to them then you get a set of compressed export dumps.

For example, in the export parameter file:

FILE=/tmp/pipe1,/tmp/pipe2,/tmp/pipe3

Create the pipes with:

mknod /tmp/pipe1 p
mknod /tmp/pipe2 p
mknod /tmp/pipe3 p

And create background processes to compress what is read into the pipe:

compress < /tmp/pipe1 > exp1.dmp.Z &
compress < /tmp/pipe2 > exp2.dmp.Z &
compress < /tmp/pipe3 > exp3.dmp.Z &

As I'm no Unix expert I wouldn't be at all surprised if there's a more elegant way of doing this. If so, I'd love to know!

Cheers.

Tim Kearsley
Database Manager
Milton Keynes Council Received on Tue Nov 12 2002 - 02:33:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US