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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Why use a Unix Pipe to uncompress a file?

RE: Why use a Unix Pipe to uncompress a file?

From: Loughmiller, Greg <Greg.Loughmiller_at_cingular.com>
Date: Thu, 15 Aug 2002 04:43:24 -0800
Message-ID: <F001.004B5C64.20020815044324@fatcity.com>


We used it to migrate databases...

For example.. We would export, compress and send it to a pipe via RSH on a different box... thin that pipe would be used as std input into an import process. The data never hit disk except into the new database.

greg

-----Original Message-----
Sent: Wednesday, August 14, 2002 9:29 PM To: Multiple recipients of list ORACLE-L

I know why i did it in the past, 32 bit os, 2G limitation of single file.

i could run an export, compress on the fly and have a uncompressed file that is > 2G.

hence you need to work it backwards, since if its > 2G, the uncompress will choke(or truncate).

amazingly, that is NOT a stupid idea.

joe

Pat Howe wrote:

>I am trying to work thru the one of the scripts that I inherited and I was
>wondering if someone could shed some light on why the author used a UNIX
>PIPE to uncompress a file.
>
>Code :
>mknod /tmp/testdb_data_01.dbf_pipe p
>
>uncompress < /tmp/testdb_data_01.dbf_pipe >
>/u06/oracle/oradata/testdb/tbs/data_01.dbf &
>sleep 1
>
>cp data_01.dbf.Z /tmp/testdb_data_01.dbf_pipe &
>
>Background :
>File 'data_01.dbf.Z' exists in compress format.
>We are currently in the directory where this file resides.
>
>My Confused Analysis :
>line 1 : creates a pipe file called 'testdb_data_01.dbf_pipe' in the '/tmp'
>directory
>line 2 : In the background we start to uncompress from the 'PIPE file'
>(FIFO) into my destination directory
>'/u06/oracle/oradata/testdb/tbs/data_01.dbf'
>line 3 : Puts the script to sleep for 1 second (no idea why)
>line 4 : In the background it copies the compressed file (data_01.dbf.Z) to
>the PIPE
>
>Therefore as the copy occurs (line4) - the PIPE (using a
First-In-First-Out)
>starts to uncompress my file (line2).
>
>Question :
>What does this gain me ? Ie ; Why would the author do this ?
>Seems to me to be alot of additional IO copying the file to '/tmp'.
>Why not just uncompress the file directly to its destination directory
>(/u06/oracle/oradata/testdb/tbs/) ?
>
>Thanks in advance
>
>_________________________
> Patrick J. Howe
> Oracle DBA
> VeriSign, Inc.
> 4501 Intelco Loop SE
> Olympia, WA 98507
> Phone : 360.493.6284
> Email : phowe_at_verisign.com
>
>
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Joe Testa
  INET: jtesta_at_dmc-it.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Loughmiller, Greg
  INET: Greg.Loughmiller_at_cingular.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 15 2002 - 07:43:24 CDT

Original text of this message

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