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

Standby database


It is possible to configure a standby database simply by copying, cloning, or restoring a primary database to a different server. Then the Data Guard configurations are made on the databases in order to start the transfer of redo information from primary to standby and also to start the apply process on the standby database.

Tip

Primary and standby databases may exist on the same server; however, this kind of configuration should only be used for testing. In a production environment, the primary and standby database servers are generally preferred to be on separate data centers.

Data Guard keeps the primary and standby databases synchronized by using redo information. As you may know, transactions on an Oracle database produce redo records. This redo information keeps all of the changes made to the database. The Oracle database first creates redo information in memory (redo log buffers). Then they're written into online redo logfiles, and when an online redo logfile is full, its content is written into an archived redo log.

Tip

An Oracle database can run in the ARCHIVELOG mode or the NOARCHIVELOG mode. In the ARCHIVELOG mode, online redo logfiles are written into archived redo logs and in the NOARCHIVELOG mode, redo logfiles are overwritten without being archived as they become full. In a Data Guard environment, the primary database must be in the ARCHIVELOG mode.

In Data Guard, transfer of the changed data from the primary to standby database is achieved by redo with no alternative. However, the apply process of the redo content to the standby database may vary. The different methods on the apply process reveal different type of standby databases.

There were two kinds of standby databases before Oracle database Version 11g, which were: physical standby database and logical standby database. Within Version 11g we should mention a third type of standby database which is snapshot standby. Let's look at the properties of these standby database types.

Physical standby database

The Physical standby database is a block-based copy of the primary database. In a physical standby environment, in addition to containing the same database objects and same data, the primary and standby databases are identical on a block-for-block basis. Physical standby databases use Redo Apply method to apply changes. Redo Apply uses Managed recovery process (MRP) in order to manage application of the change in information on redo.

In Version 11g, a physical standby database can be accessible in read-only mode while Redo Apply is working, which is called Active Data Guard. Using the Active Data Guard feature, we can offload report jobs from the primary to physical standby database.

Tip

Physical standby database is the only option that has no limitation on storage vendor or data types to keep a synchronized copy of the primary database.

Logical standby database

Logical standby database is a feature introduced in Version 9iR2. In this configuration, redo data is first converted into SQL statements and then applied to the standby database. This process is called SQL Apply. This method makes it possible to access the standby database permanently and allows read/write while the replication of data is active. Thus, you're also able to create database objects on the standby database that don't exist on the primary database. So a logical standby database can be used for many other purposes along with high availability and disaster recovery.

Due to the basics of SQL Apply, a logical standby database will contain the same data as the primary database but in a different structure on the disks.

One discouraging aspect of the logical standby database is the unsupported data types, objects, and DDLs. The following data types are not supported to be replicated in a logical standby environment:

  • BFILE

  • Collections (including VARRAYS and nested tables)

  • Multimedia data types (including Spatial, Image, and Oracle Text)

  • ROWID and UROWID

  • User-defined types

The logical standby database doesn't guarantee to contain all primary data because of the unsupported data types, objects, and DDLs. Also, SQL Apply consumes more hardware resources. Therefore, it certainly brings more performance issues and administrative complexities than Redo Apply.

Snapshot standby database

Principally, a snapshot standby database is a special condition of a physical standby database. Snapshot standby is a feature that is available with Oracle Database Version 11g. When you convert a Physical standby database into a snapshot standby database, it becomes accessible for read/write. You can run tests on this database and change the data. When you're finished with the snapshot standby database, it's possible to reverse all the changes made to the database and turn it back to a physical standby again.

An important point here is that a snapshot standby database can't run Redo Apply. Redo transfer continues but standby is not able to apply redo.