Professional Documents
Culture Documents
Oracle Datagurard Broker Session 3
Oracle Datagurard Broker Session 3
Oracle Datagurard Broker Session 3
Hariprasath.R
Training Objective
Introduction to Oracle Data Guard
Oracle Data Guard Broker: Overview
Creating a Data Guard Broker Configuration
Configuring Data Protection Modes
Performing Role Transitions
Using Flashback Database in a Data Guard Configuration
Enabling Fast-Start Failover
Managing Client Connectivity
Monitoring a Data Guard Configuration
Optimizing a Data Guard Configuration
Outcome expected
Purely understanding real time environment by having
training in realistic way of dealing issues.
Use Data Guard standby databases to support production
functions such as reporting, querying, testing, and
performing backups
Create and manage physical and logical standby databases
Use Enterprise Manager Grid Control and the Data Guard
command-line interface (DGMGRL) to maintain a Data
Guard configuration
Use Data Guard to achieve a highly available Oracle
database
OVERVIEW
Switchover
Planned failover to standby database
Original primary becomes new standby
Original standby becomes new primary
No data loss
Can switchback at any time
Failover
Unplanned failover to standby database
Original standby becomes new primary
Original primary may need to be rebuilt
Possible data loss
Data Guard Switchover
Before Switchover After Switchover
Databas
Data Guard Broker
Integrated with CRS so that database role changes occur smoothly and
seamlessly.
LGWR : The log writer process flushes log buffers from the SGA to Online
Redo Log files.
LNS : The LogWriter Network Service (LNS) reads the redo being flushed
from the redo:buffers by the LGWR and sends the redo over network to
the standby database. The
main purpose of the LNS process is to free up the LGWR process from
performing the redo transport role.
ARCH : The archiver processes archives the ORL files to archive log files.
Up to 30 ARCH processes can exist, and these ARCH processes are also
used to fulfill gap resolution requests. Note that one ARCH process has a
special role in that it is dedicated to local redo log archiving only and
never communicates with a standby database.
Physical Standby Database Related Processes
ARCH : The archive processes on the standby site perform the same
functions performed on the primary site, except that on the standby
site, an ARCH process generates archived log files from the SRLs.
RSM process comes in play whenever broker need to run any SQL
command in the database.
SQL may be required to be run during Data Guard setup or because
of result of a change to the configuration made through DGMGRL
Data Guard Broker Related Processes
DRCn
NSV processes contact DRC process running on other node to establish the
connection, so DRC process acts like a receiver on other node.
Each NSV process will have a partner DRC process on the target database,
which will perform the actual work on behalf of the source database NSV
process and return the results or status.
Data Guard Broker Related Processes
DG_BROKER_CONFIG_FILE1
DG_BROKER_CONFIG_FILE2
For RAC instances, you need to keep the files in shared location where all
database instances can access it.
Broker keeps in sync all of these configuration files but DMON process
running on the primary database is the owner of the master copy of the files.
This means that if you started the standby database while Data guard process
are down at primary node, then no data guard related activities will be done
until the standby database can connect to the primary database
Data Guard Fast Start Failover
Observer
Primary Standby
Node 1 Node 2
Site3
Database Database
Site1 Site2
Data Guard Fast Start Failover
Requirements include
Flashback logging must be configured
DGMGRL must be used
Observer process running in third independent site
Highly available in Oracle 11.1 and above
MAXIMUM AVAILABILITY protection mode
Standby database archive log destination must be configured
as LGWR SYNC
MAXIMUM PERFORMANCE protection mode
Oracle 11.1 and above
Primary database can potentially be reinstated automatically
Using flashback logs
Data Guard Advantages & Disadvantages
Advantages
No interconnect network required between sites
No storage network required between sites
RAC licences not required if each site is a single-instance
Disadvantages
Active / Passive
Requires Enterprise Edition licence
Remaining infrastructure must also failover
Network
Application tier
Clients
Implementation notes
Step:1
select message from v$dataguard_status;
select switchover_status from v$database;
Step:2
Primary Side
show configuration verbose
Step:3
switchover to Stand;
Step:4
show configuration verbose
Step:5
Original Primary DB need to be restarted as below
shutdown immediate;
startup mount
Switchover to Standby
Step:6
Start the apply process
alter database recover managed standby database cancel;
ALTER DATABASE OPEN READ ONLY;
alter database recover managed standby database using current logfile
disconnect;
Step:7
Verify Current Status
DGMGRL> show configuration
Failover to Standby
Step:1
The databases must be in flashback mode for the reinstate to work.
Step:2
select message from v$dataguard_status;
select switchover_status from v$database;
Step:3
show configuration;
Step:4
failover to stand;
Failover to Standby
At this point, you should have your former physical standby database
orcl2 running fully as your primary database server.
Step:5
DGMGRL> reinstate database prime;
Step:6
show configuration;
Physical Standby Data Guard useful SQL
scripts
Basic information of database (primary or standby)
Select Database_role, Db_unique_name Instance, Open_mode, Protection_mode,
Protection_level, Switchover_status From V$database;