How can I take a tablespace backup using the export utility in Oracle8i?

How can I take a tablespace backup using the export utility? Is it possible in Oracle8i? What is the procedure?


    Requires Free Membership to View

Yes, you can take a tablespace backup using the export utility. But be warned, that backups with the export utility will not be able to use archived redo logs. So you can restore only to the point that the export was performed. You will not be able to roll forward to some point after the export was performed like you can with other Oracle backup methods. Keep this point in mind when you are implementing a solid backup and recovery strategy.

To take a tablespace export, you will want to take advantage of Transportable Tablespaces. This capability was introduced in Oracle 8i. And you must have Oracle 8i Enterprise Edition to create the backup of the tablespace. For more information than I am providing here, I suggest that you take a look at the Oracle 8i Concepts Guide and the Oracle 8i Administrator's Guide.

Here are the basic guidelines of taking a backup copy of a tablespace with the export utility:

  1. Make sure that the tablespace is "self contained". According to the Oracle documentation this means "there are no references from inside the set of tablespaces pointing outside of the tablespaces." You can use the dbms_tts.transport_set_check procedure to verify that the tablespace is self contained.
  2. Make the tablespace read-only.
    ALTER TABLESPACE ts_name READ ONLY;
  3. Invoke the export utility.
    EXP TRANSPORT_TABLESPACE=y TABLESPACES=ts_name FILE=expdat.dmp
    You must connect as SYSDBA to perform this step!
  4. Use OS commands to copy the datafile(s) that make up the tablespace.
  5. Put the tablespace back in read write mode.
    ALTER TABLESPACE ts_name READ WRITE;

The export utility in this case basically captures the data dictionary information of all objects in the tablespace. The datafiles that you copied contain the data! Restoring from this type of backup is done by "plugging" the transportable tablespace back into the database. The Oracle documention has all the information you'll need to figure that one out!

For More Information


This was first published in June 2001

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.