Book Image

Oracle Data Guard 11gR2 Administration : Beginner's Guide

Book Image

Oracle Data Guard 11gR2 Administration : Beginner's Guide

Overview of this book

Data Guard is the high availability, disaster recovery and data replication solution for Oracle Databases. With the huge growth of Data Guard it's getting harder to encounter an Oracle DBA not dealing with Data Guard. Since it's a common DBA task to provide high availability of databases, Data Guard is a must-know topic for every Oracle Database Administrator."Oracle Data Guard 11g R2 Beginner's Administration Guide" is a practical guide that provides all the information you will need to configure and maintain Data Guard. This book will show you what Data Guard can really do.By following the practical examples in this book, you'll learn to set up your Data Guard Broker, the management framework for Data Guard configurations. Learn and implement different data protection modes, perform role transitions between databases (switchover and failover) and configure Active Data Guard. Next, we will dive into the features of Snapshot Standby. The book progresses into looking at Data Guard configuration with other Oracle products (such as EM, RAC, and RMAN) and patch databases in Data Guard. The final chapters will cover commonly encountered Data Guard issues and Data Guard best practices, which are very important to make a Data Guard configuration perfect and take maximum advantage of Data Guard properties.
Table of Contents (19 chapters)
Oracle Data Guard 11gR2 Administration Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Pop Quiz Answers
Index

Oracle Data Guard evolution


It has been a long time that the Oracle Data Guard technology has been in the database administrator's life and it apparently evolved from the beginning until 11gR2. Let's look at this evolution closely through the different database versions.

Version 7.3 – stone age

The functionality of keeping a duplicate database in a separate server, which can be synchronized with the primary database, came with Oracle database Version 7.3 under the name of standby database. This standby database was constantly in recovery mode waiting for the archived redo logs to be synchronized. However, this feature was not able to automate the transfer of archived redo logs. Database administrators had to find a way to transfer archived redo logs and apply them to the standby server continuously. This was generally accomplished by a script running in the background.

The only aim of Version 7.3 of the standby database was disaster recovery. It was not possible to query the standby database or to open it for any purpose other than activating it in the event of failure of the primary database. Once the standby database was activated, it couldn't be returned to the standby recovery mode again.

Version 8i – first age

Oracle database Version 8i brought the much-awaited features to the standby database and made the archived log shipping and apply process automatic, which is now called managed standby environment and managed recovery, respectively. However, some users were choosing to apply the archived logs manually because it was not possible to set a delay in the managed recovery mode. This mode was bringing the risk of the accidental operations to reflect standby database quickly.

Along with the "managed" modes, 8i made it possible to open a standby database with the read-only option and allowed it to be used as a reporting database.

Even though there were new features that made the tool more manageable and practical, there were still serious deficiencies. For example, when we added a datafile or created a tablespace on the primary database, these changes were not being replicated to the standby database. Database administrators had to take care of this maintenance on the standby database. Also when we opened the primary database with resetlogs or restored a backup control file, we had to re-create the standby database.

Version 9i – middle age

First of all, with this version Oracle8i standby database was renamed to Oracle9i Data Guard. 9i Data Guard includes very important new features, which makes the product much more reliable and functional. The following features were included:

  • Oracle Data Guard Broker management framework, which is used to centralize and automate the configuration, monitoring, and management of Oracle Data Guard installations, was introduced with this version.

  • Zero data loss on failover was guaranteed as a configuration option.

  • Switchover was introduced, which made it possible to change the roles of primary and standby. This made it possible to accomplish a planned maintenance on the primary database with very less service outage.

  • Standby database administration became simpler because new datafiles on the primary database are created automatically on standby and if there are missing archived logs on standby, which is called gap; Data Guard detects and transmits the missing logs to standby automatically.

  • Delay option was added, which made it possible to configure a standby database that is always behind the primary in a specified time delay.

  • Parallel recovery increased recovery performance on the standby database.

In Version 9i Release 2, which was introduced in May 2002, one year after Release 1, there were again very important features announced. They are as follows:

  • Logical standby database was introduced, which we've mentioned earlier in this chapter

  • Three data protection modes were ready to use: Maximum Protection, Maximum Availability, and Maximum Performance, which offered more flexibility on configuration

  • The Cascade standby database feature made it possible to configure a second standby database, which receives its redo data from the first standby database

Version 10g – new age

The 10g version again introduced important features of Data Guard but we can say that it perhaps fell behind expectations because of the revolutionary changes in release 9i. The following new features were introduces in Version 10g:

  • One of the most important features of 10g was the Real-Time Apply. When running in Real-Time Apply mode, the standby database applies changes on the redo immediately after receiving it. Standby does not wait for the standby redo logfile to be archived. This provides faster switchover and failover.

  • Flashback database support was introduced, which made it unnecessary to configure a delay in the Data Guard configuration. Using flashback technology, it was possible to flash back a standby database to a point in time.

  • With 10g Data Guard, if we open a primary database with resetlogs it was not required to re-create the standby database. Standby was able to recover through resetlogs.

  • Version 10g made it possible to use logical standby databases in the database software rolling upgrades of the primary database. This method made it possible to lessen the service outage time by performing switchover to the logical standby database.

10g Release 2 also introduced new features to Data Guard, but these features again were not satisfactory enough to make a jump to the Data Guard technology. The two most important features were Fast-Start Failover and the use of Guaranteed restore point:

  • Fast-start failover automated and accelerated the failover operation when the primary database was lost. This option strengthened the disaster recovery role of Oracle Data Guard.

  • Guaranteed restore point was not actually a Data Guard feature. It was a database feature, which made it possible to revert a database to the moment that Guaranteed restore point was created, as long as there is sufficient disk space for the flashback logs. Using this feature following scenario became possible: Activate a physical standby database after stopping Redo Apply, use it for testing with read/write operations, then revert the changes, make it standby again and synchronize it with the primary. Using a standby database read/write was offering a great flexibility to users but the archived log shipping was not able to continue while the standby is read/write and this was causing data loss on the possible primary database failure.

Version 11g – modern age

Oracle database version 11g offered the expected jump in the Data Guard technology, especially with two new features, which are called Active Data Guard and snapshot standby. The following features were introduced:

  • Active Data Guard has been a milestone in Data Guard history, which enables a query from a physical standby database while the media recovery is active.

  • Snapshot standby is a feature to use a physical standby database read/write for test purposes. As we mentioned, this was possible with 10gR2 Guaranteed restore point feature but 11g provided the continuous archived log shipping in the time period that standby is read/write with snapshot standby.

  • It has been possible to compress redo traffic in a Data Guard configuration, which is useful in excessive redo generation rates and resolving gaps. Compression of redo when resolving gaps was introduced in 11gR1 and compression of all redo data was introduced in 11gR2.

  • Use of the physical standby databases for the rolling upgrades of database software was enabled, aka Transient Logical Standby.

  • It became possible to include different operating systems in a Data Guard configuration such as Windows and Linux.

  • Lost-write, which is a serious data corruption type arising from the misinformation of storage subsystem on completing the write of a block, can be detected in an 11g Data Guard configuration. Recovery is automatically stopped in such a case.

  • RMAN fast incremental backup feature "Block Change Tracking" can be run on an Active Data Guard enabled standby database.

  • Another very important enhancement in 11g was Automatic Block Corruption Repair feature that was introduced with 11gR2. With this feature, a corrupted data block in the primary database can be automatically replaced with an uncorrupted copy from a physical standby database in Active Data Guard mode and vice versa.

We've gone through the evolution of Oracle Data Guard from its beginning until today. As you may notice, Data Guard started its life as a very simple database property revealed to keep a synchronized database copy with a lot of manual work and now it's a complicated tool with advanced automation, precaution, and monitoring features. Now let's move on with the architecture and components of Oracle Data Guard 11gR2.