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安全错误
数据库的锁怎样保障安全
广东万易互联网科技有限公司惠州分公司
科技互联网企业
猫创互联网科技
互联网金融 科技创新
盛创互联网科技有限公司
湖南诚度互联网科技有限公司
互联网公司科技股
中国互联网十大科技股排名
科技类公司包括互联网吗
燊美集互联网科技有限公司
阿里互联网科技企业
锡山区互联网智能科技产品供应
电子商务与互联网科技的关系
杭州披云加互联网科技有限公司
互联网风格科技公司名称
江苏互联网科技小贷
互联网科技手机排行榜
版纳互联网科技选哪家
科技互联网经济论坛
中国主要互联网科技公司
河南真二互联网科技有限公司
互联网科技生活的内容
福州新华互联网科技学校 知乎
顶级互联网科技成果有哪些
武汉健翔互联网络科技有限公司
互联网科技快讯热点
互联网科技大会大佬
互联网科技大佬云集
华人运通互联网科技公司
中国主要互联网科技公司