Oracle Rman Advanced Recovery Overview (vi) Cross-platform database mobility and Rman

Source: Internet
Author: User
Tags oracle database

Oracle 10g R2 supports manually moving databases across platforms, even if these platforms have different mantissa formats (endian format). The mantissa format is related to byte ordering, which has two different formats, the large mantissa and the small mantissa. If you move the database between platforms in different mantissa byte formats, you will need to manually manipulate and use the convert datafile or convert tablespace command of Rman to convert the transferred data file to the correct mantissa format.

Table space that can be transmitted across platforms

Oracle supports table space movement between all platforms of almost (not all) Oracle database families. This feature has some of the following advantages:

(1) Effective distribution of data between different content providers

(2) Easily transfer data between data sets and OLTP systems in different data warehouses.

(3) Easily migrate databases across platforms

In order to be able to move tablespaces between platforms, you must set the compatible to a 10.0.0 or higher value. When this parameter is set, the table space data file is set to support cross-platform operations the next time the operation is started. Note that read-only files and offline data files can support cross-platform operations only when they are set to read-write or online.

byte sorting and data file conversion

1, data file sorting

Oracle platforms typically use two different byte sorting methods, called the mantissa format. If multiple platforms use the same byte ordering scheme, you can use the usual method of transferring tablespaces without having any problems.

If the byte sorting scheme is different, you need to use the Convert command in Rman to convert the table space to the desired format on the target platform. You can determine the mantissa format by connecting the dynamic view V$database and the new V$transportable_platform view:

Sql> Select Endian_format from V$transportable_platform TP, V$database D where tp.platform_name=d.platform_name;

Endian_format

--------------

Little

In this example, the current system uses the small mantissa format. Therefore, if a query on two systems returns the same result, it represents a compatible data file format, and if different results are returned, the table space needs to be routed using Rman and compatible parameters.

2, the use of Rman conversion table Space Mantissa format

You can use Rman if you need to convert the table space on another platform.

(1) Conversion table space:

To convert a table space to read-only mode first:

Sql> alter tablespace BL Read only;

The table space has changed.

Rman> convert tablespace BL to platform= ' aix-based Systems (64-bit) '

Db_file_name_convert= ' D:/app/administrator/oradata/bl ', ' F:/BL ';

Start conversion at source in August-July-10

Using channel Ora_disk_1

Channel Ora_disk_1: Initiating data File conversion

Enter data file: File Number = 00005 is called =d:/app/administrator/oradata/bl/bl01. Dbf

Converted data File = F:/bl/bl01. Dbf

Channel ora_disk_1: Data file conversion completed, after time: 00:00:07

Completed conversion at source in August-July-10

Start Control File and SPFILE autobackup in August-July-10

Duan Handle=d:/app/administrator/flash_recovery_area/bl/autobackup/2010_07_08/o1_m

F_s_723857700_63cw16c1_. BKP Comment=none

Complete control File and SPFILE autobackup in August-July-10

Description, in this experiment, we found that it backs up the control files and SPFile files, which also illustrates the previous view that when the data file changes, when the automatic backup is turned on the premise of automatically backing up the 2 files.

(2) Converting data files

rman> convert datafile ' d:/app/administrator/oradata/bl/bl01. DBF ' from Platform

' Aix-based Systems (64-bit) ' Db_file_name_convert ' d:/app/administrator/oradata/

BL ', ' F:/BL ';

Refer to the online documentation for CONVERT datafile or tablespace

Http://www.di.unipi.it/~ghelli/didattica/bdldoc/B19306_01/backup.102/b14191/dbxptrn001.htm

Use the platform name from the Platform_name column of the V$transportable_platform view. Oracle has strict requirements for putting the correct name.

Once the transformation is complete, the move can be done in the following way, using a portable table space to manually move data files or tablespaces. Note that RMAN cannot complete the operation if the mantissa format is different. The mantissa of the same can be done in the following way.

Sql> select * from V$transportable_platform;

platform_id Platform_name

----------- ----------------------------------------

1 Solaris[tm] OE (32-bit)

2 Solaris[tm] OE (64-bit)

7 Microsoft Windows IA (32-bit)

Ten Linux IA (32-bit)

6 aix-based Systems (64-bit)

3 HP-UX (64-BIT)

Three, Cross-platform Mobile database

Oracle 10g provides a new feature for moving databases between platforms with the same mantissa format. The Convert Database command combines DBMS_TDP packages to reduce the overall workload of moving databases between platforms. The process includes the following steps:

1. Open the database as read-only

Start Mount;

Alter database open Read only;

2. Use the dbms_tdp.check_db procedure to check the state of the database.

Set Serveroutput on

Declare

Db_ready Boolean;

Begin

Db_ready: = dbms_tdb.check_db

(' Microsoft Windows IA (32-bit) ', dbms_tdb.skip_readonly);

End;

/

3, using the dbms_tdb.check_external process to identify external objects:

Set Serveroutput on

Declare

External Boolean;

Begin

External: = dbms_tdb.check_external;

End;

/

4. When the database master is ready for transmission, you can use the Rman Convert Database command. RMAN creates the scripts needed to move the database, but does not actually perform the move, but instead creates the files needed for the move.

Convert database New database ' copy ' Transport scripts ' c:/oracle/copyscripts ' to platform ' Microsoft Windows IA (32-bit) ';

Once this command is complete, the conversion can be completed on the target database simply by following the instructions provided by Rman.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.