一、描述
10年積累的做網(wǎng)站、網(wǎng)站建設(shè)經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先做網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有安圖免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
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進(jìn)程
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用戶執(zhí)行
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.查看報(bào)錯(cuò)
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.報(bào)錯(cuò)處理
主庫備庫都需要執(zhí)行?。?!
這個(gè)錯(cuò)誤可以通過在Primary 和 Standby上取消log_archive_dest_n參數(shù)來解決,
實(shí)際這一塊的參數(shù)應(yīng)當(dāng)是交給DG broker 來管理了,不再需要人為介入設(shè)置。
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 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>
三、小結(jié)
本來測試環(huán)境DG沒有使用broker,不過客戶的環(huán)境都是broker來管理,
只好把自己的環(huán)境修改為broker的管理方式。