dg搭建 oracle11g_oracle11g中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 11grac集群,方便以后的学习!
  • oracle 搭建dg步骤解析

    千次阅读 2018-09-10 15:46:33
    如果搭建dg 先安装主库database 并建库,同时建备库database 软件,不需要建库。 1 主库打开归档功能 启动到mount状态下,打开归档功能 alter database archivelog; SQL&gt; archive log list; ...
    如果搭建dg 先安装主库database 并建库,同时建备库database 软件,不需要建库。
    

    1 主库打开归档功能

        启动到mount状态下,打开归档功能
    
        alter database archivelog;
    
    SQL> archive log list;
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     17
    Next log sequence to archive   19
    Current log sequence           19
    # 检查已经打开归档功能

    2 配置主库监听和tnsnames文件

    # listener.ora Network Configuration File: /u01/oracle/11g/network/admin/listene
    r.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = /u01/oracle/11g)
          (SID_NAME = orcl)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = porcl)    
          (ORACLE_HOME = /u01/oracle/11g)
          (SID_NAME = orcl)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = porcl_DGMGRL)
          (ORACLE_HOME = /u01/oracle/11g)
          (SID_NAME = orcl)
        )
      )
    
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = dghost)(PORT = 1521))
      )
    
    ADR_BASE_LISTENER = /u01/oracle
    [oracle@dghost root]$ cat /u01/oracle/11g/network/admin/tnsnames.ora
    # tnsnames.ora Network Configuration File: /u01/oracle/11g/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    
    SORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = dgstandby)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = sorcl)
        )
      )
    
    PORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = dghost)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = porcl)
        )
      )
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = dghost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.dghost)
        )
      )
    备库也配置监听
    
    注意主库和备库配置完监听要用tnsping测试都能ping通
    
    [oracle@dghost root]$ tnsping porcl
    
    TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 17-JAN-2017 00:19:12
    
    Copyright (c) 1997, 2011, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dghost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = porcl)))
    OK (10 msec)
    #主库tnsping自己成功
    [oracle@dghost root]$ tnsping sorcl
    
    TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 17-JAN-2017 00:19:42
    
    Copyright (c) 1997, 2011, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dgstandby)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = sorcl)))
    OK (20 msec)
    #主库tnsping备库成功
    # 下面同样需要在备库中tnsping自己和主库,这里就不一一举例

    3 主库修改db_unique_name

    SQL> show parameter db_un
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_unique_name                       string      PORCL  #db_unique_name 需要配置成tnsname里面能解析的域名
    db_unrecoverable_scn_tracking        boolean     TRUE
    # alter system set db_unique_name='porcl' scope=spfile;

    4 主库修改standby_file_management

    SQL> show parameter standby_f
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    standby_file_management              string      AUTO #修改为auto

    5 主库打开强制日志和dg_broker

    alter database force logging;
    
    SQL> show parameter dg_b
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    dg_broker_config_file1               string      /u01/oracle/11g/dbs/dr1PORCL.d
                                                     at
    dg_broker_config_file2               string      /u01/oracle/11g/dbs/dr2PORCL.d
                                                     at
    dg_broker_start                      boolean     TRUE #设置为true 打开

    6 增加备库日志

    alter database add standby logfile;
    
    多增加几个
    

    7 切换日志

        alter system switch logfile;
    
        多切换几次
    

    8 主库参数文件拷贝到备库中

    [oracle@dgstandby dbs]$ strings spfileorcl.ora
    orcl.__db_cache_size=218103808
    orcl.__java_pool_size=4194304
    orcl.__large_pool_size=4194304
    orcl.__oracle_base='/u01/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=205520896
    orcl.__sga_target=381681664
    orcl.__shared_io_pool_size=0
    orcl.__shared_pool_size=142606336
    orcl.__streams_pool_size=4194304
    *.archive_lag_target=0
    *.audit_file_dest='/u01/oracle/admin/orcl/adump' #备库需要创建这个目录 
    *.audit_trail='db'
    *.compatible='11.2.0.0.0'
    *.control_files='/u01/oracle/oradata/orcl/control01 #备库需要创建这个目录
    .ctl','/u01/oracle/fast_recovery_area/orcl/control02.ctl' #备库需要创建这个目录
    *.db_block_size=8192
    *.db_domain='dghost'
    *.db_name='orcl'
    *.db_recovery_file_dest='/u01/oracle/fast_recovery_area' #备库需要创建这个目录
    *.db_recovery_file_dest_size=4322230272
    *.db_unique_name='SORCL'
    *.dg_broker_start=TRUE
    *.diagnostic_dest='/u01/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
    *.fal_server='porcl'
    *.log_archive_config='dg_config=(SORCL,porcl)'
    *.log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST','valid_for=(ALL_LOG
    FILES, ALL_ROLES)'
    orcl.log_archive_format='%t_%s_%r.dbf'
    *.log_archive_max_processes=4
    *.log_archive_min_succeed_dest=1
    orcl.log_archive_trace=0
    *.memory_target=585105408
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.standby_file_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    备库启动到nomount状态下,如果能正常启动到nomount 状态下说明参数文件没有问题
    

    9 主库密码文件拷贝到备库

    10 在备库中克隆

    [oracle@dgstandby dbs]$ rman target sys/oracle@porcl auxiliary sys/oracle@sorcl nocatalog;
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jan 17 00:31:46 2017
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: ORCL (DBID=1461163151)
    using target database control file instead of recovery catalog
    connected to auxiliary database: ORCL (DBID=1461163151)
    # 通过rman链接了主库和备库
    RMAN> duplicate target database for standby nofilenamecheck from active database;
    # 用这个进行克隆,不能有任何错误

    11 dgbroker 创建主库和备库

    DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production
    
    Copyright (c) 2000, 2009, Oracle. All rights reserved.
    
    Welcome to DGMGRL, type "help" for information.
    Connected.
    #进入 dgbroker 环境
    DGMGRL> help create
    
    Creates a broker configuration
    
    Syntax:
    
      CREATE CONFIGURATION <configuration name> AS
        PRIMARY DATABASE IS <database name>
        CONNECT IDENTIFIER IS <connect identifier>;
    # 使用帮助查看创建dgbroker的语法
    DGMGRL> CREATE CONFIGURATION dgc as PRIMARY DATABASE IS porcl CONNECT IDENTIFIER IS porcl;
    # 创建主库dgbroker
    DGMGRL> help add
    
    Adds a standby database to the broker configuration
    
    Syntax:
    
      ADD DATABASE <database name>
        [AS CONNECT IDENTIFIER IS <connect identifier>]
        [MAINTAINED AS {PHYSICAL|LOGICAL}];
    #使用帮助文档查看添加备库dgbroker的语法
    DGMGRL> ADD DATABASE sorcl as CONNECT IDENTIFIER  IS sorcl;

    12 激活dgbroker

    DGMGRL> enable configuration;

    13 启动备库到open 中测试主库和备库是否实时同步。

    14 主备切换

        switchover to sorcl;
    

    想了解更多的同学可以加群705673780哦,群里有很多小伙伴一起学习交流Python,还有很多免费资料哦~

    展开全文
  • 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


    主库下

    $ tail -f /u01/app/oracle/diag/rdbms/bjdb/TestDB12/trace/alert_TestDB12.log




    对于DG,一定要打开告警日志。

    备库下

    $ tail -f/u01/app/oracle/diag/rdbms/shdb/shdb/trace/alert_shdb.log




    4.打开主库、备库、验证

    数据库的开关

    启动顺序:先开备库,再开主库,打开主库的监听(lsnrctl start);

    关闭顺序:先关主库,再关备库。

    切换日志验证主备库

    主库操作

    过程思路:

    主库切换日志(3次):主库切换日志→形成归档日志→归档日志会传送给备库→备库收到主库传来的归档日志后→做recover。

     

    SQL>altersystem switch logfile;

    【补充】:recovery区被启用但未被使用。

    备库下查看告警日志发现警告:




    SQL>show parameter recovery




    查询后发现,recovery区在备库上未被创建,因此告警日志中报了这个小错误。

    oracle@shsrv:/home/oracle> mkdir/u01/app/oracle/fast_recovery_area

    //重新创建recovery区


    报出,文件已经存在,便暂时不避理会次问题。

     


    备库上做recover

    SQL>recovermanaged standby database disconnect from session;

    //启动MRP(Media Recovery Process)进程




    看主库归档日志的进程

    备库告警日志信息:




    主库查看日志进程

    SQL>selectmax(sequence#) from v$archived_log where name is not null;

    //查看可知,主库归档进程序列号同备库中接受归档进程序列号是同步的,都为17




    主库再进行一次切换:

    SQL>altersystem switch logfile;




    备库观察告警日志:




     

    DG搭建成功。

     


    ********************后续更新中**************************

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

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





    展开全文
  • Oracle 11g RAC+DG项目实战-视频分享

    千次阅读 2013-10-28 10:45:25
    在15集视频中详细阐述了Oracle RAC的安装,RAC如何配置Active Data Guard,DG如何切换!绝对重量级的视频。掌握这个技术,资深Oracle DBA的岗位你也轻松秒杀! 实验手册在最后集视频中! 概述: 本系列视频是...

    http://www.bego.cc/u/2718690/4446494

    这是黄伟老师精心制作的Oracle最高端的技术实战!在15集视频中详细阐述了Oracle RAC的安装,RAC如何配置Active Data Guard,DG如何切换!绝对重量级的视频。掌握这个技术,资深Oracle DBA的岗位你也轻松秒杀! 实验手册在最后一集视频中! 概述: 本系列视频是Oracle 11gR2 RAC+单实例Active Dataguard备库,属Oracle数据库技术中的高端应用场景。 视频背景取自于之前给某电商客户实施的一套高可用+容灾方案。

    jilinappleboy.bego.cc里面有更多更好的视频分享给大家,尽请关注,空间内容会不断更新。




    展开全文
  • oracle DG模式搭建详解

    千次阅读 2018-08-13 10:00:50
    oracle DG搭建 安装环境  在主机1上安装数据库软件,并建监听和实例,在主机2上安装数据库软件,并建监听,但不建实例,dg搭建之后数据会同步过去。    数据库参数优化(也可在spfile文件统一修改) 注:scope=...
  • linux下oracle11G DG搭建(三):围绕备库搭建操作 环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本 RedHat Enterprise5.5、Oracle 11g 11.2.0.1 ...
  • oracle 11gR2 rac + dg 文章

    2018-03-07 16:21:32
    之前发布过一步一步搭建 oracle 11gR2 rac + dg,这里的dg为物理dg,...一步一步搭建 oracle 11gR2 rac + dg 之前传() http://blog.itpub.net/26736162/viewspace-1290405/ 一步一步搭建oracle 11...
  • 搭建DG时(我的环境是11g rac asm 备库是11g 文件系统 备库参数文件 log_file_name_convert='+DATA/DSG/ONLINELOG','/u01/app/oracle/oradata/dsg','+FRA/DSG/ONLINELOG','/u01/app/oracle/flash_recovery_area/dsg/...
  • oracle11g主备库切换

    千次阅读 2016-06-13 15:48:49
    前言:  众所周知DataGuard一般的切换分成两种,种是系统正常的情况下的切换这种方式为:...另外种方式属于灾难情况下的切换,这种情况下一般主库已经启动不起来了,为failover,有可能会丢失数据,并
  • Oracle 11g RAC+DG项目实战(共15集)视频

    千次阅读 2019-09-04 10:25:23
    下载地址: ...在15集视频中详细阐述了Oracle RAC的安装,RAC如何配置Active Data Guard,DG如何切换!绝对重量级的视频。掌握这个技术,资深Oracle DBA的岗位你也轻松秒杀! 实验手册在最后集视频...
  • 今天帮朋友检查主库alter日志的时候,
  • CentOS7.5搭建ORACLE RAC+DG

    千次阅读 2018-12-28 15:15:12
    RAC+DG RAM:4G ,OS:CENTOS7.5 HOSTNAME:RAC1: PUBLIC IP:162.168.145.244,PRIV IP:192.168.89.219,VIP:192.168.145.144,scanip:192.168.145.140 HOSTNAME:RAC2: PUBLIC IP:162.168.145.245,PRIV ...
  • 关于db_file_name_convert作用

    千次阅读 2015-06-19 10:41:52
    下面记录下最近搭建DG个案例 主备数据文件所处的目录不一致: 主库:/oracle/oradata/oratest1/ 备库:/oradata/oratest2/ 做的rman全库备份,在备库恢复数据库(使用set newname ),但是在搭建DG时,...
  • Oracle 11gR2 DG部署(RMAN方式)

    千次阅读 2018-12-04 09:47:16
    Oracle DG部署(RMAN方式) Oracle DG部署(RMAN方式) 1.环境介绍 2.DG部署 2.1.建立主库orcl 2.2.主库开启归档 2.3.主库添加Standby Redo Log 2.4.从主库创建pfile文件 2.5.设置主库初始化参数 2.6.设置备库...
  • Oracle的ADG备库可以作为OGG的源头数据库
  • 11G DG搭建--rman方式

    千次阅读 2014-03-08 15:14:40
    DG创建   环境 这次创建DG的环境是 Database:11.2.0.3 主备库的oracle软件安装路径都在/u01/app/oracle下面。 主库IP地址:20.4.1.81 备库IP地址:20.4.1.79     准备TNS项 在主库上编辑tns文件,...
  • windows server2008数据库的dg搭建过程
  • Oracle DG之--构建Physical Standby(主库对应多备库)系统环境:操作系统: RedHat EL6Oracle: Oracle 10.2.0.1.0650) this.width=650;" src=...
  • 11g搭建DataGuard的步骤

    千次阅读 2017-12-06 17:44:24
    11g搭建DataGuard的步骤(物理standby) 概要原理 DataGuard是通过建立个PRIMARY和STANDBY组来确立其参照关系;STANDBY一旦创建,DataGuard就会通过将主数据库(PRIMARY)的REDO传递给STANDBY数据库,然后在...
1 2 3 4 5 ... 20
收藏数 1,968
精华内容 787
关键字:

dg搭建 oracle11g