1. 程式人生 > >12c DataGuard Broker配置步驟

12c DataGuard Broker配置步驟

broker 12c dataguard broker ora-1669

一、描述

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進程

<roidb01:orcl:/oracle/oradata/orcl>$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用戶執行

<roidb01:orcl:/home/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.查看報錯

<roidb01:orcl:/home/oracle>$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.

<roidb01:orcl:/home/oracle>$


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

<roidb01:orcl:/home/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>

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的管理方式。


12c DataGuard Broker配置步驟