oracle11g使用DGMGRL为Dataguard创建BrokerConfiguration
Steps to Create a Broker Configuration for Dataguard by using
DGMGRL command
Environment for testing:
OS: Oracle Linux Server release 6.4
Linux primary 2.6.39-400.17.1.el6uek.i686 #1 SMP Fri Feb 22
18:17:46 PST 2013 i686 i686 i386 GNU/Linux
Linux pstb01 2.6.39-400.17.1.el6uek.i686 #1 SMP Fri Feb 22
18:17:46 PST 2013 i686 i686 i386 GNU/Linux
Database: Oracle Database 11.2.0.4
1. Set initialization parameters for the primary and standby
database
SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE;
2. Defining the Broker Configuration and the Primary Database
Profile
[oracle@primary ~]$ dgmgrl
DGMGRL> CONNECT sys/oracle@jason
DGMGRL> CREATE CONFIGURATION 'dg_01'
AS
PRIMARY DATABASE IS jason
CONNECT IDENTIFIER IS
jason;
DGMGRL> SHOW CONFIGURATION VERBOSE
3. Adding a Standby Database to the Configuration
DGMGRL> ADD DATABASE pstb01 AS
CONNECT IDENTIFIER IS pstb01;
DGMGRL> SHOW CONFIGURATION VERBOSE
4. Enabling the Configuration
DGMGRL> ENABLE CONFIGURATION;
DGMGRL> SHOW CONFIGURATION
Configuration - dg_01
Protection Mode: MaxPerformance
Databases:
jason - Primary database
pstb01 - Physical
standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
5. Enable the FAST_START FAILOVER in the broker
configuration:
5.1 Set the LogXptMode parameter value to async
DGMGRL> EDIT DATABASE pstb01
SET PROPERTY LogXptMode='async';
Property "logxptmode" updated
DGMGRL> EDIT DATABASE jason
SET PROPERTY LogXptMode='async';
5.2 Enable FLASHBACK for the primary and the standby
database
Execute on the primary database
SQL> ALTER DATABASE FLASHBACK ON;
Execute on the standby database
SQL> STARTUP MOUNT
SQL> ALTER DATABASE FLASHBACK ON;
SQL> ALTER DATABASE OPEN READ ONLY;
5.3 Enable the FAST_START FAILOVER
Execute on the primary database
DGMGRL> ENABLE FAST_START FAILOVER;
Execute on the standby database
DGMGRL> ENABLE FAST_START FAILOVER;
6. Start and stop the fast-start failover observer
DGMGRL> START OBSERVER
FILE='/u01/app/oracle/product/11.2.0/db_1/dbs/observer.log';
DGMGRL> STOP OBSERVER;
!!The End!!