DG broker的配置和使用
发表于:2025-11-07 作者:千家信息网编辑
千家信息网最后更新 2025年11月07日,配置方法1、主备都在静态监听里新增DG broker的配置主库为(SID_DESC=(GLOBAL_DBNAME=PROD_DGMGRL)(ORACLE_HOME=/db/oracle/product
千家信息网最后更新 2025年11月07日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安全错误
数据库的锁怎样保障安全
网络技术竞赛复试题
河南软件开发公司有哪些
过多定时任务云服务器连接不上
网络安全ppt课件幼儿园
计算机网络技术当兵有用吗
广州企叮咚互联网科技公司
澎湃新闻网络安全答题
推广网络技术咨询市场报价
软件开发框架6
网络安全性要求包括
安卓国服光遇服务器不一样吗
丰台区运营网络技术售后服务
服务器资源包
天融信防火墙设置日志服务器
信息和网络技术中心
哈尔滨壹双科技软件开发
新中大财务软件数据库字典
湖北丝路贵人网络技术有限
数据库单价表保留一位小数
客户-服务器结构
软件开发税务筹划有哪些方案
如何判断数据库设计
网络安全记心间知识
渝北区软件开发电话
数据库唯一索引可以建几个
广州企叮咚互联网科技公司
网络安全信息网
长沙软件开发培训学校
网络安全配置实验原理
网络安全问题涉及的危害