岳彩波
作者岳彩波2017-09-26 15:20
产品经理, 无

Oracle adg broker配置(实际操作记录)

字数 2251阅读 1195评论 0赞 3
  1. 检查并设置相关参数.

SQL> show parameter broker

--如果dg_broker_start为False,就将其改为True.

alter system set dg_broker_start = true scope=both;

  1. 调整listener配置,添加listener相关监听项.

1).standby gr 上的配置变更为
--变化前的配置.

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(GLOBAL_NAME=ibangr)

(SID_NAME=ibangr1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

)

--变化后的配置.

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(GLOBAL_NAME=ibangr)

(SID_NAME=ibangr1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

(SID_DESC=

(GLOBAL_NAME=ibangr_DGMGRL)

(SID_NAME=ibangr1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

)

--修改完毕之后,运行lsnrctl reload 配置.

2).primary ibangw 的listener 配置也做类似的处理
--变化前的配置.

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(GLOBAL_NAME=gw)

(SID_NAME=gw1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

)

--变化后的配置

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(GLOBAL_NAME=gw)

(SID_NAME=gw1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

(SID_DESC=

(GLOBAL_NAME=gw)

(SID_NAME=gw1)

(ORACLE_HOME=/opt/app/oracle/products/11.2.0)

)

)

--配置完毕之后, 运行lsnrctl reload加载新配置.

  1. 运行dgmgrl命令创建broker 相关配置.

--创建基于主库的broker 配置.

DGMGRL> create configuration dgconfig1

as primary database is gw

connect identifier is gw;

Configuration "dgconfig1" created with primary database "dbmain"

--添加standby db的broker配置.

DGMGRL> add database ibangr as connect identifier is gr maintained as physical;

Database "dbstby" added

--显示添加好之后的配置.

DGMGRL> show configuration;

Configuration - dgconfig1

Protection Mode: MaxAvailability

Databases:

dbmain - Primary database
dbstby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

DISABLED

--激活配置并重新显示配置.

DGMGRL> enable configuration;

Enabled.

DGMGRL> show configuration;

Configuration - dgconfig1

Protection Mode: MaxAvailability

Databases:

dbmain - Primary database
dbstby - Physical standby database
Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

45 DGMGRL>

--显示primary database的信息.

DGMGRL> show database gw;

Database - dbmain

Role: PRIMARY

--显示standby database的信息.

61 DGMGRL> show database gr;

Intended State: APPLY-ON --是否正在apply.

Transport Lag: 0 seconds --log transport delay

Apply Lag: 0 seconds --log apply delay

Real Time Query: ON --是否打开read time apply

Instance(s):

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

3

添加新评论0 条评论

Ctrl+Enter 发表

关于TWT  使用指南  社区专家合作  厂商入驻社区  企业招聘  投诉建议  版权与免责声明  联系我们
© 2019  talkwithtrend — talk with trend,talk with technologist 京ICP备09031017号-30