概述
OracleData Guard 最简单的配置是主备库的环境都一样,但是在有些情况下需要异构的配置,比如在迁移时为了减少停机时间或者零停机,可能就需要使用异构的DG 配置。
关于Oralce DataGuard 异构平台的搭建,Metalink上有2篇文章专门来说明:
Data Guard Support for HeterogeneousPrimary and Logical Standbys in Same Data Guard Configuration [ID 1085687.1]
Data Guard Support for HeterogeneousPrimary and Physical Standbys in Same Data Guard Configuration [ID 413484.1]
在Oracle 11g 之前,DG Broker 不支持不同word-size的DG 配置,因此需要修改word-size. 到了Oracle 11g 之后,DG 就没有了这个限制。具体可查看Metalink的下面文章
Changing between 32-bit and 64-bit WordSizes [ID 62290.1]
这里的word-size只的是数据库的位数,是32位还是64位。其查看方法,我之前的Blog 有说明。
在配置异构DG 之前,要先查看主备库的Platform ID,可以从v$database 视图中查看:
SQL> select platform_id,platform_name from v$database;
PLATFORM_ID PLATFORM_NAME
----------- ---------------------------------------------
         7 Microsoft Windows IA (32-bit)

SQL> select platform_id,platform_name from v$database;
PLATFORM_ID PLATFORM_NAME
-------------------------------------------------------------------------------
        10 Linux IA (32-bit)
这里的Platform_ID 是唯一的,不同的平台,即每个OS对应一个ID。
只要server 上Oracle 的软件的版本和位数是一致的,主备库就支持不同的server,即Server不影响,比如:
(1)Hardware manufacturer (e.g. Delland Sun or Hitachi and EMC)
(2)Hardware configuration (e.g. numberof CPUs, amount of RAM, storage configuration, etc)
(3)Processor (e.g. x86-64 AMD64 andx86-64 Intel 64; POWER4 and POWER5)
(4)Operating system distribution (e.g.Red Hat Linux, SUSE Linux or Oracle Enterprise Linux)
(5)Operating system version (e.g.Windows 2000 and Windows XP)
物理standby
物理standby 支持的混合平台如下表所列,不在下表不受支持。
以下几点需要注意:
1、在Oracle 11g之后,不受数据库word-size的限制(数据库32还是64位)
2、在下表所列的平台中,主备库的compatible 参数必须相同。
3、A standby database cannot beopen read-only in any environment that has binary-level PL/SQL-related incompatibilities between primary and standby databases.  Support Note414043.1 is referenced in the table below for any platform combinations where this is the case (the note provides instructions for eliminating incompatibilities post role transition).  It is possible to access astandby database in such environments in Oracle Database 11g by temporarily converting it to a Snapshot Standby database, or in Oracle Database 10g by opening the standby read/write as described in the Data Guard 10g Concepts and Administration guide: Usinga Physical Standby Database for Read/Write Testing and Reporting. Both procedures require following the steps in note 414043.1 before making the database available to users.
4、RMAN generally supports instantiation of a physical standby database for the supported platform combinations. Please see Support Note 1079563.1 for details.
5、Platforms in a supporte dcombination may operate in either the primary or standby role.
--平台支持主备库角色的转换
6、在PLATFORM_ID 不一样的情况下,备库不能创建和使用EM。但可以使用DG Broker。


PLATFORM_ID

PLATFORM_NAME
Release name

PLATFORM_IDs supported within the same Data Guard configuration when using Data Guard Redo Apply (Physical Standby)

2

Solaris[tm] OE (64-bit)

Solaris Operating System (SPARC) (64-bit)

2

6 - This is not supported due to issues reported in Bug 12702521

3

HP-UX (64-bit)

HP-UX PA-RISC

3

4 - Oracle 10g onward, see Support Notes 395982.1 and 414043.1

4

HP-UX IA (64-bit)

HP-UX Itanium

4

3 - Oracle 10g onward, see Support Notes 395982.1 and 414043.1

5

HP Tru64 UNIX

HP Tru64 UNIX

5

6

IBM AIX on POWER Systems (64-bit)

2 - This is not supported due to issues reported in Bug 12702521

6

7

Microsoft Windows (32-bit)

Microsoft Windows (x86)

7

8, 12  - Oracle 10g onward, see Support Note 414043.1

10 - Oracle 11g onward, requires patch for Bug 13104881

11, 13 - Oracle 11g onward, see Support Note 414043.1, also requires patch for Bug 13104881

8

Microsoft Windows IA (64-bit)

Microsoft Windows (64-bit Itanium)

7 - Oracle 10g onward, see Support Note 414043.1

8

12 - Oracle 10g onward

11, 13 - Oracle 11g onward, requires patch for Bug 13104881

9

IBM zSeries Based Linux

z/Linux

9

18 (64-bit zSeries only)

10

Linux (32-bit)

Linux x86

7 - Oracle 11g onward, requires patch for Bug 13104881

10

11, 13 - Oracle 10g onward, see Support Note 414043.1

11

Linux IA (64-bit)

Linux Itanium

10 - Oracle 10g onward, see Support Note 414043.1

11

13 - Oracle 10g onward

7 - Oracle 11g onward, see Support Note 414043.1, also requires patch for Bug 13104881

8, 12 - Oracle 11g onward, requires patch for Bug 13104881

12

Microsoft Windows 64-bit for AMD

Microsoft Windows (x86-64)

7 - Oracle 10g onward, see Support Note 414043.1

8 - Oracle 10g onward

12

11, 13 - Oracle 11g onward, requires patch for Bug 13104881

13

Linux 64-bit for AMD

Linux x86-64

7 - Oracle 11g onward, see Support Note 414043.1, also requires patch for Bug 13104881

10 - Oracle 10g onward, see Support Note 414043.1

11 - Oracle 10g onward

8, 12 - Oracle 11g onward, requires patch for Bug 13104881

13

20 - Oracle 11g onward

15

HP Open VMS

HP OpenVMS Alpha

HP IA OpenVMS

OpenVMS Itanium

15

16

Apple Mac OS

Mac OS X Server

16

17

Solaris Operating System (x86)

Solaris Operating System (x86)

17

20 - Oracle 10g onward, see Support Note 414043.1

18

IBM Power Based Linux

Linux on Power

9 (64-bit zSeries only)

18

20

Solaris Operating System (AMD64)

Solaris Operating System (x86-64)

13 - Oracle 11g onward

17 - Oracle 10g onward, see Support Note 414043.1

20

逻辑standby
逻辑standby对于dg异构平台的支持,大体上和物理standby没有区别,大家看下下面的表格即可

PLATFORM_ID

PLATFORM_NAME
Release name

PLATFORM_IDs supported within the same Data Guard configuration when using Data Guard SQL Apply (Logical Standby)

2

Solaris[tm] OE (64-bit)

Solaris Operating System (SPARC) (64-bit)

2

3

HP-UX (64-bit)

HP-UX PA-RISC

3, 4

4

HP-UX IA (64-bit)

HP-UX Itanium

3, 4

5

HP Tru64 UNIX

HP Tru64 UNIX

5

6

AIX-Based Systems (64-bit)

AIX5L

6

7

Microsoft Windows (32-bit)

Microsoft Windows (x86)

7

10 requires patch for Bug 13104881

8, 12 - Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

8

Microsoft Windows IA (64-bit)

Microsoft Windows (64-bit Itanium)

7 - Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

8, 12

11, 13, both require patch for Bug 13104881

9

IBM zSeries Based Linux

z/Linux

9

10

Linux (32-bit)

Linux x86

7, requires patch for Bug 13104881

10

11, 13 - Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

11

Linux IA (64-bit)

Linux Itanium

10 - Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

8, requires patch for Bug 13104881

11, 13

12

Microsoft Windows 64-bit for AMD

Microsoft Windows (x86-64)

7 - from Oracle 11g onward.  Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

8, 12

13

Linux 64-bit for AMD

Linux x86-64

10 - Replication can only occur from a 32-bit primary to a 64-bit standby, once a role transition has promoted the 64-bit system to the primary role, the original 32-bit primary is not supported as a standby database.

8, requires patch for Bug 13104881

11, 13

15

HP Open VMS

HP OpenVMS Alpha

HP IA OpenVMS

OpenVMS Itanium

15

16

Apple Mac OS

Mac OS X Server

16

17

Solaris Operating System (x86)

Solaris Operating System (x86)

17

18

IBM Power Based Linux

Linux on Power

18

20

Solaris Operating System (AMD64)

Solaris Operating System (x86-64)

20



如有错误,欢迎指正