DG broker的配置和使用
发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,配置方法1、主备都在静态监听里新增DG broker的配置主库为(SID_DESC=(GLOBAL_DBNAME=PROD_DGMGRL)(ORACLE_HOME=/db/oracle/product
千家信息网最后更新 2026年10月31日DG broker的配置和使用配置方法
1、主备都在静态监听里新增DG broker的配置
主库为
(SID_DESC=
(GLOBAL_DBNAME=PROD_DGMGRL)
(ORACLE_HOME=/db/oracle/product/11.2.0/db_1/)
(SID_NAME=PROD)
)
备库为
(SID_DESC=
(GLOBAL_DBNAME=PROD_STD_DGMGRL)
(ORACLE_HOME=/mnt/sdb1/u01/app/oracle/product/11.2.0.4/db)
(SID_NAME=PROD_STD)
)
2、主备都设置参数
SQL> alter system set dg_broker_start=true;
使用方法
主备都可以执行
dgmgrl
DGMGRL> connect sys/123456
DGMGRL> connect sys/123456@tnsname
DGMGRL> help
DGMGRL> help show
Displays information about a configuration, database, or instance
Syntax:
SHOW CONFIGURATION [VERBOSE];
SHOW DATABASE [VERBOSE] [];
SHOW INSTANCE [VERBOSE] []
[ON DATABASE];
SHOW FAST_START FAILOVER;
DGMGRL> help create
Creates a broker configuration
Syntax:
CREATE CONFIGURATION AS
PRIMARY DATABASE IS
CONNECT IDENTIFIER IS;
DGMGRL> help add
Adds a standby database to the broker configuration
Syntax:
ADD DATABASE
[AS CONNECT IDENTIFIER IS]
[MAINTAINED AS {PHYSICAL|LOGICAL}];
DGMGRL> help switchover
Switches roles between a primary and standby database
Syntax:
SWITCHOVER TO;
以上database name其实为db_unique_name,connect identifier表示tnsname
DGMGRL> SHOW CONFIGURATION;
ORA-16532: Data Guard broker configuration does not exist
Configuration details cannot be determined by DGMGRL
DGMGRL> CREATE CONFIGURATION DG1 AS PRIMARY DATABASE IS PROD2 CONNECT IDENTIFIER IS PROD2;
Configuration "dg1" created with primary database "prod2"
DGMGRL> ADD DATABASE PROD2_STD AS CONNECT IDENTIFIER IS PROD2_STD MAINTAINED AS PHYSICAL;
Database "prod2_std" added
DGMGRL> SHOW CONFIGURATION;
Configuration - dg1
Protection Mode: MaxPerformance
Databases:
prod2 - Primary database
prod2_std - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
DGMGRL> enable CONFIGURATION;
Enabled.
一旦enable configuration,那么主库的log_archive_dest_2就有值了
DGMGRL> show CONFIGURATION VERBOSE;
Configuration - dg1
Protection Mode: MaxPerformance
Databases:
prod2 - Primary database
prod2_std - Physical standby database
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
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
1、主备都在静态监听里新增DG broker的配置
主库为
(SID_DESC=
(GLOBAL_DBNAME=PROD_DGMGRL)
(ORACLE_HOME=/db/oracle/product/11.2.0/db_1/)
(SID_NAME=PROD)
)
备库为
(SID_DESC=
(GLOBAL_DBNAME=PROD_STD_DGMGRL)
(ORACLE_HOME=/mnt/sdb1/u01/app/oracle/product/11.2.0.4/db)
(SID_NAME=PROD_STD)
)
2、主备都设置参数
SQL> alter system set dg_broker_start=true;
使用方法
主备都可以执行
dgmgrl
DGMGRL> connect sys/123456
DGMGRL> connect sys/123456@tnsname
DGMGRL> help
DGMGRL> help show
Displays information about a configuration, database, or instance
Syntax:
SHOW CONFIGURATION [VERBOSE];
SHOW DATABASE [VERBOSE]
SHOW INSTANCE [VERBOSE]
[ON DATABASE
SHOW FAST_START FAILOVER;
DGMGRL> help create
Creates a broker configuration
Syntax:
CREATE CONFIGURATION
PRIMARY DATABASE IS
CONNECT IDENTIFIER IS
DGMGRL> help add
Adds a standby database to the broker configuration
Syntax:
ADD DATABASE
[AS CONNECT IDENTIFIER IS
[MAINTAINED AS {PHYSICAL|LOGICAL}];
DGMGRL> help switchover
Switches roles between a primary and standby database
Syntax:
SWITCHOVER TO
以上database name其实为db_unique_name,connect identifier表示tnsname
DGMGRL> SHOW CONFIGURATION;
ORA-16532: Data Guard broker configuration does not exist
Configuration details cannot be determined by DGMGRL
DGMGRL> CREATE CONFIGURATION DG1 AS PRIMARY DATABASE IS PROD2 CONNECT IDENTIFIER IS PROD2;
Configuration "dg1" created with primary database "prod2"
DGMGRL> ADD DATABASE PROD2_STD AS CONNECT IDENTIFIER IS PROD2_STD MAINTAINED AS PHYSICAL;
Database "prod2_std" added
DGMGRL> SHOW CONFIGURATION;
Configuration - dg1
Protection Mode: MaxPerformance
Databases:
prod2 - Primary database
prod2_std - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
DGMGRL> enable CONFIGURATION;
Enabled.
一旦enable configuration,那么主库的log_archive_dest_2就有值了
DGMGRL> show CONFIGURATION VERBOSE;
Configuration - dg1
Protection Mode: MaxPerformance
Databases:
prod2 - Primary database
prod2_std - Physical standby database
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
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
配置
方法
使用方法
参数
静态
监听
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
南京欣网互联网络科技
互联网与科技金融数据
互联网科技的
互联网金融 科技金融
齐家互联网科技
互联网与未来科技
未来的互联网科技
友谊互联网络科技
深圳天众互联网科技公司
互联网科技小额贷款
兼蜜互联网科技
移动互联网科技股
玉溪互联网科技怎么选
米聚互联网科技南京有限公司排面
四川互联网展示科技馆设计
陕西九四连强互联网科技有限公司
互联网科技手抄报图片
科技互联网专业务虚会材料
科技美学互联网 艺术
利用互联网等科技手段
伟宏互联网科技
中国互联网科技工作委员会毛军
工业互联网科技新基建
互联网金融 科技
互联网科技生活的内容
黑科技 体验场景 互联网大会
昆明中奇联合互联网科技
悟空问答互联网科技
北京品多多互联网科技有限公司
瑞安市蟠桃会互联网科技有限公司