The Data Guard broker is a distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations. You can use either the Oracle Enterprise Manager graphical user interface (GUI) or command-line interface (CLI) to automate and simplify:
BROKER CONFIGURATION: On both Primary and Standby sites, change the initialization parameter in the spfile to enable the Data guard broker. SQL> Alter system set dg_broker_start=True scope=both; System Altered. On the PRIMARY site, open the ‘cmd’ and start Command Line Interface (CLI) of the Dataguard Broker (DGMGRL). C:\> dgmgrl DGMGRL for 32-bit Windows: Version 10.2.0.1.0 - Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL>_ Now connect to the database through the service you made previously. DGMGRL> connect sys/oracle@to_primary Connected. Create broker configuration. DGMGRL> create configuration ‘broker1’ as > primary database is ‘primary’ > connect identifier is to_primary; (‘to_primary’ in Connect identifier is the service name through which the broker is connected to the PRIMARY database) Add Standby Database to the above configuration. DGMGRL> Add database ‘standby’ as > connect identifier is to_standby > maintained as physical; (‘to_standby’ in Connect identifier is the service name through which the broker is connected to the STANDBY database) Now the configuration has been set up but it is still disabled. You can view the configuration by executing: DGMGRL> show configuration Configuration Name: broker1 Enabled: NO Protection Mode: MaxPerformance Fast-Start Failover: DISABLE Databases: primary - Physical standby database standby - Primary database Current status for "broker1": DISABLE The next step is to ENABLE the configuration ‘broker1’. DGMGRL> enable configuration; Enabled Again view the configuration. DGMGRL> show configuration Configuration Name: broker1 Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLE Databases: primary - Physical standby database standby - Primary database Current status for "broker1": SUCCESS [edit] Switchover: Now we are ready to switch over the PRIMARY database Role to STANDBY database Role. DGMGRL> switchover to ‘Standby’; ….. ….. Primary Database Successfully converted to Physical Standby. You can again switch over the Standby Database to Primary by executing following command. DGMGRL> switchover to ‘Primary’; ….. ….. Standby Database is successfully converted to Primary Database. Failover: Failover can be done through the same configuration without any alteration. You simply need to execute following command: DGMGRL> failover to ‘Standby’; …. Failover to standby succeeded. And also… DGMGRL> failover to ‘Primary’; …. Failover to primary succeeded. |
DBA's Home Page - A website for Oracle, Greenplum and PostgreSQL DBA's > DBA's Forum, Routine Tasks and Activities >