RMAN cross-minor version cross-platform and byte sequence transmission tablespace

Source: Internet
Author: User
Tags windows x86

RMAN cross-minor version cross-platform and byte sequence transmission tablespace

Transmit the tspitr and test tablespaces in the source database on the Linux platform to the AIX platform. Use the directory/u02/transport on the source host to store the converted data files. The procedure is as follows:

1. Set the tablespace tspitr and test to read-only.
SQL> alter tablespace tspitr read only;

Tablespace altered.

SQL> alter tablespace test read only;

Tablespace altered.


2. Check that the source and target platforms do not support transmission.
The platform information supported by the database:
SQL> select platform_name, endian_format from v $ transportable_platform;

PLATFORM_NAME ENDIAN_FORMAT
----------------------------------------------------------------------------------------------
Solaris [tm] OE (32-bit) Big
Solaris [tm] OE (64-bit) Big
Microsoft Windows IA (32-bit) Little
Linux IA (32-bit) Little
AIX-Based Systems (64-bit) Big
HP-UX (64-bit) Big
HP Tru64 UNIX Little
HP-UX IA (64-bits) Big
Linux IA (64-bit) Little
HP Open VMS Little
Microsoft Windows IA (64-bit) Little
IBM zSeries Based Linux Big
Linux x86 64-bit Little
Apple Mac OS Big
Microsoft Windows x86 64-bit Little
Solaris Operating System (x86) Little
IBM Power Based Linux Big
Solaris Operating System (x86-64) Little
Hp ia Open VMS Little


Source platform:
SQL> select d. platform_name, endian_format from v $ transportable_platform tp, v $ database d where tp. platform_name = d. platform_name;

PLATFORM_NAME ENDIAN_FORMAT
Certificate -------------------------------------------------------------------------------------------------------------------
Linux 64-bit for AMD Little

 

Target Platform
SQL> select d. platform_name, endian_format from v $ transportable_platform tp, v $ database d where tp. platform_name = d. platform_name;

PLATFORM_NAME ENDIAN_FORMAT
----------------------------------------------------------------------------------------------
AIX-Based Systems (64-bit) Big

 

3. Check whether the tablespace to be transmitted is a self-contained tablespace (TSPITR, TEST ):
SQL> exec sys. dbms_tts.transport_set_check ('tspitr', true );

PL/SQL procedure successfully completed.


SQL> exec sys. dbms_tts.transport_set_check ('test', true );

PL/SQL procedure successfully completed.

SQL> select * from sys. transport_set_violations;

No rows selected


If no rows are selected, the tablespace contains only table data and can be transmitted.

4. Records in the tspitr and test tables before the table space transfer:
SQL> select count (*) from tspitr. tspitr;

COUNT (*)
----------
50315

SQL> select count (*) from test. test;

COUNT (*)
----------
50316


5. Use RMAN to convert the table space tspitr and test in the source database to the byte sequence format of the target platform. Use the format parameter to control the file name and storage directory of the converted data file.
[Oracle @ oracle11g ~] Export NLS_DATE_FORMAT = 'yyyy-mm-dd hh24: mi: ss'
[Oracle @ oracle11g ~] Rman target/

Recovery Manager: Release 10.2.0.5.0-Production on Mon Mar 30 10:35:41 2015

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

Connected to target database: TEST (DBID = 2168949517)


RMAN> convert tablespace "TSPITR", "TEST"
2> to platform 'Aix-Based Systems (64-bit )'
3> format = '/u02/transport/% U ';

Starting backup at 10:37:27
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 141 devtype = DISK
Channel ORA_DISK_1: starting datafile conversion
Input datafile fno = 00006 name =/u01/app/oracle/oradata/test/tspitr01.dbf
Converted datafile =/u02/transport/data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8
Channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
Channel ORA_DISK_1: starting datafile conversion
Input datafile fno = 00007 name =/u01/app/oracle/oradata/test/test01.dbf
Converted datafile =/u02/transport/data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo
Channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Finished backup at 2015-03-30 10:37:45


[Oracle @ oracle11g transport] $ ls-lrt
Total 112776
-Rw-r ----- 1 oracle oinstall 104865792 Mar 30 data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8
-Rw-r ----- 1 oracle oinstall 10493952 Mar 30 data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo


6. Use the export tool to create and transfer the tablespace metadata dump file
SQL> create or replace directory test_dump as '/u02/transport ';

Directory created.

SQL> grant read, write on directory test_dump to public;

Grant succeeded.


[Oracle @ oracle11g dump_test] $ expdp \ 'sys/zzh_2046 @ test as sysdba \ 'directory = test_dump dumpfile = tspitr_test.dmp logfile = tspitr_test.log transport_tablespaces = TSPITR, TEST

Export: Release 10.2.0.5.0-Production on Monday, 30 March, 2015 10:57:37

Copyright (c) 2003,200 7, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS". "deployed": "sys/******** @ test as sysdba" directory = test_dump dumpfile = tspitr_test.dmp logfile = tspitr_test.log transport_tablespaces = TSPITR, TEST
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYS". "SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
**************************************** **************************************
Dump file set for SYS. SYS_EXPORT_TRANSPORTABLE_01 is:
/U02/dump_test/tspitr_test.dmp
Job "SYS". "SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 10:57:55

[Oracle @ oracle11g dump_test] ls-lrt

-Rw-r ----- 1 oracle oinstall 960 Mar 30 tspitr_test.log
-Rw-r ----- 1 oracle oinstall 90112 Mar 30 tspitr_test.dmp


7. Transfer the converted data files stored in the/u02/transport Directory and the exported Metadata File tspitr_test.dmp to the target host directory/yb_oradata/transport.
Ftp> put data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8
200 PORT command successful.
150 Opening data connection for data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v
8.
226 Transfer complete.
Ftp: Send 104865792 bytes, with 8.86 KB/second in 11839.88 seconds.
Ftp> put data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo
200 PORT command successful.
150 Opening data connection for data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo.

226 Transfer complete.
Ftp: Send 10493952 bytes, with 0.90 KB/second in 11659.95 seconds.
Ftp> put tspitr_test.dmp
200 PORT command successful.
150 Opening data connection for tspitr_test.dmp.
226 Transfer complete.

[IBMP740-1: oracle:/yb_oracle data] $ ls-lrt
-Rwxrwxrwx 1 oracle dba 104865792 Mar 30 data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8
-Rwxrwxrwx 1 oracle dba 10493952 Mar 30 data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo
-Rwxrwxrwx 1 oracle dba 98304 Mar 30 tspitr_test.dmp


8. Attach the tablespace to be transmitted to the target database.
[IBMP740-1: oracle:/yb_oradata] $ sqlplus/as sysdba

SQL * Plus: Release 10.2.0.4.0-Production on Mon Mar 30 11:31:47 2015

Copyright (c) 1982,200 7, Oracle. All Rights Reserved.


Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create user tspitr identified by "tspitr ";

User created.

SQL> grant dba, connect, resource to tspitr;

Grant succeeded.

SQL> create user test identified by "test ";

User created.

SQL> grant dba, connect, resource to test;

Grant succeeded.

 

SQL> create or replace directory test_dump as '/yb_oradata/transport ';

Directory created.

SQL> grant read, write on directory test_dump to public;

Grant succeeded.


[IBMP740-1: oracle] $ impdp system/system directory = test_dump dumpfile = tspitr_test.dmp transport_datafiles =/yb_oradata/data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo,/yb_oradata/data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8

Import: Release 10.2.0.4.0-64bit Production on Monday, 30 March, 2015 11:45:48

Copyright (c) 2003,200 7, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM". "SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM". "tables": system/******* directory = test_dump dumpfile = tspitr_test.dmp transport_datafiles =/yb_oradata/transport/data_D-TEST_I-2168949517_TS-TEST_FNO-7_3bq349vo,/yb_oradata/transport/data_D-TEST_I-2168949517_TS-TSPITR_FNO-6_3aq349v8
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
The ORA-39123: Data Pump transportable tablespace job aborted
ORA-00721: changes by release 10.2.0.5.0 cannot be used by release 10.2.0.3.0

Job "SYSTEM". "SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 11:45:53


The cause of the error is that the source database's compatible = 10.2.0.5.0 and the target database's compatible = 10.2.0.3.0 are exported using version = 10.2.0.3.0. This error is also returned when metadata is exported and then exported, because it is not a logical export, but a tablespace is transmitted, the version parameter does not work. Therefore, you want to modify the compatible parameter of the source database to 10.2.0.3.0, but after 10 Gb, the compatible parameter can only be increased and cannot be reduced.
SQL> show parameter compatible

NAME TYPE VALUE
-----------------------------------------------------------------------------
Compatible string 10.2.0.5.0

SQL> alter system set compatible = '10. 2.0.3.0 'scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1272600 bytes
Variable Size 109053160 bytes
Database Buffers 54525952 bytes
Redo Buffers 2920448 bytes
ORA-00201: control file version 10.2.0.5.0 incompatible with ORACLE version
10.2.0.3.0
ORA-00202: control file: '/u01/app/oracle/oradata/test/control01.ctl'

The database cannot be started after the compatible parameter of the source database is changed to 10.2.0.3.0.

For more details, please continue to read the highlights on the next page:

-------------------------------------- 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 --------------------------------------

  • 1
  • 2
  • 3
  • 4
  • Next Page

Related Article

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.