Skip Headers

Oracle® Database Recovery Manager Reference
10g Release 1 (10.1)

Part Number B10770-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

CONVERT

Syntax

convert::=

Text description of convert.gif follows


Text description of convert



convertOptionList::=

Text description of convertOptionList.gif follows


Text description of convertOptionList



Purpose

To quickly transport a tablespace across different platforms. Important uses of the command include:

Restrictions and Usage Notes

Keywords and Parameters

Syntax Element Description

DATAFILE datafile_name

Specifies the name of a datafile that you want to transport into the destination database.

At the destination, you must use CONVERT DATAFILE instead of CONVERT TABLESPACE, and name each datafile that is being converted. Because those files have not yet been imported into the destination database, RMAN cannot determine which files belong to the tablespace being converted.

convertOptionList

Options for this CONVERT command.

A set of string pairs. Whenever any of the input filenames contains one of the first halves of a pair, anywhere in the filename, it will be replaced with the second half of the same pair.You can use as many pairs of replacement strings as required. You can use single or double quotation marks.

FORMAT formatSpec

Specifies the name template for the output file(s). See the BACKUP AS COPY command for the format values that are valid here.

FROM PLATFORM = platform_name

Specifies the name of the source platform. This must be one of the platforms listed in the PLATFORM_NAME column of the V$TRANSPORTABLE_PLATFORM view.

PARALLELISM [=] integer

Specifies the degree of parallelism to use while performing the operation.

TO PLATFORM = platform_name

Specifies the name of the destination platform as displayed in the V$TRANSPORTABLE_PLATFORM.PLATFORM_NAME output.

TABLESPACE tablespace_name

Specifies the name of a tablespace in the source database that you want to transport into the destination database on a different platform. CONVERT TABLESPACE can only be used when connected to the source database, not the destination database. (Until the tablespace transport has been completed, the destination database has no way of recognizing the tablespace name for use with CONVERT TABLESPACE.)

Examples

The procedure for transporting tablespaces is documented at length in Oracle Database Administrator's Guide. RMAN's CONVERT command is only required in cases where you are transporting between platforms with different byte ordering. If your platforms have the same byte ordering, then you can either use CONVERT or copy the files directly.

The basic outline of the process is as follows:

  1. Identify the tablespaces that will be transported. Depending on relations between objects in the tablespaces you want to transport and objects in other tablespaces, this may require careful planning.
  2. Make the tablespaces to be moved read-only.
  3. Use the Original Export utility to generate a file containing structural information from the data dictionary for the tablespaces to be transported. This file will be used when plugging the tablespaces into the destination database.
  4. If you need to convert your datafiles for transport and you wish to use the source system's resources for the conversion, then use the RMAN CONVERT command at this point on the source platform to convert the tablespaces for the target platform. See the first example following this outline. (If you prefer to use the destination system's resources for the conversion, do nothing in this step.)
  5. Copy the datafiles (converted, if necessary) and the structural information file to the target database. You may move these by any means that is convenient: an operating system copy, ftp, or even distribution on removable media like CDs or tapes.
  6. If you are transporting across platforms where endian conversion is required, and you did not perform the conversion on the source platform, then perform the conversion on the destination platform. See the second example following this outline.
  7. Invoke the Original Import utility to plug the set of tablespaces into the target database.

For more details on this process, see Oracle Database Administrator's Guide. Read that discussion in its entirety before attempting any part of the tablespace transport process. The discussion in this document will focus on the specifics of using the CONVERT command, as you would use it on the source and destination platforms.

Converting Tablespaces on the Source Platform: Example

In this scenario you need to transport the following tablespaces from a source database running on a Sun Solaris host to a destination database running on a Linux PC:

You plan to store the converted datafiles in the temporary directory /tmp/transport_linux/ on the source host.

The example assumes that you have carried out the following steps in preparation for the tablespace transport:

Now use RMAN to convert the datafiles to be transported to the destination host's format on the source host. The FORMAT argument controls the name and location of the converted datafiles.

% rman TARGET /
RMAN> CONVERT TABLESPACE finance,hr
   TO PLATFORM 'Linux IA (32-bit)'
   FORMAT='/tmp/transport_linux/%U';

The result is a set of converted datafiles in the /tmp/transport_linux/ directory, with data in the right endian-order for the Linux IA (32-bit) platform.

From this point, you follow the rest of the general outline for tablespace transport. Use the export utility to create the file of structural information, if you have not already, move the structural information file and the converted datafiles from /tmp/transport_linux/ to the desired directories on the destination host, and plug the tablespace into the new database with the Import utility.

Converting Tablespaces on the Target Platform: Example

In this scenario you need to transport the following tablespaces from a source database running on a Sun Solaris host to a destination database running on a Linux PC:

You plan to perform conversion on the target host. You will temporarily store the unconverted datafiles in the directory /tmp/transport_solaris/ on the target host. When the datafiles are plugged into the destination database, they will be stored in /orahome/dbs.

The example assumes that you have carried out the following steps in preparation for the tablespace transport:

You can now use RMAN's CONVERT command to convert the datafiles to be transported to the destination host's format and deposit the results in /orahome/dbs.

Note the following:

The result is a set of converted datafiles in the /orahome/dbs/ directory, named as follows:

From this point, follow the rest of the general outline for tablespace transport. Use Import to plug the converted tablespaces into the new database with the import utility, and make the tablespaces read-write if applicable.