dg搭建for oracle windows_windows上oracle dg搭建 - CSDN
精华内容
参与话题
  • 升级: 先搭建一个同版本同平台DG, 停源库后,在DG做本地升级, 升级后搭建GG到源库,做回滚。 转RAC: 同平台同版本转RAC, 1. 搭建一个单实例DG, 停源库后, 停DG, 修改为RAC启库.. 2. 直接搭建为RAC DG, (应该是可以,...

    使用DG来方式来做升级和迁移,转RAC, 是很常见的方式:通常有

     

    升级:        先搭建一个同版本同平台DG,  停源库后,在DG做本地升级, 升级后搭建GG到源库,做回滚。

    转RAC: 同平台同版本转RAC,  1. 搭建一个单实例DG, 停源库后,  停DG, 修改为RAC启库.. 2. 直接搭建为RAC DG, (应该是可以, 但需要验证)

    迁移:        搭建为DG, 停源库后,  停DG改为主库. 源库使用GG做回滚链路。

     

    但在迁移时候如果是非同平台, 那么将会有如下的一些限制: (考虑 - 如果是不同版本呢?)

     

    This increased mixed-platform flexibility is subject to the current restrictions

    documented in the My Oracle Support notes 413484.1 and 1085687.1 at

    http://support.oracle.com.

     

    物理standbys

    Note 413484.1 discusses mixed-platform support and restrictions for physical

    standbys.

     

    逻辑standbys

    Note 1085687.1 discusses mixed-platform support and restrictions for logical standbys.)

     

    FROM MOS

    Data Guard Support for Heterogeneous Primary and Physical Standbys in Same Data Guard Configuration (文档 ID 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 - See Support Note: 1982638.1 and Note: 414043.1

    3

    HP-UX (64-bit)
    HP-UX PA-RISC

    3
    4 - Oracle 10g onward, see Support Note: 395982.1 and Note:414043.1

    4

    HP-UX IA (64-bit)
    HP-UX Itanium

    4
    3 - Oracle 10g onward, see Support Notes Note: 395982.1 and Note:414043.1</TD< a>

    5

    HP Tru64 UNIX
    HP Tru64 UNIX

    5

    6

    IBM AIX on POWER Systems (64-bit)

    2 - See Support Note: 1982638.1 and Note: 414043.1
    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 requires Patch 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 requires Patch 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




    展开全文
  • Oracle Data Guard 支持的异构平台 说明

    万次阅读 2017-12-04 11:03:14
    说明 OracleData Guard 最简单的配置是主备库的环境都一样,但是在有些情况下需要异构的配置,比如在迁移时为了减少停机时间或者零停机,可能就需要使用异构的DG 配置。 关于Oralce DataGuard 异构平台的搭建,MOS...


    一.说明

           OracleData Guard 最简单的配置是主备库的环境都一样,但是在有些情况下需要异构的配置,比如在迁移时为了减少停机时间或者零停机,可能就需要使用异构的DG 配置。

    关于Oralce DataGuard 异构平台的搭建,MOS上有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]

     

    Prior to DataGuard 11g, the Data Guard Broker did not support different word-size in the same Data Guard configuration, thus requiring management from the SQL*Plus command line for mixed word-size Data Guard configurations.  Thisrestriction is lifted from Data Guard 11g onward.

           --在Oracle 11g 之前,DG Broker 不支持不同word-size的DG 配置,因此需要修改word-size. 到了Oracle 11g 之后,DG 就没有了这个限制。

    Changing between 32-bit and 64-bit WordSizes [ID 62290.1]

     

           这里的word-size 只的是数据库的位数,是32位还是64位。其查看方法,我之前的Blog 有说明。

     

    查看Oracle 是32位还是64位的方法

    http://www.cndba.cn/Dave/article/1130

     

     

    在配置异构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。

     

    Differencesbetween the primary server(s) and the standby server(s) are always supported aslong as the Oracle software installed on all servers is of the same OraclePlatform as defined above, is certified to run on each server, and is the sameOracle Database Release and Patch Set.  Examples of such differences that aresupported include the following:

    --只要server 上Oracle 的软件的版本和位数是一致的,主备库就支持不同的server,即OS 不影响,比如:

    (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

    In addition togeneral support when using the same Oracle platform, Data Guard Redo Apply(physical standby) can support specific mixed Oracle Platformcombinations.  Oracle Platform IDs, platform names, and which combinationsof platform ID(s) that can be combined to form a supported Data Guardconfiguration using Redo Apply are listed in the table below.  Platformcombinations not listed in the table below are not supported using Data GuardRedo Apply.

    --物理standby 支持的混合平台如下表所列,不在下表不受支持。

     

    Table Notes –表格注释

    (1)    Prior to Data Guard 11g, theData Guard Broker did not support different word-size in the same Data Guardconfiguration, thus requiring management from the SQL*Plus command line formixed word-size Data Guard configurations.  This restriction is lifted fromData Guard 11g onward.

    --在Oracle 11g之后,不受数据库word-size的限制(数据库32还是64位)

    (2)    Both primary and standbydatabases must be set at the same compatibility mode as the minimum release (ifspecified) in the table below.

    --在下表所列的平台中,主备库的compatible 参数必须相同。

    (3)    A standby database cannot beopen read-only in any environment that has binary-level PL/SQL-relatedincompatibilities between primary and standby databases.  Support Note414043.1 is referenced in the table below for any platform combinations wherethis is the case (the note provides instructions for eliminatingincompatibilities post role transition).  It is possible to access astandby database in such environments in Oracle Database 11g by temporarilyconverting it to a SnapshotStandby database, or in Oracle Database 10g by opening the standbyread/write as described in the Data Guard 10g Concepts and Administrationguide: Usinga Physical Standby Database for Read/Write Testing and Reporting. Bothprocedures require following the steps in note 414043.1 before making thedatabase available to users.

     

    (4)    Please be sure to read SupportNotes when referenced in the table below.

    (5)    RMAN generally supportsinstantiation of a physical standby database for the supported platformcombinations. Please see Support Note 1079563.1 for details.

    (6)    Platforms in a supportedcombination may operate in either the primary or standby role.

    --平台支持主备库角色的转换

    (7)    Enterprise Manager can not beused for standby database creation or other administrative functions in anyconfiguration where PLATFORM_IDs are not identical. Oracle recommends using theData Guard Broker command line interface (DGMGRL) to administer mixed platformcombinations from Oracle Database 11g onward and SQL*Plus command line forconfigurations that pre-date Oracle Database 11g. 

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

     

    对表格查看的解释,这里举一例,假设准备搭建一个物理DG:

    主库:7(platform id) Microsoft Windows IA (32-bit)

    备库:10 (platform id)  Linux IA (32-bit)

     

    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

     

    从这里可以看出,7支持的备库有7,8,12,10,11,13. 但是不同的版本也有限制。 我们的备库要用10,那么只能是Oracle 11g 以后才支持,并且还需要修复13104881的bug。

     

     

     

    Additional information: 

    Transient Logical Database Rolling Upgrades: Beginning withOracle Database 11.1.0.7, a physical standby database can be used to execute arolling database upgrade to a new Oracle Patch Set or database release by usingthe transient logical rolling database upgrade process.  See the MaximumAvailability Architecture Best Practice paper, " Rolling Database Upgrades for PhysicalStandby  Databases using Transient Logical Standby 11g".  Thedatabase rolling upgrade process enables a standby database to apply redo sentby a primary database that is operating at a previous Oracle release orpatchset.  The transient logical rolling upgrade process requires that theprimary and standby platform combination be a supported configuration for bothRedo Apply (see table above) and SQL Apply (see Support Note 1085687.1) as ofthe pre-upgrade Oracle release deployed in the Data Guard configuration.
      
    DataGuard Configurations that Include a Combination of Physical and Logical StandbyDatabases:
     A Data Guardconfiguration  includes a primary database and up to 30 standby databases.These standby databases may be a mix of physical and logical standby databases.All physical standby databases within a single Data Guard configuration mustadhere to the requirements described in this note.  Likewise, if theconfiguration includes logical standby databases, they must conform to therequirements of Support Note 1085687.1.

    Real Application Cluster &Automatic Storage Management: It isnot necessary that the primary and the standby both be Oracle RAC databases, orboth use ASM. For example, the primary database may be running Oracle RAC withor without ASM, and the standby database(s) may be single-instance, with orwithout ASM. Also, in case both the primary and standby are Oracle RACdatabases, the number of Oracle RAC nodes between the primary and standbydatabases may vary. Furthermore, the versions of ASM and CRS do not need to bethe same between the primary and standby systems.

    ExadataDatabase Machine:    It istransparent to Data Guard whether primary and/or standby databases reside on anExadata Database Machine or on other hardware, as long as the platform ID's ofprimary and standby systems within the same Data Guard configuration conform tothe support requirements defined in the above table.  If Exadata HybridColumnar Compression (EHCC)  is used, it is strongly recommended that bothprimary and standby databases reside on Exadata. See the Maximum AvailabilityArchitecture Best Practice paper, "Disaster Recovery for Exadata Database Machine".

     

    三.逻辑standby

    In addition togeneral support when using the same Oracle platform, Data Guard SQL Apply(logical standby) can support specific mixed Oracle Platform combinations as ofOracle Database 11g.  Oracle Platform IDs, platform names, and whichcombinations of platform ID(s) that can be combined to form a supported DataGuard configuration using SQL Apply are listed in the table below. Platform combinations not listed in the table below are not supported usingData Guard SQL Apply.

    --逻辑standby 支持如下的平台

     

    Table Notes – 表格注释

    (1)    All mixed platform combinationsfor SQL Apply in the table below are supported from Oracle Database 11g onward.

    (2)    Prior to Data Guard Broker 11g,the Data Guard Broker did not support different word-size in the same DataGuard configuration, thus requiring all management from the SQL*Plus commandline.  This restriction is lifted from Data Guard 11g onward. 

    (3)    Both primary and standbydatabases must be set at the same compatibility mode as the minimum release (ifspecified) in the table below. 

    (4)    Please be sure to read SupportNotes when referenced in the table below.

    (5)    RMAN generally supportsinstantiation of a physical standby database for the supported platformcombinations. Please see Support Note 1079563.1 for details.

    (6)    Platforms in a supportedcombination may operate in either the primary or standby role unless otherwisespecified.

    (7)    Enterprise Manager can not beused for standby database creation or other administrative functions in anyconfiguration where PLATFORM_IDs are not identical. Oracle recommends using theData Guard Broker command line interface (DGMGRL) to administer mixed platformcombinations from Oracle Database 11g onward and SQL*Plus command line forconfigurations that pre-date Oracle Database 11g.


      

    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)


    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

     

     

    Additional information: 

    Mixing Database Versions During Database Rolling Upgrades:Beginning with Oracle Database 10.1.0.3 and onward, a logical standby databasecan operate at a later Oracle release than on the primary when using SQL Applyto execute a rolling database upgrade. Please refer to "Rolling Database Upgrades using Data GuardSQL Apply", " Rolling Database Upgrades for PhysicalStandby  Databases using Transient Logical Standby 11g",  

    DataGuard Configurations that Include a Combination of Physical and Logical StandbyDatabases: A Data Guardconfiguration  includes a primary database and up to 30 standby databases.These standby databases may be a mix of physical and logical standby databases.All logical standby databases within a single Data Guard configuration mustadhere to the requirements described in this note.  Likewise, if theconfiguration includes physical standby databases, they must conform to therequirements of Support Note 413484.1.

    Real Application Cluster &Automatic Storage Management: It isnot necessary that the primary and the standby both be Oracle RAC databases, orboth use ASM. For example, the primary database may be running Oracle RAC withor without ASM, and the standby database(s) may be single-instance, with orwithout ASM. Also, in case both the primary and standby are Oracle RACdatabases, the number of Oracle RAC nodes between the primary and standbydatabases may vary. Furthermore, the versions of ASM and CRS do not need to bethe same between the primary and standby systems.

    Exadata Database Machine: It is transparent to Data Guardwhether primary and/or standby databases reside on Exadata Database Machine oron other hardware, as long as the platform ID's of primary and standby systemswithin the same Data Guard configuration conform to the support requirementsdefined in the above table.  If Exadata Hybrid Columnar Compression isused, it is strongly recommended that both primary and standby databases resideon Exadata storage. Note that Data Guard SQL Apply adds support for EHCC inOracle Database 11.2.0.2. See the Maximum Availability Architecture BestPractice paper, "Disaster Recovery for Exadata Database Machine".

     

     

     

     

     

     

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

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

    QQ:492913789

    Email:ahdba@qq.com

    Blog:  http://www.cndba.cn/dave

    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

    展开全文
  • Oracle 单实例DG搭建详解

    万次阅读 2017-06-06 14:50:41
    oracle DG datagrad switchover failover failover恢复

     

    OracleData Guard for Linux

     

     

     


    目录

    1、文档介绍... 1

    2 、OracleData Guard 介绍... 1

    2.1     Data Guard环境拓展... 1

    2.2     Data Guard特点... 1

    3、OracleDataGurad单实例部署... 2

    3.1安装环境... 2

    3.2主数据库配置... 2

    3.2.1 设置数据库归档... 2

    3.2.2 设置数据库闪回... 3

    3.2.3 设置数据库强制归档... 4

    3.2.4 添加STANDBY 日志文件... 5

    3.2.5 修改参数文件... 7

    3.2.6 修改监听配置文件... 8

    3.2.7 修改TNS配置文件... 8

    3.2.8 重启监听服务... 9

    3.2.9 拷贝参数文件... 9

    3.2.10 拷贝密码文件... 9

    3.3备数据库配置... 10

    3.3.1      修改参数文件... 10

    3.3.2 修改密码文件... 11

    3.3.3 创建相应的文件目录... 11

    3.3.4 修改监听配置文件... 11

    3.3.5 修改TNS配置文件... 12

    3.3.6 重启监听服务... 12

    3.3.7 启动数据库到nomount状态... 12

    3.3.8 验证监听和TNS配置... 13

    3.3.9 恢复数据库... 14

    3.3.10 开启实时同步... 18

    3.3.11 开启flashback. 19

    3.4验证DG同步... 19

    3.5DG切换与恢复... 22

    3.5.1 switchover. 22

    3.5.2 failover. 24

    3.5.2 failover恢复... 25


    1、文档介绍

        本实施方案主要对Oracle DataGuard实施部署作相应的说明。以便实施人员能根据当前业务特点,规划、建设符合高可用、高可靠的数据库集群系统。具体由Oracle DG环境拓扑、Oracle单机数据库规划部分构成!

    2 Oracle Data Guard 介绍

    2.1  Data Guard环境拓展

    2.2  Data Guard特点                          

    数据库服务器采用DATAGUARD灾备模式,可以满足对可用性有特殊需求的应

    用,具备以下特点:

    1、  需要冗余的服务器设备。该模式需要有冗余的服务器硬件。硬件成本较高。

    2、  需要冗余的存储设备。主机和备机都需要同样的存储空间,成本较高。

    3、  安装配置比较复杂。该模式比单节点、单实例的模式配置复杂一些,需要

        更多的配置步骤。

    4、  管理维护成本高。该模式对维护人员的要求较高,维护成本高。

    5、  具备一定的容灾特性。当主机整个数据库系统不可用并短期内无法恢复

        时,可以把数据库系统切换到备机上,具备容灾的功能。

    6、  备机可以用作只读查询。备机可以切换到只读状态供报表之类的查询操

        作,减轻主机的压力。

    3Oracle DataGurad单实例部署

    3.1安装环境

    在主机1上安装数据库软件,并建监听和实例,在主机2上安装数据库软件,并建监听,但不建实例。

     

    主机1(主库)

    主机2(备库)

    操作系统

    Centos6.5 64

    Centos6.5 64

    主机名

    cebpm

    cebpms

    IP

    192.168.1.141

    192.168.1.143

    数据库软件版本

    oracle 11.2.0.4

    oracle 11.2.0.4

    ORACLE_BASE

    /u01/app/oracle

    /u01/app/oracle

    ORACLE_HOME

    /u01/app/oracle/product/11.2.0/db_1

    /u01/app/oracle/product/11.2.0/db_1

    ORACLE_SID

    cebpm

     

    闪回区

    开启

     

    归档

    开启

     

     

    3.2主数据库配置

    3.2.1 设置数据库归档

    查看数据库是否运行在归档模式:

    SQL> archive log list;

    Database log mode         No Archive Mode

    Automatic archival       Disabled     #未开启归档

    Archive destination      USE_DB_RECOVERY_FILE_DEST

    Oldest online log sequence     117

    Current log sequence          119

    SQL> 

    备注:如果数据库已经开启归档,下面的操纵可以忽略。

    如上所示未开启归档,可按下面方法开启数据库归档

    SQL> shutdownimmediate    #关闭数据库

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

    SQL> startupmount;    #启动到mount状态

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    SQL> alterdatabase archivelog;    #开启归档

     

    Database altered.

     

    SQL> alterdatabase open;   #open数据库

     

    Database altered.

     

    SQL> altersystem set  log_archive_dest_1='location=/data/CEBPM/archivelog';  #设置归档路径

     

    System altered.

     

    SQL> archive log list;

    Database log mode         Archive Mode

    Automatic archival       Enabled

    Archive destination       /data/CEBPM/archivelog

    Oldest online log sequence     119

    Next log sequence to archive   121

    Current log sequence          121

    SQL>

    3.2.2 设置数据库闪回

    验证是否开启闪回

    SQL> select flashback_on fromv$database;

     

    FLASHBACK_ON

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

    NO

     

    SQL>

     

    备注:如果数据库已经开启flashback,那么下面步骤可忽略。

    如上显示,该数据库未开启flashback,可按下面方法开启。

    SQL> altersystem set db_recovery_file_dest='/data/CEBPM';   #设置闪回去路径

     

    System altered.

     

    SQL> altersystem set db_recovery_file_dest_size='5G';  #设置闪回区大小

     

    System altered.

     

    SQL> shutdownimmediate;  #关闭数据库

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

    SQL> startup mount

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    SQL> alterdatabase flashback on;    #开启闪回

     

    Database altered.

     

    SQL> alterdatabase open;   #open数据库

     

    Database altered.

     

    SQL> selectflashback_on from v$database;   #验证是否开启

     

    FLASHBACK_ON

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

    YES

     

    SQL>

    3.2.3 设置数据库强制归档

    验证是否开启focelogging

    SQL>select force_logging from v$database;

     

    FOR

    ---

    NO

    如果数据库已经开启force logging,那么下面步骤可忽略。

    如上可以看出数据库未开启,则按下面步骤执行:

    SQL>alter database force logging;  #开启force logging

     

    Databasealtered.

     

    SQL>select force_logging fromv$database;  #验证

     

    FOR

    ---

    YES

     

    SQL>

     

    3.2.4 添加STANDBY 日志文件

    在备库,当RFS进程接受到日志后,就将其写入Standby日志文件里,备库的Standby日志文件可以看做是主库在线日志文件的一个镜像,当主库做日志切换时,备库的Standby日志也做相应的切换,切换后的Standby日志由备库的ARCH进程归档。

    Oracle规定备库的Standby日志文件大小不能小于主库在线日志文件最大的一个,一般情况下,为了管理方便,最好把所有的在线日志和Standby日志大小设为一样。

    通过下面语句可以查询主库在线日志的大小和组数:

    SQL> select group#,bytes/1024/1024from v$log;

     

       GROUP# BYTES/1024/1024

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

         1      50

         2      50

         3      50

     

    SQL>

    通过下面的语句可以查询备库Standby日志的大小和组数:

    SQL> selectgroup#,bytes/1024/1024 from v$standby_log;

     

    no rows selected

    创建standby logfile

    SQL> alter databaseadd standby logfile group 11 '/data/CEBPM/onlinelog/redo11_stb01.log' size 50M;

     

    Database altered.

     

    SQL> alterdatabase add standby logfile group 12 '/data/CEBPM/onlinelog/redo12_stb01.log'size 50M;

     

    Database altered.

     

    SQL> alterdatabase add standby logfile group 13 '/data/CEBPM/onlinelog/redo13_stb01.log'size 50M;

     

    Database altered.

     

    SQL> alterdatabase add standby logfile group 14 '/data/CEBPM/onlinelog/redo14_stb01.log'size 50M;

     

    Database altered.

     

    SQL> selectgroup#,bytes/1024/1024 from v$standby_log;

     

       GROUP# BYTES/1024/1024

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

        11      50

        12      50

        13      50

        14      50

     

    SQL>

    3.2.5 修改参数文件

    SQL> altersystem set log_archive_config='DG_CONFIG=(cebpm,cebpms)';

     

    System altered.

     

    SQL> altersystem set log_archive_dest_2='SERVICE=cebpmsVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=cebpms' scope=spfile;

     

    System altered.

    SQL> altersystem set log_archive_dest_state_1='enable';

     

    System altered.

     

    SQL> altersystem set log_archive_dest_state_2='enable';

     

    System altered.

     

    SQL> altersystem set db_file_name_convert='/data/CEBPMS/datafile','/data/CEBPM/datafile'scope=spfile;

     

    System altered.

     

    SQL> altersystem setlog_file_name_convert='/data/CEBPMS/onlinelog','/data/CEBPM/onlinelog'scope=spfile;

     

    System altered.

     

    SQL> altersystem set fal_server='cebpms';

     

    System altered.

     

    SQL> altersystem set fal_client='cebpm';

     

    System altered.

    SQL> altersystem set standby_file_management='AUTO';

     

    System altered.

     

    注意:上面修改的参数有的需要重启数据库才能生效,下面为重启数据库步骤

    SQL> shutdown immediate

    Databaseclosed.

    Databasedismounted.

    ORACLEinstance shut down.

    SQL> startup

    ORACLEinstance started.

     

    TotalSystem Global Area  688959488 bytes

    Fixed Size         2256432 bytes

    VariableSize       566231504 bytes

    DatabaseBuffers    117440512 bytes

    RedoBuffers           3031040 bytes

    Databasemounted.

    Databaseopened.

    SQL>

     

    3.2.6 修改监听配置文件

    cebpm:/home/oracle@cebpm>vi/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

     

    LISTENER =

     (DESCRIPTION_LIST =

       (DESCRIPTION =

         (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.141)(PORT = 1521))

        )

      )

     

    ADR_BASE_LISTENER = /u01/app/oracle

     

    注意:如果主库上的监听之前已经配置过,这里可以忽略该步骤。

    ~                                                                                                                             

    ~                                          

    3.2.7 修改TNS配置文件

    cebpm:/home/oracle@cebpm>vi/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

     

    cebpm =

     (DESCRIPTION =

       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.141)(PORT = 1521))

       (CONNECT_DATA =

         (SERVER = DEDICATED)

         (SERVICE_NAME = cebpm)

        )

      )

     

    cebpms =

     (DESCRIPTION =

       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.143)(PORT = 1521))

       (CONNECT_DATA =

         (SERVER = DEDICATED)

         (SERVICE_NAME = cebpms)

        )

      )

     

    3.2.8 重启监听服务

    cebpm:/home/oracle@cebpm>lsnrctl stop

    cebpm:/home/oracle@cebpm>lsnrctl start

    3.2.9 拷贝参数文件

    利用spfile创建pfile

    SQL> create pfile='/tmp/initcebpms' fromspfile;

     

    File created.

    pfile拷贝到备库

    cebpm:/home/oracle@cebpm>scp /tmp/initcebpms.ora192.168.1.143:/u01/app/oracle/product/11.2.0/db_1/dbs

    oracle@192.168.1.143's password:

    initcebpms.ora                                                                              100% 1397     1.4KB/s   00:00   

    cebpm:/home/oracle@cebpm>

    3.2.10 拷贝密码文件

    cebpm:/u01/app/oracle/product/11.2.0/db_1/dbs@cebpm>pwd

    /u01/app/oracle/product/11.2.0/db_1/dbs

    cebpm:/u01/app/oracle/product/11.2.0/db_1/dbs@cebpm>scp orapwcebpm 192.168.1.143:/u01/app/oracle/product/11.2.0/db_1/dbs

    oracle@192.168.1.143's password:

    orapwcebpm                                                                                  100% 1536     1.5KB/s   00:00   

    cebpm:/u01/app/oracle/product/11.2.0/db_1/dbs@cebpm>

     

    3.3备数据库配置

    3.3.1  修改参数文件

    修改之前从主库拷贝过来的那个参数文件,具体如下:

    cebpms:/u01/app/oracle/product/11.2.0/db_1/dbs@cebpms>vi initcebpms.ora

    如下所示:

    *.audit_file_dest='/u01/app/oracle/admin/cebpms/adump'

    *.audit_trail='db'

    *.compatible='11.2.0.4.0'

    *.control_files='/data/CEBPMS/controlfile/o1_mf_dm1flhj3_.ctl'

    *.db_block_size=8192

    *.db_create_file_dest='/data'

    *.db_domain=''

    *.db_file_name_convert='/data/CEBPM/datafile','/data/CEBPMS/datafile'

    *.db_name='cebpm'

    *.db_recovery_file_dest='/data/CEBPMS'

    *.db_recovery_file_dest_size=5368709120

    *.db_unique_name='cebpms'

    *.diagnostic_dest='/u01/app/oracle'

    *.dispatchers='(PROTOCOL=TCP) (SERVICE=cebpmsXDB)'

    *.fal_client='cebpms'

    *.fal_server='cebpm'

    *.log_archive_config='DG_CONFIG=(cebpms,cebpm)'

    *.log_archive_dest_1='location=/data/CEBPMS/archivelog'

    *.log_archive_dest_2='SERVICE=cebpm VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=cebpm'

    *.log_archive_dest_state_1='enable'

    *.log_archive_dest_state_2='enable'

    *.log_archive_format='%t_%s_%r.arc'

    *.log_file_name_convert='/data/CEBPM/onlinelog','/data/CEBPMS/onlinelog'

    *.memory_target=691011584

    *.open_cursors=300

    *.processes=200

    *.remote_login_passwordfile='EXCLUSIVE'

    *.sessions=1000

    *.standby_file_management='AUTO'

    *.undo_tablespace='UNDOTBS1'

    注意:尤其注意红色标注的地方

    3.3.2 修改密码文件

    修改之前从主库拷贝过来的密码文件,具体如下:

    cebpms:/u01/app/oracle/product/11.2.0/db_1/dbs@cebpms>mv orapwcebpm orapwcebpms

    3.3.3 创建相应的文件目录

    根据上面修改的参数文件,为备库创建相应的文件目录

    cebpms:/home/oracle@cebpms>mkdir -p /u01/app/oracle/admin/cebpms/adump

    cebpms:/home/oracle@cebpms>mkdir -p /data/CEBPMS/controlfile

    cebpms:/home/oracle@cebpms>mkdir -p /data/CEBPMS/datafile

    cebpms:/home/oracle@cebpms>mkdir -p /data/CEBPMS

    cebpms:/home/oracle@cebpms>mkdir -p /data/CEBPMS/archivelog

    cebpms:/home/oracle@cebpms>mkdir -p /data/CEBPMS/onlinelog

    3.3.4 修改监听配置文件

    cebpms:/u01/app/oracle/product/11.2.0/db_1/network/admin@cebpms>vi listener.ora

    具体如下:

    LISTENER =

     (DESCRIPTION_LIST =

       (DESCRIPTION =

         (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.143)(PORT = 1521))

        )

      )

     

    SID_LIST_LISTENER =

     (SID_LIST =

       (SID_DESC =

         (GLOBAL_DBNAME = cebpms)

         (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

         (SID_NAME = cebpms)

        )

       )

     

     

    ADR_BASE_LISTENER = /u01/app/oracle

     

    3.3.5 修改TNS配置文件

    cebpms:/u01/app/oracle/product/11.2.0/db_1/network/admin@cebpms>vi tnsnames.ora

    具体如下:

    cebpm =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.141)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = cebpm)

        )

      )

     

    cebpms =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.143)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = cebpms)

        )

      )                                   

    3.3.6 重启监听服务

    cebpms:/data/CEBPMS@cebpms>lsnrctl stop

    cebpms:/data/CEBPMS@cebpms>lsnrctl start

    3.3.7 启动数据库到nomount状态

    SQL> startupnomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initcebpms.ora';

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    SQL> createspfile from pfile;   #创建spfile

     

    File created.

     

    SQL>

    3.3.8 验证监听和TNS配置

    主库上验证:

    cebpm:/home/oracle@cebpm>sqlplus sys/oracle@cebpm as sysdba

     

    SQL*Plus: Release 11.2.0.4.0 Production onTue Jun 6 10:34:42 2017

     

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

     

     

    Connected to:

    Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

     

    SQL> exit

    Disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

    cebpm:/home/oracle@cebpm>sqlplus sys/oracle@cebpms as sysdba

     

    SQL*Plus: Release 11.2.0.4.0 Production onTue Jun 6 10:34:50 2017

     

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

     

     

    Connected to:

    Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

     

    SQL>

    备库上验证:

    cebpms:/home/oracle@cebpms>sqlplus sys/oracle@cebpm as sysdba

     

    SQL*Plus: Release 11.2.0.4.0 Production onTue Jun 6 11:05:01 2017

     

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

     

     

    Connected to:

    Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

     

    SQL> exit

    Disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

    cebpms:/home/oracle@cebpms>sqlplus sys/oracle@cebpms as sysdba

     

    SQL*Plus: Release 11.2.0.4.0 Production onTue Jun 6 11:05:05 2017

     

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

     

     

    Connected to:

    Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production

    With the Partitioning, OLAP, Data Miningand Real Application Testing options

     

    SQL>

     

    注意:该步骤一定要在主备库上都能通过才能执行下面步骤

    3.3.9 恢复数据库

    cebpms:/home/oracle@cebpms>rman target sys/oracle@cebpm auxiliary sys/oracle@cebpms

     

    Recovery Manager: Release 11.2.0.4.0 -Production on Tue Jun 6 11:13:43 2017

     

    Copyright (c) 1982, 2011, Oracle and/or itsaffiliates.  All rights reserved.

     

    connected to target database: CEBPM(DBID=3677012495)

    connected to auxiliary database: CEBPM (notmounted)

     

    RMAN> duplicatetarget database for standby from active database;

     

    具体执行过程显示如下:

     

    Starting Duplicate Db at 2017/06/06 11:14:26

    using target database control file insteadof recovery catalog

    allocated channel: ORA_AUX_DISK_1

    channel ORA_AUX_DISK_1: SID=19 devicetype=DISK

     

    contents of Memory Script:

    {

      backup as copy reuse

      targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwcebpm' auxiliary format

     '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwcebpms'   ;

    }

    executing Memory Script

     

    Starting backup at 2017/06/06 11:14:29

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID=43 device type=DISK

    Finished backup at 2017/06/06 11:14:31

     

    contents of Memory Script:

    {

      backup as copy current controlfile for standby auxiliary format '/data/CEBPMS/controlfile/o1_mf_dm1flhj3_.ctl';

      sql clone "create spfile from memory";

      shutdown clone immediate;

      startup clone nomount;

      sql clone "alter system set control_files =

     ''/data/CEBPMS/controlfile/o1_mf_dm1flhj3_.ctl'' comment=

     ''Set by RMAN'' scope=spfile";

      shutdown clone immediate;

      startup clone nomount;

    }

    executing Memory Script

     

    Starting backup at 2017/06/06 11:14:32

    using channel ORA_DISK_1

    channel ORA_DISK_1: starting datafile copy

    copying standby control file

    output filename=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_cebpm.ftag=TAG20170606T105032 RECID=5 STAMP=945946234

    channel ORA_DISK_1: datafile copy complete,elapsed time: 00:00:03

    Finished backup at 2017/06/06 11:14:36

     

    sql statement: create spfile from memory

     

    Oracle instance shut down

     

    connected to auxiliary database (notstarted)

    Oracle instance started

     

    Total System Global Area     688959488 bytes

     

    Fixed Size                     2256432 bytes

    Variable Size                566231504 bytes

    Database Buffers             117440512 bytes

    Redo Buffers                   3031040 bytes

     

    sql statement: alter system set  control_files =   ''/data/CEBPMS/controlfile/o1_mf_dm1flhj3_.ctl''comment= ''Set by RMAN'' scope=spfile

     

    Oracle instance shut down

     

    connected to auxiliary database (notstarted)

    Oracle instance started

     

    Total System Global Area     688959488 bytes

     

    Fixed Size                     2256432 bytes

    Variable Size                566231504 bytes

    Database Buffers             117440512 bytes

    Redo Buffers                   3031040 bytes

     

    contents of Memory Script:

    {

      sql clone 'alter database mount standby database';

    }

    executing Memory Script

     

    sql statement: alter database mount standbydatabase

     

    contents of Memory Script:

    {

      set newname for tempfile  1 to

     "/data/CEBPMS/datafile/o1_mf_temp_dm1fp4bs_.tmp";

      switch clone tempfile all;

      set newname for datafile  1 to

     "/data/CEBPMS/datafile/o1_mf_system_dm1flxkw_.dbf";

      set newname for datafile  2 to

     "/data/CEBPMS/datafile/o1_mf_sysaux_dm1fnw5v_.dbf";

      set newname for datafile  3 to

     "/data/CEBPMS/datafile/o1_mf_undotbs1_dm1foow9_.dbf";

      set newname for datafile  4 to

     "/data/CEBPMS/datafile/o1_mf_users_dm1fqcrp_.dbf";

      backup as copy reuse

      datafile  1 auxiliary format

     "/data/CEBPMS/datafile/o1_mf_system_dm1flxkw_.dbf"   datafile

     2auxiliary format

     "/data/CEBPMS/datafile/o1_mf_sysaux_dm1fnw5v_.dbf"  datafile

     3auxiliary format

     "/data/CEBPMS/datafile/o1_mf_undotbs1_dm1foow9_.dbf"   datafile

     4auxiliary format

     "/data/CEBPMS/datafile/o1_mf_users_dm1fqcrp_.dbf"   ;

      sql 'alter system archive log current';

    }

    executing Memory Script

     

    executing command: SET NEWNAME

     

    renamed tempfile 1 to/data/CEBPMS/datafile/o1_mf_temp_dm1fp4bs_.tmp in control file

     

    executing command: SET NEWNAME

     

    executing command: SET NEWNAME

     

    executing command: SET NEWNAME

     

    executing command: SET NEWNAME

     

    Starting backup at 2017/06/06 11:15:06

    using channel ORA_DISK_1

    channel ORA_DISK_1: starting datafile copy

    input datafile file number=00001name=/data/CEBPM/datafile/o1_mf_system_dm1flxkw_.dbf

    output filename=/data/CEBPMS/datafile/o1_mf_system_dm1flxkw_.dbf tag=TAG20170606T105107

    channel ORA_DISK_1: datafile copy complete,elapsed time: 00:01:15

    channel ORA_DISK_1: starting datafile copy

    input datafile file number=00002name=/data/CEBPM/datafile/o1_mf_sysaux_dm1fnw5v_.dbf

    output filename=/data/CEBPMS/datafile/o1_mf_sysaux_dm1fnw5v_.dbf tag=TAG20170606T105107

    channel ORA_DISK_1: datafile copy complete,elapsed time: 00:01:05

    channel ORA_DISK_1: starting datafile copy

    input datafile file number=00003name=/data/CEBPM/datafile/o1_mf_undotbs1_dm1foow9_.dbf

    output file name=/data/CEBPMS/datafile/o1_mf_undotbs1_dm1foow9_.dbftag=TAG20170606T105107

    channel ORA_DISK_1: datafile copy complete,elapsed time: 00:00:35

    channel ORA_DISK_1: starting datafile copy

    input datafile file number=00004name=/data/CEBPM/datafile/o1_mf_users_dm1fqcrp_.dbf

    output filename=/data/CEBPMS/datafile/o1_mf_users_dm1fqcrp_.dbf tag=TAG20170606T105107

    channel ORA_DISK_1: datafile copy complete,elapsed time: 00:00:03

    Finished backup at 2017/06/06 11:18:07

     

    sql statement: alter system archive logcurrent

     

    contents of Memory Script:

    {

      switch clone datafile all;

    }

    executing Memory Script

     

    datafile 1 switched to datafile copy

    input datafile copy RECID=5 STAMP=945947890file name=/data/CEBPMS/datafile/o1_mf_system_dm1flxkw_.dbf

    datafile 2 switched to datafile copy

    input datafile copy RECID=6 STAMP=945947890file name=/data/CEBPMS/datafile/o1_mf_sysaux_dm1fnw5v_.dbf

    datafile 3 switched to datafile copy

    input datafile copy RECID=7 STAMP=945947890file name=/data/CEBPMS/datafile/o1_mf_undotbs1_dm1foow9_.dbf

    datafile 4 switched to datafile copy

    input datafile copy RECID=8 STAMP=945947890file name=/data/CEBPMS/datafile/o1_mf_users_dm1fqcrp_.dbf

    Finished Duplicate Db at2017/06/06 11:18:25

     

    RMAN>

    3.3.10 开启实时同步

    SQL> alterdatabase open;

     

    Database altered.

     

    SQL> alter databaserecover managed standby database using current logfile disconnect from session;

     

    Database altered.

     

    SQL>

    3.3.11 开启flashback

    上面DataGuard搭建好之后,千万不要忘了把备库的flashback打开,具体如下:

     

    SQL> alterdatabase recover managed standby database cancel;  #取消实时同步

     

    Database altered.

     

    SQL> shutdownimmediate  #关闭数据库

    Database closed.

    Database dismounted.

    ORACLE instance shut down.

    SQL> startupmount   #打开到mount状态

    ORA-32004: obsolete or deprecatedparameter(s) specified for RDBMS instance

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    SQL> alterdatabase flashback on;  #开始flashback

     

    Database altered.

     

    SQL> alterdatabase open;   #open数据库

     

    Database altered.

     

    SQL> alterdatabase recover managed standby database using current logfile disconnect fromsession;    #开启实时同步

     

    Database altered.

    3.4验证DG同步

    上面已经把DataGurad搭建完,下面介绍如何验证DataGuard是否能实时同步

    1.  通过查看archive_log_dest_2列是否有error报错,如果有报错,则需要先根据报错内容解决问题

    SQL>col dest_name format a30

    SQL>col error format a20

     

    SQL>select dest_name,error from v$archive_dest;

     

    DEST_NAME             ERROR

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

    LOG_ARCHIVE_DEST_1

    LOG_ARCHIVE_DEST_2

    LOG_ARCHIVE_DEST_3

    LOG_ARCHIVE_DEST_4

    LOG_ARCHIVE_DEST_5

    LOG_ARCHIVE_DEST_6

    LOG_ARCHIVE_DEST_7

    LOG_ARCHIVE_DEST_8

    LOG_ARCHIVE_DEST_9

    LOG_ARCHIVE_DEST_10

    LOG_ARCHIVE_DEST_11

     

    DEST_NAME             ERROR

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

    LOG_ARCHIVE_DEST_12

    LOG_ARCHIVE_DEST_13

    LOG_ARCHIVE_DEST_14

    LOG_ARCHIVE_DEST_15

    LOG_ARCHIVE_DEST_16

    LOG_ARCHIVE_DEST_17

    LOG_ARCHIVE_DEST_18

    LOG_ARCHIVE_DEST_19

    LOG_ARCHIVE_DEST_20

    LOG_ARCHIVE_DEST_21

    LOG_ARCHIVE_DEST_22

     

    DEST_NAME             ERROR

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

    LOG_ARCHIVE_DEST_23

    LOG_ARCHIVE_DEST_24

    LOG_ARCHIVE_DEST_25

    LOG_ARCHIVE_DEST_26

    LOG_ARCHIVE_DEST_27

    LOG_ARCHIVE_DEST_28

    LOG_ARCHIVE_DEST_29

    LOG_ARCHIVE_DEST_30

    LOG_ARCHIVE_DEST_31

     

    31rows selected.

     

    SQL>

    注意:上面显示没有报错

    2.  查询主库最大归档序号,一致即归档同步成功。

    主库上执行:

    SQL>select max(sequence#) from v$archived_log;

     

    MAX(SEQUENCE#)

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

           132

    备库上操作:

    SQL>select max(sequence#) from v$archived_log;

     

    MAX(SEQUENCE#)

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

           132

     

    主库上执行日志切换

    SQL>alter system archive log current;

     

    Systemaltered.

     

    SQL>select max(sequence#) from v$archived_log;

     

    MAX(SEQUENCE#)

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

           133

     

    SQL>

    备库上再次验证:

    SQL>select max(sequence#) from v$archived_log;

     

    MAX(SEQUENCE#)

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

           133

     

    SQL>

     

    3.  查看主备库状态

    主库上执行:

    SQL>select switchover_status,database_role from v$database;

     

    SWITCHOVER_STATUS    DATABASE_ROLE

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

    TOSTANDBY       PRIMARY

     

    备库上执行:

    SQL>select switchover_status,database_role from v$database;

     

    SWITCHOVER_STATUS    DATABASE_ROLE

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

    NOTALLOWED     PHYSICAL STANDBY

    4.  可以创建一个table进行测试

    主库上操作:

    SQL>create table dg(id number);

     

    Tablecreated.

    SQL>insert into dg values(1);

     

    1row created.

     

    SQL>commit;

     

    Commitcomplete.

     

    SQL>select * from dg;

     

        ID

    ----------

         1

    备库上操作:

    SQL>select * from dg;

     

        ID

    ----------

         1

     

    SQL>

    上面说明DG是同步的。

    3.5DG切换与恢复

    我们配置DG的目的就是为了在主库出现故障时,备库能够提供服务,保证业务的正常运行。DG的故障切换分为switchoverfailover两种:

    3.5.1 switchover

    switchover是用户有计划的进行停机切换,能够保证不丢失数据,下面我们来看下switchover是怎样操作的:

    主库上操作:

    SQL> selectswitchover_status,database_role from v$database; 

    SWITCHOVER_STATUS    DATABASE_ROLE

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

    TO STANDBY      PRIMARY

     

    SQL>

    注意:上面查询结果为TO STANDBY SESSIONS ACTIVE表明可以进行切换

     

    SQL> alter database commit to switchover to physical standby;

     

    Databasealtered.

    SQL> startupmount

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    SQL> selectdatabase_role from v$database;

     

    DATABASE_ROLE

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

    PHYSICAL STANDBY

     

    备库上操作:

    SQL> select switchover_status,database_role from v$database;

     

    SWITCHOVER_STATUS    DATABASE_ROLE

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

    TO PRIMARY       PHYSICAL STANDBY

     

    SQL>

    注意:上面查询结果显示为TO PRIMARY SESSIONS ACTIVE表明可以切换成主库;

    现在可以把备库切换成主库:

    SQL> alterdatabase commit to switchover to primary with session shutdown;

     

    Database altered.

     

    SQL> alter database open;

     

    Database altered.

     

    SQL> selectswitchover_status,database_role,open_mode from v$database;

     

    SWITCHOVER_STATUS    DATABASE_ROLE    OPEN_MODE

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

    SESSIONS ACTIVE      PRIMARY         READ WRITE

     

    记住:这时候需要在现在的备库(原先的主库)开启实时同步

     

    SQL> alterdatabase open;

     

    Database altered.

     

    SQL> alterdatabase recover managed standby database using current logfile disconnect fromsession;

     

    Database altered.

     

    到此DG switover切换完成,验证方法同上。

    3.5.2 failover

    failover是当主库真正出现严重系统故障,如数据库宕机,软硬件故障导致主库不能支持服务,从而进行的切换动作。

    注意:为了能够在failover后能够恢复DG,需要在主库上开启flashback,如果不开启flashback的话,DG就可能需要重新搭建

    由于主库已经不可访问,下面所有的操作都在备库完成:

    SQL> alterdatabase recover managed standby database cancel;   #停止实时同步

     

    Database altered.

     

    SQL> alter databaserecover managed standby database finish force;

     

    Database altered.

     

    SQL> selectdatabase_role from v$database;

     

    DATABASE_ROLE

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

    PHYSICAL STANDBY

     

    SQL> alterdatabase commit to switchover to primary;

     

    Database altered.

     

    SQL> alter database open;

     

    Database altered.

     

    SQL> selectswitchover_status,database_role,open_mode from v$database;

     

    SWITCHOVER_STATUS    DATABASE_ROLE    OPEN_MODE

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

    RESOLVABLE GAP       PRIMARY         READ WRITE

    至此failover操作完成,原来的备库已经切换为主库,可以给业务提供服务了。

    3.5.2 failover恢复

    上面提到了failover,这种情形是当主库真正出现异常之后,才会执行的操作,那么我们执行过failover 之后,如何在重新构建DG,这里我们利用flashback database来重构,具体方法如下:

    在新的主库上执行:

    SQL> selectto_char(standby_became_primary_scn) from v$database;

     

    TO_CHAR(STANDBY_BECAME_PRIMARY_SCN)

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

    977458

     

    SQL>

    在之前的主库上,也就是现在的备库上执行下面的操作:

    SQL> startupmount

    ORA-32004: obsolete or deprecatedparameter(s) specified for RDBMS instance

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    SQL> flashbackdatabase to scn 977458; #这个值为在新主库上查询到的SCN

     

    Flashback complete.

     

    SQL> alterdatabase convert to physical standby;

     

    Database altered.

    SQL> shutdownimmediate

    ORA-01507: database not mounted

     

     

    ORACLE instance shut down.

    SQL> startup

    ORA-32004: obsolete or deprecatedparameter(s) specified for RDBMS instance

    ORACLE instance started.

     

    Total System Global Area  688959488 bytes

    Fixed Size          2256432 bytes

    Variable Size        566231504 bytes

    Database Buffers     117440512 bytes

    Redo Buffers           3031040 bytes

    Database mounted.

    Database opened.

    SQL> alterdatabase recover managed standby database using current logfile disconnect fromsession;

     

    Database altered.

     

    SQL>

    到此failover 恢复已经完成,关于如何验证DG方法如上,这里不在介绍。

     

     

    展开全文
  • linux下oracle11G DG搭建(三):围绕备库搭建操作 环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本 RedHat Enterprise5.5、Oracle 11g 11.2.0.1 ...

    linux下oracle11G DG搭建(三):围绕备库搭建操作


    环境

    名称

    主库

    备库

    主机名

    bjsrv

    shsrv

    软件版本

    RedHat Enterprise5.5、Oracle 11g 11.2.0.1

    RedHat Enterprise5.5、Oracle 11g 11.2.0.1



    三、围绕备库操作:

    1、备库-修改初始化参数文件

    $cd$ORACLE_HOME/dbs

    $df -h




    $vi initshdb.ora

    修改简要说明:

    *.audit_file_dest='/u01/app/oracle/admin/sh/adump'

    //审计文件存放的路径

    *.audit_trail='db'

    *.compatible='11.2.0.0.0'

    *.control_files='/u01/app/oracle/oradata/sh/sh_control01.ctl'

    *.db_block_size=8192

    *.db_name='TestDB12'

    *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

    *.db_recovery_file_dest_size=4322230272

    *.diagnostic_dest='/u01/app/oracle'

    *.dispatchers='(PROTOCOL=TCP) (SERVICE=TestDB12XDB)'//用于共享,删除

    *.log_archive_format='arch_%t_%s_%r.log'

    *.memory_target=642006528

    *.open_cursors=300

    *.processes=150

    *.remote_login_passwordfile='EXCLUSIVE'

    *.undo_tablespace='UNDOTBS1'

     

    DB_UNIQUE_NAME=shdb

    LOG_ARCHIVE_CONFIG='DG_CONFIG=(bjdb,shdb)'

     

    LOG_ARCHIVE_DEST_1=

     'LOCATION=/dsk4/arch_sh

     VALID_FOR=(ALL_LOGFILES,ALL_ROLES)

     DB_UNIQUE_NAME=shdb'

     

    LOG_ARCHIVE_DEST_2=

     'SERVICE=bjdbASYNC             //应该是对方

     VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)

     DB_UNIQUE_NAME=bjdb'

     

    LOG_ARCHIVE_DEST_STATE_1=ENABLE

    LOG_ARCHIVE_DEST_STATE_2=ENABLE

     

    LOG_ARCHIVE_MAX_PROCESSES=3

     

    FAL_SERVER=bjdb

    DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/TestDB12','/u01/app/oracle/oradata/sh'                              //先对方,后自己

    LOG_FILE_NAME_CONVERT=

     '/dsk1/oradata/bj','/dsk1/oradata/sh','/dsk2/oradata/bj','/dsk2/oradata/sh'

    STANDBY_FILE_MANAGEMENT=AUTO          //先对方,后自己

     

    参考样例:

    *.audit_file_dest='/u01/app/oracle/admin/sh/adump'

    *.audit_trail='db'

    *.compatible='11.2.0.0.0'

    *.control_files='/u01/app/oracle/oradata/sh/sh_control01.ctl'

    *.db_block_size=8192

    *.db_name='TestDB12'

    *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

    *.db_recovery_file_dest_size=4322230272

    *.diagnostic_dest='/u01/app/oracle'

    *.log_archive_format='arch_%t_%s_%r.log'

    *.memory_target=642006528

    *.open_cursors=300

    *.processes=150

    *.remote_login_passwordfile='EXCLUSIVE'

    *.undo_tablespace='UNDOTBS1'

     

    DB_UNIQUE_NAME=shdb

    LOG_ARCHIVE_CONFIG='DG_CONFIG=(bjdb,shdb)'

     

    LOG_ARCHIVE_DEST_1=

     'LOCATION=/dsk4/arch_sh

     VALID_FOR=(ALL_LOGFILES,ALL_ROLES)

     DB_UNIQUE_NAME=shdb'

     

    LOG_ARCHIVE_DEST_2=

     'SERVICE=bjdbASYNC            

     VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)

     DB_UNIQUE_NAME=bjdb'

     

    LOG_ARCHIVE_DEST_STATE_1=ENABLE

    LOG_ARCHIVE_DEST_STATE_2=ENABLE

     

    LOG_ARCHIVE_MAX_PROCESSES=3

     

    FAL_SERVER=bjdb

    DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/TestDB12','/u01/app/oracle/oradata/sh'                               

    LOG_FILE_NAME_CONVERT=

     '/dsk1/oradata/bj','/dsk1/oradata/sh','/dsk2/oradata/bj','/dsk2/oradata/sh'

    STANDBY_FILE_MANAGEMENT=AUTO         

    2、主库-启备库前主库备份

    备库启动之前,给主库做一个备份。

    注意:DG下,养成在启动备库前为主库做备份的习惯。以供应对启动备库后产生的未知情况。

    主库处于mount状态下:

    SQL>selectstatus from v$instance;




    $mkdir/dsk4/backup

    $rmantarget /




    RMAN> backupdatabase format '/dsk4/backup/%d_%s.bak';




    3、主库、备库-网络配置

    主库下:

    $ lsnrctlstart         //启动监听

    $cd/u01/app/oracle/product/11.2.0/dbhome_1/network/admin

    $ vilistener.ora

    # listener.oraNetwork Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

    # Generated byOracle configuration tools.

     

    LISTENER =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.6.71)(PORT = 1521))

      )

     

    ADR_BASE_LISTENER =/u01/app/oracle

    $vi tnsnames.ora //手工创建tnsnames文件

    # tnsnames.oraNetwork Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

    # Generated byOracle configuration tools.

     

    bjdb =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.71)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME =bjdb)

        )

      )

     

    shdb =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.72)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = shdb)

        )

      )

    备库下:

    $ lsnrctlstart        //启动监听

    $cd/u01/app/oracle/product/11.2.0/dbhome_1/network/admin

    $ vilistener.ora      //编辑监听

    # listener.oraNetwork Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

    # Generated byOracle configuration tools.

     

    LISTENER =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.6.72)(PORT = 1521))

      )

     

    ADR_BASE_LISTENER =/u01/app/oracle

     

    $vi tnsnames.ora    //手工创建tnsnames文件

    BJDB =

      (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.71)(PORT = 1521))

        )

    (CONNECT_DATA = (SERVER = DEDICATED)

          (SERVICE_NAME = bjdb)

        )

      )

     SHDB =

      (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.4.72)(PORT = 1521))

        )

    (CONNECT_DATA = (SERVER = DEDICATED)

          (SERVICE_NAME = shdb)

        )

      )

    4、备库-网络测试:

    $sqlplussys/oracle@bjdb as sysdba




    【补充】:oracle密码修改

    若oracle密码未知,可以如下修改oracle密码:

    $cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs

    $orapwd file=orapwTestDB12 password=oracle entries=3 force=y

    $scp orapwTestDB12 shsrv:$ORACLE_HOME/dbs/orapwshdb

    //把主库修改完的密码文件拷贝到备库中




    SQL>showparameter name




    主库监听状态:

    $lsnrctlstatus




    备库监听状态:

    $lsnrctlstatus




    测试主库能否ping通备库

    $ tnsping shdb




    备库启动实例

    $exportORACLE_SID=shdb

    //或修改.bash_profile

    $sqlplus ‘/assysdba’

    SQL>startupnomount;

    SQL>showparameter pfile;              //备库使用pfile启动





    SQL>showparameter name             //看一下数据库参数是否正确




    SQL>showparameter archive            //查询一下归档设置是否正确






    ********************未完待续**************************

    声明:
             原创作品,出自 “深蓝的blog” 博客,允许转载,转载时请务必注明出处(http://blog.csdn.net/huangyanlong)。

             关于涉及版权事宜,作者有权追究法律责任。



    展开全文
  • Oracle 11g standby主从配置

    万次阅读 2013-11-05 14:32:06
    原文:http://greatdeer007.blog.163.com/blog/static/16366517420105331447834/ 一、主机描述  dbprimary: 192.168.1.57 主机名称db1  dbstandby: 192.168.1.58 主机名成db2 ...
  • 参考了官方文档和网上资料,自己也做了一下在windows平台上关于Oracle 11g的测试环境搭建,把其中的过程和碰见问题后怎么解决的记录下来跟大家分享。 测试环境: 操作系统平台:Windows7 旗舰版64位 Oracle版本:...
  • 在已装有Oracle DB 10gR2的windows 环境下安装 gateway 11g for sybase 1.建立安装目录 [oracle@QGYT01~]$ mkdir /u03/gateway   2.使用OUI安装 [oracle@QGYT01gateways]$ ./runInstaller   ...
  • Oracle 11g搭建DG(ADG方式)

    千次阅读 2017-10-16 00:54:36
    Oracle 11g搭建DG(ADG方式)
  • Oracle 11g RAC搭建(VMware环境)

    万次阅读 多人点赞 2018-07-16 17:06:15
    Oracle 11g RAC搭建(VMware环境)Oracle 11g RAC搭建VMware环境 安装环境与网络规划 安装环境 网络规划 环境配置 通过SecureCRT建立命令行连接 关闭防火墙 创建必要的用户组和目录并授权 节点配置检查 系统文件设置...
  • Oracle GoldenGate 详解

    万次阅读 2019-06-21 10:18:42
    一、Oracle GoldenGate介绍  GoldenGate软件是一种基于日志的结构化数据复制软件。GoldenGate 能够实现大量交易数据的实时捕捉、变换和投递,实现源数据库与目标数据库的数据同步,保持亚秒级的数据延迟。 1、...
  • Oracle 11g R2 RAC 增加节点详解(一)

    千次阅读 2017-05-23 08:46:28
    最近准备给我的RAC环境加个节点,看了下官网,表示写的很简单,也应该是比较简单 第一步当然是准备一台虚拟机,最好是host01的拷贝,在未安装前,安装完毕后 $ cluvfy stage -pre nodeadd -n node3 [-fixup [-...
  • oracle11g 搭建 ADG

    千次阅读 2018-08-20 22:06:01
    1.实验环境   主库 备库 操作系统版本 CentOS 7.4 CentOS 7.4 数据库版本 11.2.0.4 11.2.0.4 ... ...
  • 这几天在搭建10g DG Windows 2008 R2的测试环境,主要是明天要去给一客户重新搭建一套生产库的DG,其中发现一些问题,特此记录一下 由于将要部署到生产环境,所以考虑在线搭建DG的方案,即不停库的情况下,而问题...
  • Windows server 2008 R2 安装 Oracle 11g R2 dataguard

    千次阅读 热门讨论 2020-04-05 17:09:30
    Windows server 2008 R2 安装 Oracle 11g R2 dataguard过程有点复杂,尽量明白各个步骤的意义,认真,耐心一定可以配置成功。
  • 手工搭建Data Guard

    千次阅读 2016-08-01 23:46:14
    DATA Guard的搭建可以使用GC图形化安装,优缺点很明显,优点就是图形化操作,符合国人的习惯(据secooler介绍外国程序员能用图形化做的事就一定用图形做,因为boss看得懂,和国人正相反。。。),缺点就是如同Windows...
  • DG搭建Windows 下注意

    千次阅读 2015-01-22 12:10:43
    win 下,oracle DG 搭建,standby 在nomount之前,需要设置:  > oradim -new -sid sidname startmode manual RMAN> duplicate target database for standby nofilenamecheck; 启动 Duplicate ...
  • ORACLE11g ORA-12514 TNS 监听程序当前无法识别连接描述符中请求的服务
  • Oracle 11g 单实例到RAC DG搭建步骤

    千次阅读 2019-05-17 09:05:25
    1.Oracle单实例到RAC DG搭建步骤 1.1.环境说明 角色 主库 备库 IP 192.168.1.59 192.168.1.51/52 数据库类型 单实例 RAC 实例 orcl orcl1,orcl2 db_name orcl orcl db_...
  • Oracle10g Physical DataGuard 详细搭建过程

    千次阅读 2014-02-14 11:47:07
    DB version:oracle10.2.0.4 IP:192.168.1.7 hostname:vzwc db_name:dbserver db_unique_name:dbserver service_name:dbserver instance_name:ORCL standby 环境 DB version:oracle10.2.0.4 IP:
  • 一、 安装前准备1. 2台或多台linux服务器 2. 每台服务器一个公用ip一个私有ip 3. 公有ip:其他主机访问 2台主机最好同一ip段 4.... Oracle安装包,grid安装包,相关插件安装包(已准备)。 7. ...
1 2 3 4 5 ... 20
收藏数 505
精华内容 202
关键字:

dg搭建for oracle windows