In the following posts we will discuss about Oracle Dataguard concepts and implementation.
Introduction to Oracle Dataguard
1. Oracle Data Guard ensures high availability, data protection,and disaster recovery for enterprise data.
2. A Dataguard configuration consists of one primary database and one or more standby database.The standby databases will be always in sync with primary database. If primary production database is unavailable due to planned or unplanned outage , then we can switch the production to standby database, making the application less affected by the outage.
3. Apart from this we can use the standby database for taking backups and reporting queries, there by reducing some workload from production.
Types of standby setup
PHYSICAL STANDBY
1. A physical standby database is an exact, block-for-block copy of a primary database.
2. A physical standby is maintained as an exact copy through a process called REDO APPLY, in which redo data received from a primary database is continuously applied to a physical standby database using the database recovery mechanisms. So it will be always in sync with primary.
3. This Standby database can be opened in read only mode( known as ACTIVE DATA GUARD), for reporting purpose.
LOGICAL STANDBY
- The logical standby database is kept synchronized with the primary database through SQL APPLY, which transforms the data in the redo received from the primary database into SQL statements and then executes the SQL statements on the standby database.
- So it contains same logical information as that of production , but physical structure of data can be different.
- We can use logical standby database for query and reporting purpose along with data protection. Also you have to facility to upgrade oracle database software and patch sets along with data protection with help of logical standby database.
SNAPSHOT STANDBY
- With Oracle 11g release 1 , a new type of standby database introduced : a snapshot standby where physical standby database will be opened in read-write mode temporarily.
- When a physical standby is converted into a snapshot standby , an implicit guaranteed restore point is created for the standby database. Flashback database is used to facilitate this functionality.
- When it is in snapshot standby mode , it still receives all redo data applied to primary but that will not be applied to standby but it is archived into the archivelogs at the standby database.
- And when it is converted back to a physical standby , all changes we have made to snapshot standby while it was in read-write mode are discarded and all archive logs will applied from the restore point ,making physical standby database transactionally consistent with primary database.
- Snapshot standby database is usable with application load testing tools, such as Real Application Testing, to ensure proper application functionality and performance,prior to application upgrades take place on the production system and for troubleshooting application-related issues that are dependent on production data sets.
Types of Data Guard Services
Basically we can categorize physical standby database into three major components:
1) Data Guard Redo Transport Services
To transfer the redo that is generated by the primary database to the standby database.
2) Data Guard Apply Services
To receive and apply the redo sent by Redo Transport Services to the standby database.
3) Data Guard Role Management Services
To assist in the database role changes in switchover and failover scenarios. This service works in the background and takes care of switchover/failover scenarios
In the next article, we see about DATAGUARD ARCHITECTURE