The Tablespace feature-the ability to replicate data files directly between Oracle instances without unloading and loading data-was introduced in Oracle 8i and has since become a feature. Initially, the tablespace and destination databases to be transferred must have the same size module. Support for the increased number of module sizes in Oracle 9i overcomes this limitation. Now, in Oracle 10g, the limitations of the platform have also been largely resolved. The Recovery Manager (Recovery Manager,rman) program includes a new convert command that you can use to move between platforms. Small to a data file, large to the entire database, can be done with the help of this command to complete the transfer.
Moving between platforms often requires a conversion because the computer stores multibyte numbers in different ways. Endianness (byte order) The term describes this, the main two combinations are Big-endian (as the memory address increases, the values are arranged from highest to lowest) and Small-endian (values are arranged from low to high as memory addresses increase). To correctly interpret the data in Tablespace, the bytes are ordered in the correct order according to the operating system platform used.
View V$transportable_platform lists the platforms that Rman can convert. Each has a platform name and byte order format. By selecting from this view, you can see whether the source instance and destination instance use the same byte order.
The convert command copies files instead of operating them in place, which is more secure, but requires enough extra hard disk space to hold both forms.
There are three main forms of the convert command:
Convert tablespace is used only in the source system, converting all data files in the requested Tablespace to the format of the target platform.
Convert datafile is used only in the destination system, if the convert tablespace is not used in the source system (or if you need to convert the file name) because the transmitted data files are not associated with the tablespace, they must be converted as data files.
Convert database transforms other constructs, such as unfinished fragments, parameter files, and all parameter tablespace. The control files and redo log files are rebuilt. For this choice only, the source and target systems must have the same byte order.
Even if the two systems use the same byte order, you can still benefit from the convert command. The format (formatted) clause allows you to convert the pathname, and one use is to copy the data file from the ASM hard disk group and to handcuff the data file.
Listing a shows an example of an Rman session in the Windows platform Source system (Little-endian) that converts the users tablespace to the IBM Z-Series Destination system (Big-endian). Initially the tablespace is set to read-only and the Rman SQL command is used. The Convert statement then copies the file to the Lightning recovery area and converts it. Finally, the source tablespace is returned as a read/write state. At this point, the copied files can be copied to the destination server.
Z:>rman
Recovery manager:release 10.2.0.1.0-production on Wed 3 21:00:46 2007
Copyright (c) 1982, +, Oracle. All rights reserved.
Rman> Connect Target SYS/PASSWORD@ORCL
Connected to target DATABASE:ORCL (dbid=1106543623)
Rman> SQL ' ALTER tablespace users READ only ';
Using target database control file instead the recovery catalogsql statement:alter tablespace users READ only
Rman> CONVERT tablespace Users
2> to PLATFORM ' IBM zSeries Based Linux ';
Starting backup at 03-jan-07
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=145 Devtype=disk
Channel ora_disk_1:starting datafile Conversion
Input datafilefno=00004 name=c:oracleproduct.2.0oradataorclusers01.dbf
Converted Datafile=c:oracleproduct.2.0db_1databasedata_d-orcl_i-11065436
23_ts-users_fno-4_01i6jt63
Channel Ora_disk_1:datafile conversion complete, elapsed time:00:00:03
Finished backup at 03-jan-07
Rman> SQL ' ALTER tablespace users READ WRITE ';
SQL Statement:alter tablespace users READ WRITE
Rman> exit
Recovery Manager complete.
Z:>
Bob Watkins (OCP, MCDBA, MCSE, MCT) has a 25 computer career experience in technical trainers, consultants, and database administrators.