[Oracle维护工程师手记]Data Guard Broker中改属性是否需要两侧分别执行?

Data Guard Broker中改属性是否需要两侧分别执行?

Data Guard Broker有一些属性,可以通过 show configuration 看到。
我有时会想,这些个属性,是否是分别属于primary 和 standby,如果
想要修改,是否需要分别登陆到primary 和 standby ,来分别修改呢?

这也是很多客户经常有的疑问。故此我进行了如下的实验。

先看看primary 端的 属性值:

-bash-4.1$ dgmgrl /
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information.
Connected as SYSDG. DGMGRL> show configuration verbose; Configuration - DRSolution  Protection Mode: MaxPerformance
 Members:
 orcl12102      - Primary database
   orcl12102_stby - Physical standby database  Properties:
   FastStartFailoverThreshold      = '30'
   OperationTimeout                = '30'
   TraceLevel                      = 'USER'
   FastStartFailoverLagLimit       = '30'
   CommunicationTimeout            = '180' 
   ObserverReconnect               = '0'
   FastStartFailoverAutoReinstate  = 'TRUE'
   FastStartFailoverPmyShutdown    = 'TRUE'
   BystandersFollowRoleChange      = 'ALL'
   ObserverOverride                = 'FALSE'
   ExternalDestination1            = ''
   ExternalDestination2            = ''
   PrimaryLostWriteAction          = 'CONTINUE' Fast-Start Failover: DISABLED Configuration Status:
SUCCESS DGMGRL>

再看Standby 端的属性:

-bash-4.1$ dgmgrl /
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information.
Connected as SYSDG. DGMGRL> show configuration verbose; Configuration - DRSolution  Protection Mode: MaxPerformance
 Members:
 orcl12102      - Primary database
   orcl12102_stby - Physical standby database  Properties:
   FastStartFailoverThreshold      = '30'
   OperationTimeout                = '30'
   TraceLevel                      = 'USER'
   FastStartFailoverLagLimit       = '30'
   CommunicationTimeout            = '180'
   ObserverReconnect               = '0'
   FastStartFailoverAutoReinstate  = 'TRUE'
   FastStartFailoverPmyShutdown    = 'TRUE'
   BystandersFollowRoleChange      = 'ALL'
   ObserverOverride                = 'FALSE'
   ExternalDestination1            = ''
   ExternalDestination2            = ''
   PrimaryLostWriteAction          = 'CONTINUE' Fast-Start Failover: DISABLED Configuration Status:
SUCCESS DGMGRL>

从 primary 和 standby 两边看到的属性值都是一样的。所以我有一个猜测,这些属性值是共通的。
下面通过修改 CommunicationTimeout 的值来进行验证:

在primary 端修改:

DGMGRL> EDIT CONFIGURATION SET PROPERTY CommunicationTimeout=120;
Property "communicationtimeout" updated

改完后验证一下:

DGMGRL> show configuration verbose;

Configuration - DRSolution

 Protection Mode: MaxPerformance
 Members:
 orcl12102      - Primary database
   orcl12102_stby - Physical standby database  Properties:
   FastStartFailoverThreshold      = '30'
   OperationTimeout                = '30'
   TraceLevel                      = 'USER'
   FastStartFailoverLagLimit       = '30'
   CommunicationTimeout            = '120' ******
   ObserverReconnect               = '0'
   FastStartFailoverAutoReinstate  = 'TRUE'
   FastStartFailoverPmyShutdown    = 'TRUE'
   BystandersFollowRoleChange      = 'ALL'
   ObserverOverride                = 'FALSE'
   ExternalDestination1            = ''
   ExternalDestination2            = ''
   PrimaryLostWriteAction          = 'CONTINUE' Fast-Start Failover: DISABLED Configuration Status:
SUCCESS DGMGRL>

那么,在 standby 端,会看到怎样的结果呢?

DGMGRL> show configuration verbose;

Configuration - DRSolution

 Protection Mode: MaxPerformance
 Members:
 orcl12102      - Primary database
   orcl12102_stby - Physical standby database  Properties:
   FastStartFailoverThreshold      = '30'
   OperationTimeout                = '30'
   TraceLevel                      = 'USER'
   FastStartFailoverLagLimit       = '30'
   CommunicationTimeout            = '120' <<<<<<<<<<<<<  从 standby 端,也可以看到这个值,确实被改变了。
   ObserverReconnect               = '0'
   FastStartFailoverAutoReinstate  = 'TRUE'
   FastStartFailoverPmyShutdown    = 'TRUE'
   BystandersFollowRoleChange      = 'ALL'
   ObserverOverride                = 'FALSE'
   ExternalDestination1            = ''
   ExternalDestination2            = ''
   PrimaryLostWriteAction          = 'CONTINUE' Fast-Start Failover: DISABLED Configuration Status:
SUCCESS DGMGRL>

事实上,从 standby 端来更改其他的属性值,也是可以的,我们也可以从primary 端,连接到 data guard broker,看到同样的改变。

所以说,Data Guard Broker 搭建完毕后,如果想更改其属性值,无论是从primary 端,还是从standby 端,登陆连接到broker 后,
在哪一端修改都是可以的。

上一篇:mybatis学习笔记--常见的错误


下一篇:(转) IPv6相关RFC