12c DataGuard Broker配置步骤
admin
2023-04-25 02:00:18
0

一、描述

Oracle 12c

RHEL 7.3


二、配置DataGuard Broker

1.源端

sqlplus / as sysdba

alter system set dg_broker_config_file1='/oracle/oradata/orcl/dr1.dat';

alter system set dg_broker_config_file2='/oracle/oradata/orcl/dr2.dat';

alter system set dg_broker_start=true;


2.目的端

sqlplus / as sysdba

alter system set dg_broker_config_file1='/oracle/oradata/orcl/dr1.dat';

alter system set dg_broker_config_file2='/oracle/oradata/orcl/dr2.dat';

alter system set dg_broker_start=true;


3.查看dmon进程

$ps -ef|grep dmon

oracle    5768     1  0 20:28 ?        00:00:00 ora_dmon_orcl

oracle    5773  4404  0 20:28 pts/1    00:00:00 grep --color=auto dmon


4.配置DG

源端使用oracle用户执行

$dgmgrl /

DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production


Copyright (c) 2000, 2013, Oracle. All rights reserved.


Welcome to DGMGRL, type "help" for information.

Connected as SYSDG.

DGMGRL> create configuration 'dg_config' as  primary database is 'orcl' connect identifier is orcl;

Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added


Failed.

DGMGRL> 


5.查看报错

$oerr ora 16698

16698, 0000, "LOG_ARCHIVE_DEST_n parameter set for object to be added"

// *Cause:  One or more LOG_ARCHIVE_DEST_n initialization parameters that

//          contain a SERVICE attribute but not the NOREGISTER attribute were

//          set when attempting to create a configuration or add a standby or

//          far sync instance to the configuration.

// *Action: If creating a configuration, clear all LOG_ARCHIVE_DEST_n

//          initialization parameters that contain a SERVICE attribute but not

//          the NOREGISTER attribute. If adding a standby database or far sync

//          instance, clear the LOG_ARCHIVE_DEST_n initialization parameter

//          that specifies the database or far sync instance to be added.

$


6.报错处理

主库备库都需要执行!!!

这个错误可以通过在Primary 和 Standby上取消log_archive_dest_n参数来解决,

实际这一块的参数应当是交给DG broker 来管理了,不再需要人为介入设置。


SQL> alter system reset log_archive_dest_2;  

System altered.


SQL> alter system reset log_archive_dest_1;

System altered.


SQL> startup force;

ORACLE instance started.


Total System Global Area 1560281088 bytes

Fixed Size                  2924784 bytes

Variable Size            1006636816 bytes

Database Buffers          536870912 bytes

Redo Buffers               13848576 bytes

Database mounted.

Database opened.

SQL> 



7.配置、启用、查看DG

$dgmgrl /

DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production


Copyright (c) 2000, 2013, Oracle. All rights reserved.


Welcome to DGMGRL, type "help" for information.

Connected as SYSDG.

DGMGRL> 

DGMGRL> create configuration 'dg_config' as  primary database is 'orcl' connect identifier is orcl;

Configuration "dg_config" created with primary database "orcl"

DGMGRL> add database 'orcldg' as connect identifier is orcldg;

Database "orcldg" added

DGMGRL> 

DGMGRL> enable configuration;

Enabled.

DGMGRL> show configuration;


Configuration - dg_config


  Protection Mode: MaxPerformance

  Members:

  orcl   - Primary database

    orcldg - Physical standby database 


Fast-Start Failover: DISABLED


Configuration Status:

SUCCESS   (status updated 6 seconds ago)


DGMGRL> 


三、小结

本来测试环境DG没有使用broker,不过客户的环境都是broker来管理,

只好把自己的环境修改为broker的管理方式。


相关内容

热门资讯

烈焰熊熊,堪比“原子弹”,欧洲... 据美国有线电视新闻网(CNN)7月29日报道,席卷法国西南部的大片野火燃烧得如此猛烈,以至于形成了一...
外交部:对日本熊本县地震遇难者... 据凤凰卫视报道,针对日本熊本县发生强震造成人员伤亡,中国外交部发言人毛宁7月29日在例行记者会上表示...
高铁喧哗被劝阻后叫嚣全家体制内... “女子高铁喧哗被劝阻后叫嚣全家体制内”一事迎来官方通报。据新京报报道,7月29日,辽宁北票市公安局发...
广东专业蓝牙耳机定制厂家推荐,... 在珠三角腹地,广东早已成为全球蓝牙耳机产业链的“心脏地带”。从深圳华强北的声学元件批发,到东莞、惠州...
格雷厄姆葬礼变地缘竞价场!两大... 有些葬礼,送别的是逝者;有些葬礼,演的却是活人最现实的政治博弈。当地时间7月28日,美国老牌鹰派参议...
一道小学数学题难住3名医学博士... 3名不同学校的博士同做一道数学题,谁最厉害?近日,一陕西网友发布的视频引发热议。29日,视频发布者“...
华为全新“小艺任务”亮相:整合... 7月29日,在华为鸿蒙电脑新品技术沟通会上,终端云服务小艺业务部总裁贾永利宣布,小艺将迎来“从对话到...
广西日报特稿《王的猜想》火了,... 澎湃新闻记者 蒋子文 实习生 汤煜炜为应对外界购买纸质版特稿《王的猜想》的热情,《广西日报》宣布紧急...
月租20元内!2026年平价云... 不少手游玩家、账号运营从业者挑选云手机时,首要诉求就是低价够用,想要控制每月支出在20元以内,同时兼...
诺奖得主如何看待王虹境遇?“我... 中村修二(2014年诺贝尔物理学奖得主)【导读】近日王虹与邓煜双双获得2026年菲尔兹奖,成为了首批...