Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-01 |
|
|
View PDF |
convert::=
convertOptionList::=
Text description of convertOptionList
To quickly transport a tablespace across different platforms. Important uses of the command include:
Note: The |
COMPATIBLE
set to 10.0 or higher.V$TRANSPORTABLE_PLATFORM
to determine the platforms supported by the CONVERT
command. Cross-platform tablespace transport is only supported when both the source and destination platforms are contained in this view.
In Release 10g, the CONVERT
command is required when transporting between platforms for which the value in V$TRANSPORTABLE_PLATFORM.ENDIAN_FORMAT
is different. When transporting between platforms for which the ENDIAN_FORMAT
column is the same, you can either use the CONVERT
command to move the file, or copy the file from the source to the destination with operating system utilities. If the destination host uses ASM storage, you must use CONVERT
to move the data into ASM. Operating system utilities cannot be used to move data into ASM.
CONVERT
command can be run either on the source host or the destination host. When converting on the source host, CONVERT... TO
is used to identify the destination platform (and the source platform is, implicitly, the platform of the source host). When converting on the destination host, use CONVERT... FROM
to identify the source platform (and the destination platform is, implicitly, the platform of the destination host).CONVERT
does not do in-place conversion of datafiles. It creates an output file that is readable on the specified platform.CONVERT
command does not perform conversions on these CLOBs. Instead, RMAN captures the endian format of each LOB column and propagates it to the target database. Subsequent reads of this data by the SQL layer will interpret the data correctly based on either endian format and write it out in an endian- independent way if the tablespace is writeable.
CLOBs created in Oracle Database Release 10gare stored in character set AL16UTF16
, which is platform independent.
Syntax Element | Description |
---|---|
|
Specifies the name of a datafile that you want to transport into the destination database. At the destination, you must use |
|
Options for this |
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. | |
|
Specifies the name template for the output file(s). See the |
Specifies the name of the source platform. This must be one of the platforms listed in the | |
Specifies the degree of parallelism to use while performing the operation. | |
Specifies the name of the destination platform as displayed in the | |
|
Specifies the name of a tablespace in the source database that you want to transport into the destination database on a different platform. |
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:
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.
Suppose you need to transport tablespaces finance
(datafiles `/orahome/fin/fin01.dbf
' and `/orahome/fin/fin02.dbf
') and hr
(datafiles `/orahome/fin/hr01.dbf
' and `/orahome/fin/hr02.dbf
') from a source database running on a Sun Solaris host to a destination database running on an 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:
V$TRANSPORTABLE_PLATFORM
.
The database has a list of its own internal names for each platform it runs on. You may need the exact name of the source or target platform as a parameter to the CONVERT
command. Query V$TRANSPORTABLE_PLATFORM
to get the platform name from SQL*Plus as follows:
SQL> SELECT PLATFORM_ID, PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM WHERE UPPER(PLATFORM_NAME) LIKE 'LINUX';
The PLATFORM_NAME
for Linux on a PC is 'Linux IA (32-bit)
'.
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.
Suppose you need to transport tablespaces finance
(datafiles `/orahome/fin/fin01.dbf
' and `/orahome/fin/fin02.dbf
') and hr
(datafiles `/orahome/hr/hr01.dbf
' and `/orahome/hr/hr02.dbf
') from a source database running on a Sun Solaris host to a destination database running on an Linux PC host. 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:
expdat.dmp
), gathered expdat.dmp
and the unconverted tablespace datafiles to be transported, and copied these files to the destination host, in the /tmp/transport_solaris/' directory. You have preserved the subdirectory structure from the files' original location, that is, the datafiles are stored as:
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:
FORMAT
argument controls the name and location of the converted datafiles.% rman TARGET / RMAN> CONVERT DATAFILE='/tmp/transport_solaris/*' DB_FILE_NAME_CONVERT '/tmp/transport_solaris/fin','/orahome/dbs/fin', '/tmp/transport_solaris/hr','/orahome/dbs/hr'
The result is a set of converted datafiles in the /orahome/dbs/
directory, named thus:
/orahome/dbs/fin/fin01.dbf
/orahome/dbs/fin/fin02.dbf
/orahome/dbs/hr/hr01.dbf
/orahome/dbs/hr/hr02.dbf
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.