Professional Documents
Culture Documents
Author: Muhammad Aamir Creation date: 07th January, 2011 Doc version: 1.0
Change Control:
Change Record Date Author Version Change Reference
07/01/2011
Muhammad Amir
1.0
Document Created
1. Introduction
This document is intended to serve as definitive reference of Oracle Data Guard technology and concepts, and helps you configure and implement physical standby databases. Oracle Data Guard is the most effective solution available today to protect the core asset of any enterpriseits data, and make it available on a 24x7 basis even in the face of disasters and other calamities.
2. Concepts
A Data Guard configuration consists of one production database and one or more standby databases. The databases in a Data Guard configuration are connected by Oracle Net and may be dispersed geographically. There are no restrictions on where the databases are located, provided they can communicate with each other. Figure 1 shows a typical Data Guard Configuration that contain primary database that transmit redo data to standby database The following data guard services manages the transmission of redo data, the application of redo data, and changes to the database role - Redo transport services Control the automated transfer of redo data from the production database to one or more archival destinations. - Apply services Apply redo data on the standby database to maintain transactional synchronization with the primary databases. Redo can be applied either from archival redo log files or if real time apply is enabled, directly from standby redo log files - Role transition This service changes the role of a database from standby database to primary or from primary database to standby database using either a switchover or failover operations. You can use to manage Data Guard using the SQL command-line interfaces or the Data Guard broker interfaces, including a command-line interface (DGMGRL) and a graphical user interface that is integrated in Oracle Enterprise Manager
Figure 1 : Typical Data Guard Configuration
Page 2 of 20
b.) Add standby log files on primary database (it is recommended to create standby redo logs on primary database to make things easier during switchover and failover), standby log files are required to store redo received from primary database, and must have at least one more redo log group than the redo log on the primary database. Muhammad Aamir Copyrights reserved Page 3 of 20
c.) Set the log_archive_config parameter, this parameter enables the full data Guard functionality and it contains the db_unique_name of each database in the configuration.
d.) Set the log_archive_dest_2 parameter to specify the destination of the remote physical standby machine where it transmits the redo data.
e.) Set standby_file_management parameter, its made changes automatically into standby database when data files are added or dropped from the primary database
Page 4 of 20
Page 5 of 20
Oracle Dataguard Concepts V1.0 i.) Copy tnsnames.ora to standby database using OS utility
Note: At this stage all the preparation of primary site was done now prepare standby machine
Page 6 of 20
Oracle Dataguard Concepts V1.0 d.) Create dummy init parameter file to start the instance on primary side
Note: At this stage all the preparation of standby site was done now we are going to run the script on primary database which will configure standby server automatically
Page 7 of 20
b.) Run RMAN and connect to the primary database and make an auxiliary connection to the standby database
c.) Run RMAN and connect to the primary database and make and auxiliary connection to the standby database
Page 8 of 20
Note: at the end of the script you see the finished successfully which means your standby server is ready d.) Now you need to run the following command on STANDBY NODE to start redo Apply services
b.) Now at this stage your database is configured for data guard
Page 9 of 20
Oracle Dataguard Concepts V1.0 c.) To Use the Data guard as an active data guard restart the database and run the recovery command as mention below. Make sure the sequence of shutdown is proper, you must shutdown primary first and then standby and then start standby first and then primary database.
Note: Make sure the database startup and shutdown sequence is right.
Page 10 of 20
b.) Issue the following SQL Statement to start the switchover on the primary database
Note: at this stage in a switchover process the original primary database is a physical standby database
Page 11 of 20
d.) Now verify that the switchover target is ready to be switched to the primary role, run the query on standby database
e.) Switch the target physical standby database role to the primary role.
g.) Verify the status of database on old standby or new primary, the role become change now.
h.) Now Start the Redo Apply services on new standby site
Page 12 of 20
b.) Verify the archive log gaps make sure no gaps found.
d.) This statement convert the standby database to the primary role
e.) If your database is not open in read only mode run the following to open the database.
Page 13 of 20
g.) Verify the role of the database. Now your database is ready for primary role
Page 14 of 20
b.) Create the services with a specific name must be statically registered with the local listener on both side primary and database that include the <db_unique_name>_DGMGRL.<db_domain> values for the GLOBAL_DBNAME. This setting allows DGMGRL to restart instances during the course of broker operations. Reload the listener and verify the status of services Primary site Listener.ora
Page 15 of 20
c.) Restart the listener on both side and make sure that the services registered properly.
d.) Invoke the DGMGRL to create dataguard configuration and connect with primary database
Page 16 of 20
Oracle Dataguard Concepts V1.0 Note: you must connect with primary database when you are configuring broker and if you connecting remotely you must specify primary connection string e.) Creating the broker configuration for the primary database
g.) Use the SHOW CONFIGURATION command to verify that the stby database was added to the configuration
Page 17 of 20
Page 18 of 20
Page 19 of 20
6. References
Following are the reference http://wiki.oracle.com/page/Data+Guard+Architecture http://www.oracle.com/technetwork/tutorials/index.html
Page 20 of 20