Subject: Re: export table a 10 gig table
Newsgroups: comp.databases.oracle.server
References: <340315A7.6987@erols.com>
Organization: InterAccess, Co. - Chicagoland's Full Service Internet Provider
Reply-To: akaplan@interaccess.com
Distribution:
tenghsu (tenghsu@erols.com) wrote:
: Hi,
:
: How can I export a 10 gig table when the max UNIX file size is 2 gig?
: Thanks.
: Tenghsu
If you have Oracle8, you can partition the table and export each partition
individually. Otherwise, check out the tip from Oramag (http://www.oramag.com/code/tip01168.htm):
TIP OF THE WEEK
January 16, 1998
Exporting a Database That's More Than
2GB When Compressed
This Tip of the Week entry comes from Devarajan Sundaravaradan, a Senior
Consultant for Leading Edge Systems, Inc. in Edison, New Jersey.
In HP-UX, there is a 2GB limit on file sizes of 2GB. Many of us have reached
this limit when exporting files and the most common solution is to do a filesystem
compression of the export dump using named pipes and then store the compressed
file. But what if the compressed file itself passes the 2GB limit? There is solution
to this, too.
---------------- Export Section
# Create new Named pipes.
mknod -p /dev/split_pipe
mknod -p /dev/compress_pipe # You can use the existing named pipe
# itself, instead of creating new.
======================================================================
Create a shell script under a file, named Split_export.sh
======================================================================
# -b1000m indicates to split command to split the input file into every 1000 MB size.
# As it splits, the split command will suffix aa, ab, ac, ad ... upto zz to the file name specified.
# The export file name is expfile.
nohup split -b1000m < /dev/split_pipe > /DumpDir/expfile &
nohup compress < /dev/compress_pipe > /dev/split_pipe &
exp username/password full=y file=/dev/compress_pipe and other parameters for export.
=======================================================================
After saving the above three commands in split_export.sh, execute the following.
=======================================================================
chmod a+x split_export.sh
nohup split_export.sh > /tmp/split_export.log 1>&2 &
=======================================================================
After a few minutes you should see files in the export dump directory.
=======================================================================
------------------ IMPORT Section
======================================================================
Create a shell script with the following command under the file name split_import.sh.
After creating provide execution permission to this script as follows:
======================================================================
Chmod a+x split_import.sh
# The import script assumes in this example that the above export script created 2 split files
# called expfileaa and expfileab. The order of the file for the cat command is very important.
nohup cat /dumpdir/expfileaa /dumpdir/expfileab > /dev/split_pipe &
# sleep 3 seconds
Sleep 3
nohup uncompress < /dev/split_pipe > /dev/compress_pipe &
#Sleep at this point is very important as some time is needed to uncompress the file and send it to the pipe.
sleep 60
imp username/password file=/dev/compress_pipe and other parameters for export.
nohup split_import.sh > /tmp/split_import.log 1>&2 &
=======================================================================
Wait for the import to finish.
=======================================================================
Back to Ari Kaplan's Home Page