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: grjohnson <Johnsog123_at_hotmail.com>
Date: 12 Nov 2002 15:27:55 -0800
Message-ID: <32b8a689.0211121527.4ad1ffe1@posting.google.com>


I use a named pipe to for export large amount of data into a compressed file. It's compresses the data as it goes and doesn't leave it till the end.

First I create the named pipe.

mknod gzip_pipe p

nohup gzip < gzip_pipe > export_data.dmp.Z &

exp parfile=param.par

Parfile INCLUDES...

file='gzip_pipe'

Indicating that the export will go to the pipe and then compress into export_data.dmp.Z

Now to import the data do the following

nohup gunzip -c export_data.dmp.Z > gizip_pipe &

imp parfile=impparam.par

Parfile INCLUDES...

file='gzip_pipe'

Cheers,

Greg Johnson
Oracle Certified Professional
OCP 8i DBA / OCP 9i DBA
Brisbane, Queensland, Australia

tim.kearsley_at_milton-keynes.gov.uk (Tim Kearsley) wrote in message news:<725736ef.0211120033.43591df2_at_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 - 17:27:55 CST

Original text of this message

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