Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Exports > 2GB -- need scripts
The following are what we use. The files split_pipe and compress_pipe are =
FIFO pipe files. The volume /u12 is our 12 gig work volume.
/u12 <--- Work volume /u12/export <--- Holds the FIFO pipes and the scripts /u12/export/files <--- Holds the compressed export files
EXPORT FILE
nohup split -b1000m /u12/export/split_pipe /u12/export/files/expfile =
&=20
nohup compress < /u12/export/compress_pipe > /u12/export/split_pipe &
exp system/password full=3Dy log=3D/u12/export/export.log compress=3Dy =
file=3D/u12/export/compress_pipe buffer=3D2000000
IMPORT FILE
nohup cat /u12/export/files/expfileaa /u12/export/files/expfileab =
/u12/export/files/expfileac /u12/export/files/expfilead > /u12/export/split=
_pipe &
sleep 3
nohup uncompress < /u12/export/split_pipe > /u12/export/compress_pipe &
sleep 60
imp system/password file=3D/u12/export/compress_pipe buffer=3D2048000 =
full=3Dy commit=3Dy log=3D/u12/export/import.log ignore=3Dy
We have used these scripts without problems on a Sun Solaris 2.5.1 = machine. I make no guarantee that it will work on any other systems.
>>> Chuck Hamilton <chuck_hamilton_at_yahoo.com> 11/20/00 01:10PM >>>
If the datbase is 45g, I'd expect that the export will be over 2g even if = compressed. Even if I compress with gzip which yields a better compression = ration that compress, the best ration I get is about 4:1. He's going to = need to both compress and split. Something like this would work.
mkfifo expdat.dmp
compress < expdat.dmp | split -b 2048m - export_
exp us/pw parfile=3Dexp.par
To import an individual table however, you need to search through the = entire export. That could take quite a long time. What I would recommend = doing is to split the export up by table, tablespace, or table related = groups of tables (related via FK's) and do individual exports of each. You = could do them in parallel to speed it up. That way the export is granular = enough that you can quickly recover an individual table without having to = scan through a single huge export file.
Allan Davis Sahadeo <asahadeo_at_neal-and-massy.com> wrote:=20
I was wondering, if the size of the compressed file did exceed 2 gigs then
we would indeed be in a bit of a predicament. Since an export does =
compress
fairly nicely, we may not encounter such a problem. But what if we did...
What would we do then ? Do we split our compressed files ? And if so how =
do
we ?
Allan.
----- Original Message -----
To: "Multiple recipients of list ORACLE-L"=20
Sent: Friday, November 17, 2000 4:50 PM
Here are the scripts for export and import:
For export:
mknod t1.dmp p
compress < t1.dmp> t10.dmp.Z &
exp us/pw parfile=3Dexp.dat
For Import:
/etc/mknod t1.dmp p
dd of=3Dt10.dmp if=3Dt1.dmp &
imp us/pw parfile=3Dimp.dat
Ramani
DBA
>>> 11/17/00 01:25PM >>>
I have a 45GB Oracle 8.0.5 database on HPUX. I want to be able to do nightly exports so that if any of the tables gets "accidentally" truncated or whatever, we can restore just the table and not have to restore the entire database.
Does anybody have a script that uses the split(?) utility and compress so that the export isn't bigger than 2GB? What about importing? Can just one table be picked out of that large of an export if the export is split up and compressed? Please let me know your experience/advice on doing this.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com=20 -- Author: INET: cemail_at_sprintmail.com=20 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=20 -- Author: Akhil Ramani INET: Akhil.Ramani_at_3cc.co.wayne.mi.us=20 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). --=20 Please see the official ORACLE-L FAQ: http://www.orafaq.com=20 --=20 Author: Allan Davis Sahadeo INET: asahadeo_at_neal-and-massy.com=20 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 Mon Nov 20 2000 - 13:22:10 CST