编者按:
本文作者系大连健哥, POSTGRESQL、ORACLE 数据库资深从业人员、IT 技术的深度爱好者。相信科学改变人类、技术创造未来。个人主页:https://www.cnblogs.com/gaojian/,经其本人授权发布。
【免责声明】本公众号文章仅代表个人观点,与任何公司无关。

Data Guard Broker有一些属性,可以通过 show configuration 看到。
我有时会想,这些个属性,是否是分别属于primary 和 standby,如果
想要修改,是否需要分别登陆到primary 和 standby ,来分别修改呢?
这也是很多客户经常有的疑问。故此我进行了如下的实验。
先看看primary 端的 属性值:
dgmgrl /DGMGRL for Linux: Version 12.1.0.2.0 - 64bit ProductionCopyright (c) 2000, 2013, Oracle. All rights reserved.Welcome to DGMGRL, type "help" for information.Connected as SYSDG.show configuration verbose;Configuration - DRSolutionProtection Mode: MaxPerformanceMembers:orcl12102 - Primary databaseorcl12102_stby - Physical standby databaseProperties:FastStartFailoverThreshold = '30'OperationTimeout = '30'TraceLevel = 'USER'FastStartFailoverLagLimit = '30'CommunicationTimeout = '180'ObserverReconnect = '0'FastStartFailoverAutoReinstate = 'TRUE'FastStartFailoverPmyShutdown = 'TRUE'BystandersFollowRoleChange = 'ALL'ObserverOverride = 'FALSE'ExternalDestination1 = ''ExternalDestination2 = ''PrimaryLostWriteAction = 'CONTINUE'Failover: DISABLEDConfiguration Status:SUCCESSDGMGRL>
再看Standby 端的属性:
dgmgrl /DGMGRL for Linux: Version 12.1.0.2.0 - 64bit ProductionCopyright (c) 2000, 2013, Oracle. All rights reserved.Welcome to DGMGRL, type "help" for information.Connected as SYSDG.show configuration verbose;Configuration - DRSolutionProtection Mode: MaxPerformanceMembers:orcl12102 - Primary databaseorcl12102_stby - Physical standby databaseProperties:FastStartFailoverThreshold = '30'OperationTimeout = '30'TraceLevel = 'USER'FastStartFailoverLagLimit = '30'CommunicationTimeout = '180'ObserverReconnect = '0'FastStartFailoverAutoReinstate = 'TRUE'FastStartFailoverPmyShutdown = 'TRUE'BystandersFollowRoleChange = 'ALL'ObserverOverride = 'FALSE'ExternalDestination1 = ''ExternalDestination2 = ''PrimaryLostWriteAction = 'CONTINUE'Failover: DISABLEDConfiguration Status:SUCCESSDGMGRL>
从 primary 和 standby 两边看到的属性值都是一样的。所以我有一个猜测,这些属性值是共通的。
下面通过修改 CommunicationTimeout 的值来进行验证:
在primary 端修改:
DGMGRL> EDIT CONFIGURATION SET PROPERTY CommunicationTimeout=120;Property "communicationtimeout" updated
改完后验证一下:
show configuration verbose;Configuration - DRSolutionProtection Mode: MaxPerformanceMembers:orcl12102 - Primary databaseorcl12102_stby - Physical standby databaseProperties:FastStartFailoverThreshold = '30'OperationTimeout = '30'TraceLevel = 'USER'FastStartFailoverLagLimit = '30'CommunicationTimeout = '120' ******ObserverReconnect = '0'FastStartFailoverAutoReinstate = 'TRUE'FastStartFailoverPmyShutdown = 'TRUE'BystandersFollowRoleChange = 'ALL'ObserverOverride = 'FALSE'ExternalDestination1 = ''ExternalDestination2 = ''PrimaryLostWriteAction = 'CONTINUE'Failover: DISABLEDConfiguration Status:SUCCESSDGMGRL>
那么,在 standby 端,会看到怎样的结果呢?
DGMGRL> show configuration verbose;Configuration - DRSolutionProtection Mode: MaxPerformanceMembers:orcl12102 - Primary databaseorcl12102_stby - Physical standby databaseProperties: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': DISABLEDConfiguration Status:SUCCESSDGMGRL>
事实上,从 standby 端来更改其他的属性值,也是可以的,我们也可以从primary 端,连接到 data guard broker,看到同样的改变。
所以说,Data Guard Broker 搭建完毕后,如果想更改其属性值,无论是从primary 端,还是从standby 端,登陆连接到broker 后,在哪一端修改都是可以的。
后续文章更加精彩,欢迎关注本公众号或访问【阅读原文】。
——End——
专注于技术不限于技术!
用碎片化的时间,一点一滴地提高数据库技术和个人能力。
欢迎关注!
备份恢复系列:
Oracle数据库工程师手记:从RAC环境备份后向新环境(文件系统)恢复的试验
Oracle数据库工程师手记:探究 Oracle PDB Application Container (一)
原文作者:SQL和数据库技术;如有侵权,请联系管理员删除。