SQL> show parameter broker
--如果dg_broker_start为False,就将其改为True.
alter system set dg_broker_start = true scope=both;
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加载新配置.
--创建基于主库的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 条评论