DG broker的配置和使用
发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,配置方法1、主备都在静态监听里新增DG broker的配置主库为(SID_DESC=(GLOBAL_DBNAME=PROD_DGMGRL)(ORACLE_HOME=/db/oracle/product
千家信息网最后更新 2025年01月20日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安全错误
数据库的锁怎样保障安全
在大连做软件开发有前途吗
数据库怎么看用户是不是被锁
杭州复睿网络技术有限公司
jsp服务器的安装和配置
闵行区媒体数据库收费标准
上海服务器托管公司
网络安全进课堂视频
三级网络技术破解版题库
小学生网络安全防护小妙招
网络安全体系建设现状
彩票软件开发公司巨头
我的世界服务器掉线图
贵州中专网络技术学校
php 服务数据库 地址
按照网络安全等级保护制度
中宁县软件开发技术靠谱吗
数据库原理教程第二版电子版
微信服务器在哪个软件中
对计算机网络技术有什么了解
计算机网络技术的职业特色
阿里云数据库链接地址打不开
树形目录数据库保存
腾讯云轻量服务器建立网站教程
计算机管理服务器
软件开发算内勤吗
网络安全工程师 要学什么
游戏和软件开发专业
湖南出货软件开发
邯郸前端软件开发靠谱吗
全网公敌服务器排列