Cross-platform cross-version database migration using RMAN in the same byte sequence

Source: Internet
Author: User
RMAN's convertdatabase command is used to move the entire database from one platform to another. When the source platform and target platform are in the same byte sequence, RMAN will

RMAN's convert database command is used to move the entire database from one platform to another. When the source platform and target platform are in the same byte sequence, RMAN will

Cross-platform transmission Database
RMAN's convert database command is used to move the entire database from one platform to another. When the source platform and the target platform are in the same byte sequence, RMAN automatically completes most operations for creating a new database on the target platform. The convertdatabase command takes a long time to process when the database is transferred across platforms. The convert database command of RMAN can be executed on the source or target platform, just like the tablespace to be transmitted.

When the database is transferred across platforms, files are automatically transmitted to the target platform. These files include:
1. it is a data file of a permanent tablespace. Note that no matter whether the source platform and the target platform have the same byte order, data files of the database to be transferred must be converted. data files cannot be copied from one platform to another. Unlike the cross-platform table space, data blocks of specific types, such as undo segments, must be reformatted to ensure compatibility with the target platform.

2. If PFILE is used, the PFILE will be transmitted. If SPFILE is used, PFILE is generated and transmitted Based on SPFILE, and a new SPFILE is generated based on PFILE on the target platform. Note: In most cases, some parameters in the PFILE file need to be manually modified for the new database. For example, db_name, control_files

Cross-platform database transmission restrictions
The primary limit for cross-platform database transmission is that the source and target platforms must have the same byte order. For example, when a database is transferred from a Windows platform to a Linux platform (both in small byte order) or from a HP-UX to AIX (both in large byte order ), the entire database cannot be transferred from the HP-UX to the Linux platform. However, you can create a new database on the target platform and use the tablespace transfer function to transmit the required tablespace from the source database to the target database using cross-platform and cross-byte sequence.

-------------------------------------- Recommended reading --------------------------------------

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

-------------------------------------- Split line --------------------------------------

Perform conversion on the source platform
Migrate the database jingyong (10.2.0.1) on the 32-bit windows platform to the 32-bit Linux platform (10.2.0.5 ). The steps for running the RMAN convert database operation on the source platform are as follows:
1. Open the source database in read-only mode
C: \ Users \ Administrator> sqlplus/as sysdba

SQL * Plus: Release 10.2.0.1.0-Production on Tuesday March 31 15:08:36 2015

Copyright (c) 1982,200 5, Oracle. All rights reserved.


Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.
SQL> startup mount
The ORACLE routine has been started.

Total System Global Area 419430400 bytes
Fixed Size 1249320 bytes
Variable Size 125833176 bytes
Database Buffers 285212672 bytes
Redo Buffers 7135232 bytes
The database has been loaded.
SQL> alter database open read only;

The database has been changed.

2. Run dbms_tdb.check_db check on the source database.
SQL> set serveroutput on
SQL> declare
2 db_ready boolean;
3 begin
4 db_ready: = dbms_tdb.check_db ('linux IA (32-bit) ', dbms_tdb.skip_readonly );
5 end;
6/

PL/SQL procedure successfully completed


3. Execute dbms_tdb.check_external on the source database to identify external objects.
SQL> set serveroutput on;
SQL> declare
2 external boolean;
3 begin
4 external: = dbms_tdb.check_external;
5 end;
6/

The following external tables exist in the database:
SH. SALES_TRANSACTIONS_EXT
The following directories exist in the database:
SYS. TEST_DUMP, SYS. SUBDIR, SYS. XMLDIR, SYS. MEDIA_DIR, SYS. LOG_FILE_DIR, SYS. DATA_FILE_DIR, SYS. WORK_DIR, SYS. ADMIN_DIR, SYS. DATA_PUMP_DIR
The following BFILEs exist in the database:
PM. PRINT_MEDIA

PL/SQL procedure successfully completed


4. Run the convert database command to specify the name of the target platform and output file. RMAN generates files to be moved to the target platform, including the following files:
-- Complete database data file copy
-- The New PFILE parameter file used on the target platform, including the settings from the source database PFILE or SPFILE. Before using the target platform, modify the settings.
-- Transfer scripts, including SQL statements used to create a new database on the Target Platform
RMAN> convert database new database 'jingyong'
2> transport script 'e: \ oradata \ transport \ transport_db_script. SQL'
3> to platform 'linux IA (32-bit )'
4> db_file_name_convert ('e: \ oradata \ JINGYONG \ datafile', 'e: \ oradata \ transport ','
E: \ oradata \ JINGYONG ', 'e: \ oradata \ transport ');

Start convert from March 3 to march 15
Use the target database control file to replace the recovery directory
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 152 devtype = DISK

Find the External table SH. SALES_TRANSACTIONS_EXT in the database.

Find the SYS. TEST_DUMP directory in the database.
Find the SYS. SUBDIR directory in the database.
Find the SYS. XMLDIR directory in the database.
Find the SYS. MEDIA_DIR directory in the database.
Find the SYS. LOG_FILE_DIR directory in the database.
Find the SYS. DATA_FILE_DIR directory in the database.
Find the SYS. WORK_DIR directory in the database.
Find the SYS. ADMIN_DIR directory in the database.
Find the SYS. DATA_PUMP_DIR directory in the database.

Find bfile pm. PRINT_MEDIA in the database

Find the user SYS in the password file (with SYSDBA and SYSOPER permissions)
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00001 name = E: \ ORADATA \ JINGYONG \ DATAFILE \ O1_MF_SYSTEM_BKLLOT8Z _.
DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ O1_MF_SYSTEM_BKLLOT8Z_.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:25
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00003 name = E: \ ORADATA \ JINGYONG \ DATAFILE \ O1_MF_SYSAUX_BKLLOTFL _.
DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ O1_MF_SYSAUX_BKLLOTFL_.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:16
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00005 name = E: \ ORADATA \ JINGYONG \ DATAFILE \ O1_MF_EXAMPLE_BKLLRKG2 _
. DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ omfmf_example_bkllrkg2_.dbf
Channel ORA_DISK_1: the data file has been converted, after 00:00:07
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00006 name = E: \ ORADATA \ JINGYONG \ TSPITR01.DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ TSPITR01.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:03
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00007 name = E: \ ORADATA \ JINGYONG \ TEST01.DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ TEST01.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:03
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00002 name = E: \ ORADATA \ JINGYONG \ DATAFILE \ O1_MF_UNDOTBS1_BKLLOTM0
_. DBF
Converted data file = E: \ ORADATA \ TRANSPORT \ O1_MF_UNDOTBS1_BKLLOTM0_.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:03
Channel ORA_DISK_1: starts data file conversion
Input data file fno = 00004 name = E: \ ORADATA \ JINGYONG \ DATAFILE \ O1_MF_USERS_BKLLOTM6_.D
BF
Converted data file = E: \ ORADATA \ TRANSPORT \ O1_MF_USERS_BKLLOTM6_.DBF
Channel ORA_DISK_1: the data file has been converted, after 00:00:01
Run the SQL script E: \ ORADATA \ TRANSPORT \ TRANSPORT_DB_SCRIPT. SQL on the target platform.
Database
Edit the init. ora file D: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ DATABASE \ init_00q37gus_00000.ora.
. This PFILE will be used to create database data on the Target Platform
To recompile all PL/SQL modules, run utlirp. SQL and utlrp. SQL on the target platform.
To change the internal database identifier, use the DBNEWID Utility
Backup completed from month 3 to month 15

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.