Friday, September 22, 2006

Oracle 10g Higher Availability using Data Guard

One of the biggest responsibilities for a DBA is to provide 100% availability and reduce unplanned downtime for a database & Oracle Data Guard is one of the most effective and comprehensive data availability, data protection and disaster recovery solutions available today .

Overview :
The database size is increasing dramatically every day and our critical business information system requires 24x7 uptime specially in an unplanned downtime when we can loose Data or it might get corrupted & it may take hours, even days to restore such a database. To minimize downtime and avoid data loss, we need a standby database that can take the role of the primary database in a timely fashion & here come the data guard in picture where Data Guard maintains these standby databases as transactionally consistent copies of the production database.

In short Oracle Data Guard is the management, monitoring, and automation software infrastructure that creates, maintains, and monitors one or more standby databases to protect enterprise data from failures, disasters, errors, and corruptions.


Data Guard Functional Components:
So here we will discuss what is needed to get the data guard working ....

dataguard:

a) Data Guard Config -A Data Guard configuration consists of one production (or primary) database and up to nine standby databases.

b)Redo Apply and SQL Apply - As Standbys are created from primary , we need the technology to make them at par with the primary by applying Redo to standby.

Data Guard provides two methods to apply this redo data to the standby database :

* Redo Apply, used for physical standby databases
* SQL Apply, used for logical standby databases

c)Role Management-Using Data Guard, the role of a database can be switched from a primary role to a standby role and vice versa, ensuring no data loss in the process, and minimizing downtime. There are two kinds of role transitions - a switchover and a failover.

Switchover - This is used for planned maintaince specially for patching & upgrades .

Failover
- Is disaster recovery measure which comes in picture when Primary node is down .


d)Types of standby - there are 2 kinds of stanby data bases :

Physical Standby - this is a replica of primary database on Block-by-block basis.The database schema, including indexes, are the same.

Logical Standby - It has the same logical information as primary , but can be used as a seprate database for reporting etc .


e)Data Guard Protection Modes

Maximum Protection- this is also called no-data-loss mode as here no commit of transaction is done unless teh redo is shipped & applied to atleast one of the standby .But the issue here is that if standby becomes unavailable , primary shuts down .

Maximum Availability - the only diffenece this has from maximum performace mode is that it does not shut down the db when standby is down , it waits for standby to get up & running and then resync it with primary .

Maximum Performance- Archiver is used for this to ship the logs , thus the performance is more .The commit operation of the primary database does not wait for the standby database to acknowledge receipt .


f)Data Guard Broker
The Oracle Data Guard Broker is a distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations.

No comments: