文档内容
|
|
目标 |
|
|
解决方案 |
|
|
参考 |
适用于:
Oracle Database - Enterprise Edition - 版本 12.1.0.1 到 12.1.0.1 [发行版 12.1]本文档所含信息适用于所有平台
目标
本文档提供配置 Dataguard broker 的逐项步骤。
配置实例:
Dataguard 版本:12c
主库 db_unique_name : boston
备库 db_unique_name : chicago
解决方案
1. 先决条件
启动 Dataguard borker 的 DMON 进程。
在主库和备库执行:
SQL> alter system set dg_broker_start=true sid='*';
2. 连接到 DGMGRL
主库:
$dgmgrl
DGMGRL>connect sysdg
password: *****
DGMGRL>connect sysdg
password: *****
3. 开始配置
DGMGRL> CREATE CONFIGURATION
'
ex,
DGMGRL> CREATE CONFIGURATION '12c' AS PRIMARY DATABASE IS 'boston' CONNECT IDENTIFIER IS boston;
验证配置:
DGMGRL> show configuration;
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
4. 添加备库
DGMGRL> add database
ex,
DGMGRL> add database chicago as connect identifier is chicago;
DGMGRL> show configuration;
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
chicago - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
chicago - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
5. 激活配置
DGMGRL> enable configuration;
6. 验证配置
DGMGRL> show configuration;
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
chicago - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
Configuration - 12c
Protection Mode: MaxPerformance
Databases:
boston - Primary database
chicago - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> show database boston;
Database - boston
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
boston
Database Status:
SUCCESS
DGMGRL> show database chicago;
Database - chicago
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 1 second ago)
Apply Rate: 2.54 MByte/s
Real Time Query: ON
Instance(s):
chicago
Database - boston
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
boston
Database Status:
SUCCESS
DGMGRL> show database chicago;
Database - chicago
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 1 second ago)
Apply Rate: 2.54 MByte/s
Real Time Query: ON
Instance(s):
chicago
Database Status:
SUCCESS
SUCCESS
Dataguard 的详细配置信息记载到了二进制文件当中:
SQL> show parameter config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/12.1.0
/dbhome_1/dbs/dr1boston.dat
dg_broker_config_file2 string /u01/app/oracle/product/12.1.0
/dbhome_1/dbs/dr2boston.dat
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/12.1.0
/dbhome_1/dbs/dr1boston.dat
dg_broker_config_file2 string /u01/app/oracle/product/12.1.0
/dbhome_1/dbs/dr2boston.dat