码迷,mamicode.com
首页 > 其他好文 > 详细

备库简介

时间:2014-10-06 00:36:29      阅读:666      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   os   使用   ar   for   文件   数据   

备库类型:1.物理备库;2.逻辑备库;3.快照备库。

可以同时配置1个或多个类型的备库 

  1.物理备库

    是主库的块对块的拷贝,应用重做日志,通过从主库接受重做数据应用到物理备库上的机制

    可以以read only模式打开,11g之后可以配置active DG以只读模式打开应用重做数据

 

    物理备库的好处:

      1. 灾难恢复和高可用

      2. 数据保护

        支持多有的DDLDML操作

      3. 减小主库负载

        以只读模式打开,用于报表和查询

      4. 性能

        底层拷贝,绕过SQL级别代码层

 

  2. 逻辑备库

    通过SQL应用更新备库,数据库的结构会发生改变,应用SQL时,备库处于打开状态,可以直接进行查询和报表操作

    工作机制:DG转换redo日志的数据为SQL语句,然后在备库上执行SQL语句,备库虽然是以读写模式打开的,但是SQL应用生成的数据只能用于读写操作

    逻辑备库在数据类型,表的类型,DDL/DML操作类型上有一些限制

 

    逻辑备库的好处

      1. 防止额外的故障类型

      2. 充分运用资源

      3. 分担负载压力

      4. 充分利用报表和决策支持的要求

      5. 最大限度减少软件升级时间

 

  3. 快照备库

    物理备库可以装换为快照备库,然后以读写模式打开,快照备库接受redoarchivelog,但不应用。只有在装换为物理备库后才继续应用redoarchivelog

 

    快照备库的好处:

      1. 提供精确地从生产数据库到开发或测试数据库的数据复制

      2. 通过转换为物理备库可以轻松的更新同步现有生产数据

      3. 可以以读写模式打开,修改数据

 

配置、实施、管理备库的方法:

  1. EM

  2. sqlplus

  3. pfile

  4. dgmgrl

 

DG配置的先决条件

  11g:主备库可以运行在不同的CPU,操作系统,不同位数的操作系统,不同位数的oracle软件,数据库的版本必须一致

  硬件和操作系统要求:

  物理备库(MOS:413484.1):

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 Note: 395982.1 andNote:414043.1

4

HP-UX IA (64-bit)

HP-UX Itanium

4

3 - Oracle 10g onward, see Support Notes Note: 395982.1 andNote: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 13104881

11, 13 - Oracle 11g onward, see Support Note: 414043.1, also requires Patch 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 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 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 requiresPatch 13104881

8, 12 - Oracle 11g onward, requires Patch 13104881

12

Microsoft Windows 64-bit for AMD

Microsoft Windows (x86-64)

7 - Oracle 10g onward, see Support Note Note: 414043.1

8 - Oracle 10g onward

12

11, 13 - Oracle 11g onward, requires Patch 13104881

13

Linux 64-bit for AMD

Linux x86-64

7 - Oracle 11g onward, see Support Note: 414043.1, also requiresPatch 13104881

10 - Oracle 10g onward, see Support Note Note: 414043.1

11 - Oracle 10g onward

8, 12 - Oracle 11g onward, requires Patch 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

 

  逻辑备库(MOS:1085687.1

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


oracle软件要求:

  1. DG只能在企业版oracle上配置

  2. 主备库的oracle软件版本必须一致

  3. 逻辑备库可以实现rdbms软件的滚动升级(10.1.0.3之后)。在滚动升级的过程中,主备库可以运行不同版本的数据库软件

  4. 逻辑备库的兼容性参数(compatible)可以高于主库,物理备库的兼容性必须和主库一致

  5. 主库必须运行在归档模式下

  6. 主库可以是单实例或者RAC,备库也可以是单实例或者RAC,备库可以是物理备库,逻辑备库,和快照备库的混合类型

  7. 每一个主库和备库必须有自己的控制文件

  8. 主备库在同一台主机上,则归档路径必须不一样,否则备库归档会覆盖主库归档

  9. 防止主库的nologging写操作,主库必须开启强制日志(force logging

  10. 管理主备库实例的用户必须拥有SYSDBA权限

  11. 如有一个实例使用了ASM或者OMF,则其余实例必须使用ASMOMF,除非配置了混合类型的备库做迁移和维护

 

备库的目录架构

  备库的目录架构,数据文件,日志文件,归档日志文件,备库日志文件尽量和主库一致,这样可以减少维护的复杂度。

  注意: 当主备库位于同一台主机,则主备库的目录架构必须不一样,否则,备库会覆盖主库文件

 

  主备库目录可配置图示

    bubuko.com,布布扣

  备库位置和目录架构配置选项

备库系统

目录架构

结果

同一主机

必须与主库使用不同的目录架构

1. 手工重命名文件名或者备库配置初始化参数:DB_FILE_NAME_CONVERT,LOG_FILE_NAME_CONVERT

2. 不能保证由于操作系统故障引起的灾难,但是能提供有计划地切换和维护工作

不同主机

主备库目录结构相同

1. 不需要重命名文件,但也可以手工设置

2. 主备库位于不同的主机和存储介质上,可以防止操作系统级别的灾难

不同主机

主备库目录结构不同

1. 手工重命名文件名或者备库配置初始化参数:DB_FILE_NAME_CONVERT,LOG_FILE_NAME_CONVERT

2. 主备库位于不同的主机和存储介质上,可以防止操作系统级别的灾难

备库简介

标签:blog   http   io   os   使用   ar   for   文件   数据   

原文地址:http://www.cnblogs.com/redoracle/p/4007501.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!