Oracle 跨操作系统 迁移 说明

来源:互联网 发布:足球滚球大小球软件 编辑:程序博客网 时间:2024/06/03 00:25

 

关于跨OS 的DB 迁移,MOS 上有相关的文章说明:[ID733205.1]。

 

To migrate anexisting Oracle database (NOT BINARIES)  from one Operating Systemplatform to another (i.e. Windows to Solaris) ,This can occur as part ofan Oracle version upgrade (Oracle 8i .. Oracle 11G) or within the sameOracle version: (Oracle 10.2 to Oracle 10.2). 

--可以将Oracle DB 从一个操作系统迁移到另一个操作系统,比如从windows到Solaris,注意这里的迁移仅仅是数据的迁移,不包含DB 的安装介质。这个迁移可以是不同DB版本的迁移,比如从8i 到11g,也可以是相同版本的迁移,比如从10.2 到10.2.

 

Changes withinan Operating System (ie: Linux,Windows or Solaris from 32 bit to 64 bit) arenot considered cross platform migrations and are performed as normal versionupgrades/wordsize conversions. 

--改变操作系统不用考虑系统的平台,可以按照正常的db version upgrades 和 wordsize 的改变来操作。

 

一. 解决方法

There is no migrationutility (Script or DBUA) to perform a cross platform migration of an OracleDatabase.

--没有迁移工具如脚本或者DBUA来执行跨OS的数据迁移。

 

Changingplatforms requires the database be re-built and / or the data moved using oneof the following methods:

--跨平台的迁移需要重建数据库,然后使用如下的一种方法来完成数据的迁移工作。

(1)    Export / Import to include theuse of Datapump facilities. All versions support Export/Import but for Datapump10.1.0.2 or higher is required

(2)    Transportable Tablespaces 10Gor Later

(3)    RMAN Convert Databasefunctions. 10G or Later

(4)    Streams Replication

(5)    Create Table As Select (CTAS)

(6)    Dataguard Heterogeneous Primaryand Physical Standbys

(7)    Oracle Golden Gate

 

Each availablechoice will have strengths and limitations to include data types, time requiredand potential costs.

       --每一个可选的方法都有它的优势和限制,如数据类型,需要的时间和一些潜在的消耗。

 

The choicesavailable will depend on BOTH the Operating System and Oracle versions on boththe source and destination. 

--方法是否可用也取决与Source 和 Destination 两端的操作系统和Oracle版本。

 

 

二. 示例

There areplatform limitations when using Dataguard Heterogeneous Primary and PhysicalStandbys。

--比如使用DG的异构平台来迁移时,就会有操作系统的限制。 关于这块内容,之前有详细的Blog:

Oracle DataGuard 支持的异构平台 说明

http://blog.csdn.net/tianlesoftware/article/details/7241488

 

RMAN ConvertDatabase only works if both source and destination belong to the same ENDIANformat. 

--RMAN Convert DB 仅在source 和destination 的ENDIAN 格式相同的情况下才可以使用。


RMAN's convertfunction for Transportable Tablespaces will convert from one ENDIAN format toanother. 

在ENDIAN 格式不同的情况下,可以使用RMAN convert function 来转换ENDIAN 从一种格式到另一种格式。如:

 RMAN> convert tablespace TBS1 to platform="Linux IA(32-bit)" FORMAT '/tmp/%U';

 

两端相同之后,就可以进行Transportabletablespace 的操作。

 

可以通过v$transportable_platform视图查看系统的ENDIAN 格式:

SQL> columnplatform_name format a35

SQL> select *from v$transportable_platform order by 1;

 

PLATFORM_IDPLATFORM_NAME                      ENDIAN_FORMAT

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

          1 Solaris[tm] OE (32-bit)             Big

          2 Solaris[tm] OE (64-bit)             Big

          3 HP-UX (64-bit)                      Big

          4 HP-UX IA (64-bit)                   Big

          5 HP Tru64 UNIX                       Little

          6 AIX-Based Systems (64-bit)          Big

          7 Microsoft Windows IA (32-bit)       Little

          8 Microsoft Windows IA (64-bit)       Little

          9 IBM zSeries Based Linux             Big

         10 Linux IA (32-bit)                   Little

         11 Linux IA (64-bit)                   Little

         12 Microsoft Windows x86 64-bit        Little

         13 Linux x86 64-bit                    Little

         15 HP Open VMS                         Little

         16 Apple Mac OS                        Big

         17 Solaris Operating System (x86)      Little

         18 IBM Power Based Linux               Big

         19 HP IA Open VMS                      Little

         20 Solaris Operating System(x86-64)   Little

         21 Apple Mac OS (x86-64)               Little

 

20 rowsselected.

 

1.2.1 The following isthe basic information for using Transportable Tablespaces:

--使用Transport Tablespace 的步骤:

(1)    Create an "empty"database in the new environment

(2)    Plug in all data tablespacesfrom source to target database

(3)    SYSTEM+SYSAUX tablespaces can'tbe transported

(4)    Additional steps necessary tomove views, synonyms etc.

(5)    Possibly very fast upgrade

(6)    Complexity could beconstraining

(7)    Works cross-platform andcross-Endianness since Oracle Database 10g

 

1.2.2 The following isthe basic information for using Oracle Streams in an upgrade:

--使用Oracle Streams的步骤:

(1)    Build up a copy of yourdatabase and upgrade it

(2)    Synchronize it with the sourcedatabase

(3)    Minimal downtime:  Justreconnecting the clients

(4)    Works Across platforms

(5)    Cross version since Oracle 9iR2

(6)    Some effort necessary to set itup

(7)    Fallback possible since sourceuntouched

(8)    Potential Issues include:

1)DatatypeRestrictions

2)Performance


1.2.3 The following are a list of notes to assist users in deciding whichprocess will work best for them. 

       --相关的说明文档:

Note.553337.1 Export/ImportDataPump Parameter VERSION - Compatibility of Data Pump Between DifferentOracle Versions 
Note.556636.1 OracleServer - Export Data Pump and Import DataPump FAQ 
Note.351598.1 Export/ImportDataPump The Minimum Requirements to Use Export DataPump and Import DataPump(System Privileges) 

Note.243304.1 10g: Transportable Tablespaces Across Different Platforms 
Note:371556.1 How move tablespaces across platforms using Transportable Tablespaces with RMAN
Note.413586.1 How To Use RMAN CONVERT DATABASE for Cross Platform Migration 

Note:413484.1 Data Guard Support for Heterogeneous Primary and PhysicalStandbys in Same Data Guard Configuration
Oracle Streams Concepts and Administration: Appendix D 

http://download.oracle.com/docs/cd/E11882_01/server.112/e17069/ap_strmnt.htm#CIHJBIAA

 

 

小结:

关于Oracle 跨操作系统的迁移,我们不用过多的关心操作系统的类型,这种迁移支持跨DB 版本和跨wordsize 的迁移。

 

我们可以使用如下的方法实现跨OS的迁移:

(1)    Export / Import to include theuse of Datapump facilities. All versions support Export/Import but for Datapump10.1.0.2 or higher is required

(2)    Transportable Tablespaces 10Gor Later

(3)    RMAN Convert Databasefunctions. 10G or Later

(4)    Streams Replication

(5)    Create Table As Select (CTAS)

(6)    Dataguard Heterogeneous Primaryand Physical Standbys

(7)    Oracle Golden Gate

 

在迁移过程,我们需要注意2种信息:

1.     操作系统的ENDIAN格式,不同的操作系统,ENDIAN格式不一样,如果我们迁移的2种OS 的ENDIAN 不一样,我们可以使用RMAN's convert function 来进行转换,使他们保持一致。

2.     如果迁移过程数据库的wordsize,如果不一致,我们也需要修改wordsize,使两端保持一致。 具体参考:

OracleConvert a 32-bit Database to 64-bit Database(32位 转到 64位)说明

http://blog.csdn.net/tianlesoftware/article/details/7252742

 

接下来会写几篇有关使用Transportable tablespaces的 Blog。

 

 

 

 

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

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Email:   tianlesoftware@gmail.com

Skype: tianlesoftware

Blog:     http://www.tianlesoftware.com

Weibo: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook:http://www.facebook.com/tianlesoftware

 

-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----

DBA1 群:62697716(满);   DBA2 群:62697977(满)  DBA3 群:62697850(满)  

DBA 超级群:63306533(满);  DBA4 群:83829929   DBA5群: 142216823

DBA6 群:158654907    DBA7 群:172855474   DBA总群:104207940

原创粉丝点击