千家信息网

DG Broker如何搭建

发表于:2025-01-21 作者:千家信息网编辑
千家信息网最后更新 2025年01月21日,这篇文章主要介绍了DG Broker如何搭建,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。DG Broker搭建1.环境说明datab
千家信息网最后更新 2025年01月21日DG Broker如何搭建

这篇文章主要介绍了DG Broker如何搭建,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

DG Broker搭建

1.环境说明

databasesiddb_namedb_unique_namenet service name
primaryoggoggoggogg_p
physical standbydoggoggdoggdogg_s

2.查看参数

----主库

SYS@ogg>show parameter broker

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

dg_broker_config_file1 string /u01/app/oracle/product/11.2.0 /dbhome_1/dbs/dr1ogg.dat

dg_broker_config_file2 string /u01/app/oracle/product/11.2.0 /dbhome_1/dbs/dr2ogg.dat

dg_broker_start boolean FALSE

----备库

SYS@dogg> show parameter broker

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

dg_broker_config_file1 string /u01/app/oracle/product/11.2.0 /db_1/dbs/dr1dogg.dat

dg_broker_config_file2 string /u01/app/oracle/product/11.2.0/db_1/dbs/dr2dogg.dat

dg_broker_start boolean FALSE

------修改dg_broker_config_file参数。这里就用默认的路径,也可以自己指定。如果是在RAC环境中,这个把这个文件把到共享的存储上面,如果有ASM可以放到ASM中。

3.启用BROKER

----在两个数据库上面都执行:

alter system set dg_broker_start=true scope=both;

4.登录配置

---在其中任意一台做下面的操作就可以了,另它安装了client的客户端也是可以的

[oracle@ogg-80 ~]$ dgmgrl

(1)连接到当前的主数据库

DGMGRL> connect sys/oracle@ogg_p

DGMGRL> help create -----查看帮助

Creates a broker configuration

Syntax:

CREATE CONFIGURATION AS

PRIMARY DATABASE IS

CONNECT IDENTIFIER IS ;

(2)创建一个配置文件(ogg是db_unique_name,oggDG是配置的名字--可以修改,ogg_p是连接到prod数据库的tnsname)

create configuration oggDG as primary database is ogg connect identifier is ogg_p;

(3)启用配置文件

DGMGRL> enable configuration;

(4)增加备库到配置文件中 (dogg是备机的db_unique_name,dogg_s是连接到sprod数据库的tnsname)

DGMGRL> add database dogg as connect identifier is dogg_s;

(5)启用备库

DGMGRL> enable database dogg;

(6)查看配置文件

DGMGRL> show configuration

Configuration - oggdg

Protection Mode: MaxPerformance

Databases:

ogg - Primary database

dogg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

(7)查看主库的配置消息

DGMGRL> show database verbose ogg;

Database - ogg

Role: PRIMARY

Intended State: TRANSPORT-ON

Instance(s):

ogg

Properties:

DGConnectIdentifier = 'ogg_p'

ObserverConnectIdentifier = ''

LogXptMode = 'ASYNC'

DelayMins = '0'

Binding = 'optional'

MaxFailure = '0'

MaxConnections = '1'

ReopenSecs = '300'

NetTimeout = '30'

RedoCompression = 'DISABLE'

LogShipping = 'ON'

PreferredApplyInstance = ''

ApplyInstanceTimeout = '0'

ApplyParallel = 'AUTO'

StandbyFileManagement = 'auto'

ArchiveLagTarget = '0'

LogArchiveMaxProcesses = '4'

LogArchiveMinSucceedDest = '1'

DbFileNameConvert = '/u01/app/oracle/oradata/dogg/, /u01/app/oracle/oradata/ogg/'

LogFileNameConvert = '/u01/app/oracle/oradata/dogg/, /u01/app/oracle/oradata/ogg/'

FastStartFailoverTarget = ''

InconsistentProperties = '(monitor)'

InconsistentLogXptProps = '(monitor)'

SendQEntries = '(monitor)'

LogXptStatus = '(monitor)'

RecvQEntries = '(monitor)'

ApplyLagThreshold = '0'

TransportLagThreshold = '0'

TransportDisconnectedThreshold = '30'

SidName = 'ogg'

StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ogg-80)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ogg_DGMGRL)(INSTANCE_NAME=ogg)(SERVER=DEDICATED)))'

StandbyArchiveLocation = '/u01/app/oracle/archive'

AlternateLocation = ''

LogArchiveTrace = '0'

LogArchiveFormat = '%t_%s_%r.dbf'

TopWaitEvents = '(monitor)'

Database Status:

SUCCESS

(8)查看备库的配置消息

DGMGRL> show database verbose dogg;

Database - dogg

Role: PHYSICAL STANDBY

Intended State: APPLY-ON

Transport Lag: 0 seconds (computed 0 seconds ago)

Apply Lag: 0 seconds (computed 0 seconds ago)

Apply Rate: 0 Byte/s

Real Time Query: ON

Instance(s):

dogg

Properties:

DGConnectIdentifier = 'dogg_s'

ObserverConnectIdentifier = ''

LogXptMode = 'ASYNC'

DelayMins = '0'

Binding = 'OPTIONAL'

MaxFailure = '0'

MaxConnections = '1'

ReopenSecs = '300'

NetTimeout = '30'

RedoCompression = 'DISABLE'

LogShipping = 'ON'

PreferredApplyInstance = ''

ApplyInstanceTimeout = '0'

ApplyParallel = 'AUTO'

StandbyFileManagement = 'auto'

ArchiveLagTarget = '0'

LogArchiveMaxProcesses = '4'

LogArchiveMinSucceedDest = '1'

DbFileNameConvert = '/u01/app/oracle/oradata/ogg/, /u01/app/oracle/oradata/dogg/'

LogFileNameConvert = '/u01/app/oracle/oradata/ogg/, /u01/app/oracle/oradata/dogg/'

FastStartFailoverTarget = ''

InconsistentProperties = '(monitor)'

InconsistentLogXptProps = '(monitor)'

SendQEntries = '(monitor)'

LogXptStatus = '(monitor)'

RecvQEntries = '(monitor)'

ApplyLagThreshold = '0'

TransportLagThreshold = '0'

TransportDisconnectedThreshold = '30'

SidName = 'dogg'

StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=d-ogg)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dogg_DGMGRL)(INSTANCE_NAME=dogg)(SERVER=DEDICATED)))'

StandbyArchiveLocation = '/u01/app/oracle/archive'

AlternateLocation = ''

LogArchiveTrace = '0'

LogArchiveFormat = '%t_%s_%r.dbf'

TopWaitEvents = '(monitor)'

Database Status:

SUCCESS

(9)修改StaticConnectIdentifier参数,记得两个数据库都要修改。

DGMGRL> edit database ogg set property StaticConnectIdentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.80)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ogg)(SERVER=DEDICATED)))';

DGMGRL> edit database dogg set property StaticConnectIdentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.90)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dogg)(SERVER=DEDICATED)))';

(10)开始切换

DGMGRL> switchover to dogg;

Performing switchover NOW, please wait...

Operation requires a connection to instance "dogg" on database "dogg"

Connecting to instance "dogg"...

Connected.

New primary database "dogg" is opening...

Operation requires startup of instance "ogg" on database "ogg"

Starting instance "ogg"...

ORACLE instance started.

Database mounted.

Database opened.

Switchover succeeded, new primary is "dogg"

(11)查看状态

DGMGRL> show configuration;

Configuration - oggdg

Protection Mode: MaxPerformance

Databases:

dogg - Primary database

ogg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

(12)再次切换回去

DGMGRL> switchover to ogg;

感谢你能够认真阅读完这篇文章,希望小编分享的"DG Broker如何搭建"这篇文章对大家有帮助,同时也希望大家多多支持,关注行业资讯频道,更多相关知识等着你来学习!

配置 数据 数据库 文件 篇文章 参数 两个 消息 环境 切换 帮助 价值 兴趣 再次 同时 名字 客户 客户端 是在 更多 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 荣科科技是互联网金融题材股 类图建模在软件开发中的作用 易语言查线服务器满员 mysql用户启动数据库 淄博dell服务器客服电话 软件开发与编程就业方向 文本解析提取到数据库 数据库 渗透技巧 pdf 网络安全专题网络培训有什么好处 国家安全网络安全股票有哪些 网络安全知识大赛证书 国企软件开发对学位审查严格吗 阿里云备案 更换服务器 共建网络安全共享文明网络黑板报 上海正规网络技术费用 软件开发和游戏开发学哪个好一些 光纤网络技术有哪些 升级bios显示服务器连接失败 智能家居与服务器的区别 网络安全测漏师 武汉翼游网络技术有限公司 服务器怎么展示手中物品 数据库如何做网页视频 如何获取私服的数据库ip 软件开发项目流程6 关于网络安全的宣传稿件 澳门网络安全中心统一体系 金融系统网络安全及防控报告 网络安全知识大赛证书 阿里云备案 更换服务器
0