You are on page 1of 18

Oracle DataGuard Broker Configuration With Oracle 11gR2

Version 1.0

News International News International Sandeep kumar Singh .

The Data Guard Broker Observer is located on this server  Oracle Database 11g R2  ssh is configured for user oracle on both nodes  Oracle Home is on identical path on both nodes  Primary database DB1_WA  Standby database DB1_PB An Over view The walkthrough begins with a single database that will become the primary of a Data Guard configuration. the Primary and Standby databases are located on these servers. FSFO can also be used with logical standbys and an FSFO-enabled configuration may have multiple standbys with a mix of physical and logical. Names used in the examples: Database name Database unique names DB1_WB Domain name mydomain.  1 SUSE Linux Enterprise Server 10 (x86_64) . For this build. but only one standby can be the failover target at any given time.com unixpgtest3(primary node) Hostnames unixpgtest1(standby node) DB1 DB1_WA uniwaoradbr01 (observer) DB1PRIMARY TNS aliases DB1STANDBY . we will use a single physical standby database.Hardware and Software Enviroment  2 Linux servers. Conventions used Database hosts are referred to as “unixpgtest1" and “unixpgtest3" hosts and the databases themselves are referred to as the "DB1_WA" and "DB1_PB" databases. SUSE Linux Enterprise Server 10 (x86_64).

Configure Oracle Net Data Guard uses Oracle Net (SQL*Net) for communication between the primary and standby databases and the FSFO observer. Login ID Used sys/***** as sysdba Take a full backup of Database (RMAN/Cold Backup) 3.com) . 2.ora configuration for host " unixpgtest3 (primary node)": SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = DB1) (ORACLE_HOME = /u01/app/oracle/product/11. Improper Oracle Net configuration is a leading cause of reported FSFO issues Configure listeners 4.mydomain.ORACLE DATA GUARD BROKER CONFIGURATIO PLAN Oracle Data guard Broker Configuration This task related to Oracle 11g Dataguard Broker Configuration with observer in Unix/Linux Environment Task Name: Short Description Step by Step Implementation of Data Guard Broker 1.2. Log on to the Production server using the administrative ID. Getting the Oracle Net configuration right is one of the key factors in a successful FSFO deployment. listener.0/dbhome) (SID_NAME = DB1) ) (SID_DESC = (SID_NAME = DB1) (GLOBAL_DBNAME = DB1_WA_DGMGRL.

0/dbhome_1) (SID_NAME = DB1) ) (SID_DESC = (SID_NAME=DB1) (GLOBAL_DBNAME = DB1_PB_DGMGRL.ora configuration for host " unixpgtest1(standby node)": SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = DB1) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.newsint)(PORT = 1521)) ) ADR_BASE_LISTENER = /u01/app/oracle 5.com) (ORACLE_HOME =/u01/app/oracle/product/11.2.0/dbhome_1) ) ) LISTENER = (DESCRIPTION = .ds. listener.mydomain.(ORACLE_HOME = /u01/app/oracle/product/11.2.

newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1PRIMARY = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.ds.ds.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1_WA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.2.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1_PB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.ds.ora # Generated by Oracle configuration tools.com) ) ) DB1STANDBY = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.newsint)(PORT = 1521)) ) ADR_BASE_LISTENER = /u01/app/oracle 6. TNSNAMES configuration for host " unixpgtest3 (primary node)": # tnsnames.newsint)(PORT = 1521)) .newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1_WA_DGMGRL.ora Network Configuration File: /u01/app/oracle/product/11. DB1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.(ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.0/dbhome/network/admin/tnsnames.ds.mydomain.ds.ds.

com) ) ) DB1STANDBY = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.mydomain.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1_WA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1PRIMARY = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest3.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1) ) ) DB1_PB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.ds.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1_PB_DGMGRL. DB1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = unixpgtest1.mydomain.ds.ora Network Configuration File: /u01/app/oracle/product/11.ds.com) ) ) .ds.ora # Generated by Oracle configuration tools. TNSNAMES configuration for host " unixpgtest1(standby node)": # tnsnames.2.) (CONNECT_DATA = (SERVICE_NAME = DB1_PB_DGMGRL.newsint)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB1_WA_DGMGRL.mydomain.com) ) 7.ds.0/dbhome_1/network/admin/tnsnames.

8. Test the Oracle Net connections Verify the configuration from both hosts. Start the listener Start the listener on both " unixpgtest1" and " unixpgtest3" hosts. lsnrctl start LISTENER 9. .

ds. The default destination can be modified using the parameters DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 On Primary: On Standby: .10.newsint)(port=1521)(protocol=tcp))'. 11. Setup the Local_Listener parameter on both the Primary and Standby databases SQL> alter system set local_listener='(address=(host=unixpgtest1. System altered. System altered. SQL> alter system set local_listener='(address=(host=unixpgtest3.ds. Setup the Broker configuration : The broker configuration files are automatically created when the broker is started using ALTER SYSTEM SET DG_BROKER_START=TRUE.newsint)(port=1521)(protocol=tcp))'.

Creating DGMGRL Configuration Add the standby to the configuration and check it DGMGRL> ADD DATABASE DB1_PB AS CONNECT IDENTIFIER IS DB1STANDBY MAINTAINED AS PHYSICAL.12. 13. . Show the configuration information.

DGMGRL> show configuration. Enabling the configuration and databases DGMGRL> enable configuration. Then Show the details : . Enabled.Show Database Configuration for both nodes : 14.

On Primary: . SQL >ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 ‘/u01/DB1/standby03.log’ SIZE 50M. Enable Flashback Database on the Primary and Standby databases. Adding standby redo logs on all databases On Primary : SQL >ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ‘/u01/DB1/standby01. SQL >ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ‘/u01/DB1/standby02.15. Verify 16.log’ SIZE 50M.log’ SIZE 50M.

.On Standby : Sql> shu immediate: Sql>startup mount.

Broker will verify that the configuration meets all prerequisites before enabling FSFO and will report any problems it finds. Edit Database Properties LogXptMode Broker will set the primary to use asynchronous log transport by default. Enable Fast-Start Failover This is a good time to enable FSFO to make sure that all of the prerequisites have been met. DGMGRL> EDIT DATABASE Property "LogXptMode" DGMGRL> EDIT DATABASE Property "LogXptMode" DB1_WA SET PROPERTY 'LogXptMode'='SYNC'.17. These commands will succeed only if database is configured with standby redo logs. change this to synchronous. The most common problems are mismatched Data Guard protection modes and LogXptMode properties and forgetting to enable Flashback Database on the primary or standby. updated 18. Specify the FastStartFailoverTarget property Enable Fast-Start Failover . updated DB1_PB SET PROPERTY 'LogXptMode'='SYNC'. For Maximum Availability environments.

allowing the it to be placed practically anywhere a reliable connection is available.Now Check : 19. Since the observer is a specialized instance of a dgmgrl session. standby. Verify connectivity to the primary and standby from Third Node (UNIWAORADBR01-observer ) . Configure the Observer To maximize the benefits of FSFO. Unlike the primary / standby interconnect. The observer is very lightweight. requiring few system resources. Ideally the primary. where bandwidth and latency are determining performance factors. the observer requires very little network bandwidth and is not overly latency sensitive. the observer host should be installed with either the Oracle Client Administrator software or the full Oracle Database software stack. the observer should run on a different host than the primary and standby databases. and observer will be in geographically separate areas.

Start the observer Start the observer from a third server Now Verify The Complete Configuration .20.

We'll start with switchovers. Without the credentials. Perform a Switchover Check the configuration First before switchover. Broker needs SYSDBA credentials in order to restart one or both databases.Testing the Configuration The real test of the configuration is a successful role transition in both directions with both switchover and FSFO failover. 1. but will leave the databases in need of a manual restart. Test switchover in both directions In order to fully automate switchover. Connect to DGMGRL on the observer server: . Broker will complete the role transition.

10.Now Check Database Role : 8. 9. Verify the Installation by Using the Command : Select Server property(‘product version’) . Click Finish. Click Next.