使用duplicate搭建oracle 11.2.0.4.0数据库active dataguard (ADG)

本文档详细介绍了如何在Centos6.7环境下,使用duplicate搭建Oracle 11.2.0.4.0数据库的Active Data Guard (ADG)。步骤包括关闭防火墙、配置监听、修改参数、创建日志目录和从库日志组、传输密码文件和pfile文件到备库,以及启动备库并进行duplicate操作,最终完成ADG的配置和数据同步测试。
摘要由CSDN通过智能技术生成


1:配置情况(主库需要建立实例,从库只需要安装软件)

主库

Centos6.7

Oracle 11.2.0.4.0

IP:192.168.1.155  sid:orcl

 

备库

Centos6.7

Oracle 11.2.0.4.0软件

IP192.168.1.156

 

2:关闭防火墙(两边都需要操作)

  lsnrctl iptables stop

  chkconfig iptables off

 

3:配置监听

主库

修改listener.ora

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = dg1)

      (ORACLE_HOME = /u01/oracle/11g)

      (SID_NAME = orcl)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

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

      )

    )

  )

  

修改tnsnames.ora

dg1 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = dg1)

    )

  )

 

dg2 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = dg2)

    )

  )

 

for_db =

 (DESCRIPTION =

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

  )

备库

修改listener.ora

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = dg2)

      (ORACLE_HOME = /u01/oracle/11g)

      (SID_NAME = orcl)

    )

  )

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

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

      )

    )

  )

修改tnsnames.ora

dg1 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = dg1)

    )

  )

 

dg2 =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = dg2)

    )

  )

 

for_db =

 (DESCRIPTION =

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

Note:配置完,tnsping dg1,tnsping dg2出现下面信息,表示互通。

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.155)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = dg1)))
OK (20 msec)

4:配置传输目录和添加日志组(主库

   4.1 创建日志目录和从库日志目录

   mkdir -p /u01/archivelog

    mkdir -p /u01/standbylog

   4.2 修改参数

 SQL> alter database force logging;  

Database altered.

SQ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值