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: Exporting to Unix file bigger than 2G.

Re: Exporting to Unix file bigger than 2G.

From: Alex Hudghton <alex.hudghton_at_capgemini.co.uk>
Date: Mon, 08 Mar 1999 16:18:50 +0000
Message-ID: <36E3F869.66B3DA20@capgemini.co.uk>


If you're using UNIX then see below

Alex

> Oracle Corporate Support
> Problem Repository
>
> 1. Prob# 1018477.6 EXPORTING TO TAPE ON UNIX SYSTEMS
> 2. Soln# 2066781.6 HOW TO EXPORT TO TAPE ON UNIX SYSTEMS
>
>
> 1. Prob# 1018477.6 EXPORTING TO TAPE ON UNIX SYSTEMS
>
> Problem ID : 1018477.6
> Affected Platforms : Generic: not platform specific
> Affected Products : Oracle Server - Enterprise Edition V7
> Affected Components : RDBMS V07.XX
> Affected Oracle Vsn : V07.XX
>
> Summary:
> EXPORTING TO TAPE ON UNIX SYSTEMS
>
> +=+
>
>
>
> Problem Description:
> ====================
>
> The basic function of the export utility is to extract the objects of a
> database and locate them in a flat file that is usually on tape or on disk.
> The process for exporting to tape is explained in this bulletin.
>
> Problem Explanation:
> ====================
>
> This bulletin examines several considerations and steps for exporting data to
> tape on unix platforms either directly or using a unix named pipe. Several
> items are covered including:
>
> * Why do you need to export to tape?
> * How do you calculate the size of your export?
> * Exporting directly to tape. (An example is provided.)
> * How do you export to tape via unix named pipes.
> * How do you create a compressed export file?
> * How do you export to a remote tape device?
> * How do you perform export/import over the network using named
> pipes?
>
>
>
> +==+
>
> Diagnostics and References:
>
>
>
> 2. Soln# 2066781.6 HOW TO EXPORT TO TAPE ON UNIX SYSTEMS
>
> Solution ID : 2066781.6
> For Problem : 1018477.6
> Affected Platforms : Generic: not platform specific
> Affected Products : Oracle Server - Enterprise Edition V7
> Affected Components : RDBMS V07.XX
> Affected Oracle Vsn : V07.XX
>
> Summary:
> HOW TO EXPORT TO TAPE ON UNIX SYSTEMS
>
> +=+
>
>
>
> EXPORTING TO TAPE ON UNIX PLATFORMS
>
> ==============================================================================
>
> In this document you will find instructions on how to perform an export to
> tape on UNIX platforms either directly or by using unix named pipes.
>
> It will discuss in detail the following considerations:
>
> o Why do you need to export to tape?
> o How do you calculate the size of your export?
> o Exporting directly to tape. (An example is provided.)
> o How do you export to tape via unix named pipes?
> o How do you create a compressed export file?
> o How do you export to a remote tape device?
> o How do you perform export/import over the network using named
> pipes?
>
> It should be noted that this document is based on the work of Khaled Kassis,
> Oracle US and John Benford, Oracle UK.
>
> ==============================================================================
> ==============================================================================
>
>
> o Why do you need to export to a tape ?
>
> Export to tape is not a preferred practice, but it may be necessary
> for the following reasons:
>
> o Lack of disk space - you do not have enough disk space to perform
> the export to a disk.
>
> o If your export file will be greater than 2 Gigabytes - There is a
> unix restriction of 2G on the size of a file.
>
>
> -----------------------------------------------------------------------------
>
> o How to calculate the size of your export?
>
>
> If the site is unsure how large a resultant export file will be, they
> can use the following commands to calculate its size:
>
> (1) Create a unix named pipe:
>
> % mknod /tmp/exp_pipe p
>
> (2) Start the export in the background, specifying the named pipe as
> the output file:
>
> % exp file=/tmp/exp_pipe &
>
> (3) Next, dd in from the named pipe, out to /dev/null in 1K blocks:
>
> % dd if=/tmp/exp_pipe of=/dev/null bs=1024
>
> (4) This will return the size of the export file in 1K blocks as
> follows:
>
> +0 records in
> +0 records out
>
> ------------------------------------------------------------------------------
>
> o Exporting directly to tape.
>
>
> Once you have decided that you need to perform the export directly to
> tape, you will need to change the syntax of your export statement so
> that export knows the name of the tape device and how much data can be
> written to that tape device.
>
> There are only 2 parameters that you need to change to do this:
>
> - FILE - The name of the tape device you are exporting to
> e.g. /dev/rmt/0 .
>
> - VOLSIZE - The amount of data that can be written to one tape.
>
> Considerations:
>
> - If the entire export file will fit onto a single tape, then a
> volsize of 0 (variable length) can be used
> (e.g. exp volsize=0)
> - If the resultant export file is larger than a single tape, then
> volsize needs to be set accordingly
> (e.g. exp volsize=M)
>
> Please note, there is a 4 Gigabyte limit to the volsize parameter.
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> AN EXAMPLE OF EXPORTING DIRECTLY TO TAPE
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> - This example involves a full database export to a QIC 150 (150 Megabytes
> capacity) to a tape device "/dev/rmt/0m", where the resultant file is
> 200M.
> The following syntax is used:
>
> (1) os> exp userid=scott/tiger full=y file=/dev/rmt/0M volsize=145M
>
> - You will note that the volsize is set to 145M, even though the tape is a
> QIC 150. This is because there may not be exactly 150M of tape on the
> volume.
>
> - Once the export utility has written to the tape, it will
> prompt for the next tape:
> (2) "Please mount the next volume and press when you are done."
>
> - To import from the resultant export on tape, the following commands
> are used :
>
> (3) os> imp userid=scott/tiger full=y file=/dev/rmt/0M volsize=145M
>
> ------------------------------------------------------------------------------
>
> o How do you export to tape via unix named pipes?
>
> On some Oracle platforms/versions there may be difficulties with exporting
> directly to tape using the Oracle export utility. In these cases, you may
> need to perform the export to tape via unix named pipes.
>
> A unix named pipe is a FIFO special file, created using the unix mknod
> command. The syntax of the mknod command may change from port to port. It is
> important, therefore, that you consult your systems manual.
>
> Please note: Exporting via a named pipe (to tape or disk), is slower
> than using export directly. This is because of the size limit
> of a unix named pipe (usually 8K).
>
>
> - The following commands should be used to export to tape via a named pipe:
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/exp_pipe p
>
> 2. Next, dd in from the named pipe, out to the tape device, in the
> background :
>
> os> dd if=/tmp/exp_pipe of= &
>
> 3. Start the export, specifying the named pipe as the output file:
>
> os> exp file=/tmp/exp_pipe
>
>
> - To import from the resultant export on tape, the following commands
> are used :
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/imp_pipe p
>
> 2. Next, dd in from the tape device, out to the named pipe, in the
> background :
>
> os> dd if= of=/tmp/imp_pipe &
>
> 3. Start the import, specifying the named pipe as the input file :
>
> os> imp file=/tmp/imp_pipe
>
> ------------------------------------------------------------------------------
>
>
> o How do you create a compressed export file?
>
>
> If you have calculated the size of the file your export will produce and
> it is too large to fit onto disk, you may want to consider producing a
> compressed export file as an alternative to exporting directly to tape.
>
> Please note, this method should be thoroughly tested before being implemented.
>
> - To create a compressed export file:
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/exp_pipe p
>
> 2. Start compress in the background reading in from the named pipe,
> writing out to 'export.dmp.Z' :
>
> os> compress < /tmp/exp_pipe > export.dmp.Z &
>
> 3. Start the export, specifying the named pipe as the output file :
>
> os> exp file=/tmp/exp_pipe
>
> - To import to disk from the resultant export on tape, the following commands
> would be used :
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/imp_pipe p
>
> 2. Start uncompress in the background reading from 'export.dmp.Z',
> writing out to the named pipe :
>
> os> uncompress < export.dmp.Z > /tmp/imp_pipe &
>
> 3. Start the import, specifying the named pipe as the input file :
>
> os> imp file=/tmp/imp_pipe
>
> Please Note:
> ============
>
> You cannot export directly to tape and compress.
>
>
>
> ------------------------------------------------------------------------------
>
> o How do you export to a remote tape device?
>
>
> You may want to perform an export directly to tape but you do not
> have a local tape drive on your machine. There is, however, a tape drive
> on another machine on the network, to which you have remote shell (rsh)
> access.
>
> - The following commands allow you to perform the export to the remote
> machine, either to file or to a tape device :
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/exp_pipe p
>
> 2. Next, dd in from the named pipe, and out to the remote tape device
> via a remote shell :
>
> os> dd if=/tmp/exp_pipe | rsh dd of= &
>
> 3. Start the export, specifying named pipe as the output file :
>
> os> exp file=/tmp/exp_pipe
>
> - To import from the resultant export on tape, the following commands
> would be used :
>
> 1. Create a unix named pipe :
>
> os> mknod /tmp/imp_pipe p
>
> 2. Start a remote shell, in the background that dd's from the remote
> tape, piping to the local named pipe :
>
> os> rsh dd if= | dd
> if=/tmp/imp_pipe &
>
> 3. Start the import, specifying the named pipe as the input file :
> os> imp file=/tmp/imp_pipe
>
> ------------------------------------------------------------------------------
>
> o How do you perform import/export over the network using named pipes?
>
> ----------
> - Host 1:
> ----------
> * mknod -p /dev/FIFO.dmp
> * exp u/p FILE=/dev/FIFO.dmp yada, yada, yada...
> ----------
> - Host 2:
> ----------
> * mknod -p /dev/FIFO2.dmp
> * rsh host1 dd if=/dev/FIFO.dmp > /dev/FIFO2.dmp &
> * imp u/p FILE=/dev/FIFO2.dmp yada, yada, yada...
>
>
> Please note:
>
> It is important that you verify that the named pipe is ready on each side
> before you start the process.
>
>
> =================================
> Additional information
> =================================
>
>
> For more information on the RDBMS export/import utility:
>
> * Oracle7 Server Utility User's Guide, Part 1
>
>
>
>
>
>
> +==+
>
> References:
>
>

Pedro Tavares wrote:

> What sould I do in order to export the database to a Unix file that exceeds
> 2GB. ?
> Thanks
>
> Pedro Tavares
> C.M.V.M.
> Lisbon, Portugal
Received on Mon Mar 08 1999 - 10:18:50 CST

Original text of this message

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