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

Re: Export

From: Yass Khogaly <ykhogaly_at_us.oracle.com>
Date: Tue, 31 Aug 1999 08:17:21 -0600
Message-ID: <7qgnu7$kvp$1@inet16.us.oracle.com>


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:

  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?


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 Gigabits - 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:

          Considerations:

             Please note, there is a 4 Gigabyte limit to the volsize parameter.

          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                    AN EXAMPLE OF EXPORTING DIRECTLY TO TAPE

          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

          (1) os> exp userid=scott/tiger full=y file=/dev/rmt/0M volsize=145M

          (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).

                  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.

                  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

                  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.

                  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?


  Please note:

  It is important that you verify that the named pipe is ready on each side   before you start the process.

"The Views expressed here are my own and not necessarily those of Oracle Corporation"

<corky711_at_my-deja.com> wrote in message news:7qfb17$lsp$1_at_nnrp1.deja.com...

> I want to export my databse directly to tape in tar format so that i
> can view the contents of the tape.  Is there a way to do this without
> exporting to disk first and then tar to tape?  There is not enough disk
> space free.
>
> Thanks
>
>
> Sent via Deja.com http://www.deja.com/

> Share what you know. Learn what you don't.


Received on Tue Aug 31 1999 - 09:17:21 CDT

Original text of this message

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