Installing DG Broker
1. On
both PRIMARY db and STANDBY db's set DG_BROKER_START=TRUE
2. Add static service DGMGRL entry on both
DB's in the LISTENER.ora file
The static
service entry name is of the following format:
<DB_UNIQUE_NAME>_DGMGRL.<DB_DOMAIN>
SID_LIST_LISTENER
=
(SID_LIST
=
(SID_DESC =
(GLOBAL_DBNAME = ORCL1_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ORCL1)
)
)
SID_LIST_LISTENER
=
(SID_LIST
=
(SID_DESC =
(GLOBAL_DBNAME = ORCL2_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ORCL2)
)
)
3. CREATE
CONFIGURATION
create configuration dg_config as
primary database is 'orcl1'
connect identifier is 'orcl1';
This MUST be done from DGMGRL utility while connected to
the primary database.
If you try to create configuration while connected to standby
database, the following error occurs:
Error: ORA-16584: operation cannot be performed
on a standby database
4.
Add
the standby DB to configuration
ADD
database 'orcl2' as
connect
identifier is 'orcl2';
adds
the standby db.
5. Show configuration
DGMGRL>
show configuration
Configuration
- dg_config
Protection Mode: MaxPerformance
Databases:
orcl1 - Primary database
orcl2 - Physical standby database
Fast-Start
Failover: DISABLED
Configuration
Status:
DISABLED
6.
Enable
configuration
DGMGRL> show
configuration
From here onwards, the DG BROKER takes over the
management of the data guard environment.
This is evident from the following message in the alert
log itself.
ALTER SYSTEM SET dg_broker_start=TRUE SCOPE=BOTH;
Tue Mar 11 23:20:31 2014
DMON started with pid=27, OS id=5400
Starting Data Guard Broker (DMON)
Tue Mar 11 23:20:42 2014
INSV started with pid=28, OS id=5409
Tue Mar 11 23:33:23 2014
NSV0 started with pid=30, OS id=5606
Tue Mar 11 23:33:27 2014
RSM0 started with pid=31, OS id=5615
ALTER SYSTEM SET log_archive_trace=0 SCOPE=BOTH
SID='orcl2';
ALTER SYSTEM SET
log_archive_format='%t_%s_%r.dbf' SCOPE=SPFILE SID='orcl2';
ALTER SYSTEM SET standby_file_management='MANUAL'
SCOPE=BOTH SID='*';
ALTER SYSTEM SET archive_lag_target=0 SCOPE=BOTH
SID='*';
ALTER SYSTEM SET log_archive_max_processes=4
SCOPE=BOTH SID='*';
ALTER SYSTEM SET log_archive_min_succeed_dest=1
SCOPE=BOTH SID='*';
ALTER SYSTEM SET
db_file_name_convert='orcl1','orcl2' SCOPE=SPFILE;
ALTER SYSTEM SET
log_file_name_convert='orcl1','orcl2' SCOPE=SPFILE;
ALTER SYSTEM SET fal_server='orcl1' SCOPE=BOTH;
ALTER DATABASE RECOVER MANAGED STANDBY
DATABASE THROUGH ALL SWITCHOVER
DISCONNECT USING CURRENT LOGFILE
Attempt to start background Managed Standby
Recovery process (orcl2)
Tue Mar 11 23:33:32 2014
MRP0 started with pid=32, OS id=5620
MRP0: Background Managed Standby Recovery process
started (orcl2)
started
logmerger process
Tue Mar 11 23:33:37 2014
Managed Standby Recovery starting Real Time Apply
Parallel Media Recovery started with 2 slaves
Waiting for all non-current ORLs to be
archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 58
(in transit)
Recovery of Online Redo Log: Thread 1 Group 6 Seq
58 Reading mem 0
Mem# 0:
/u01/app/oracle/oradata/orcl2/srl06.log
Tue Mar 11 23:33:38 2014
Completed: ALTER DATABASE RECOVER MANAGED STANDBY
DATABASE THROUGH ALL SWITCHOVER
DISCONNECT USING CURRENT LOGFILE
No comments:
Post a Comment