Posted by: Monish | May 24, 2008

Basic Data Guard Architecture

Primary and standby databases (database roles)

In a standby environment, one database is a primary database while all others are standby databases. Standby databases are either physical or logical standby databases.
Query the database_role column in v$database in order to find out the role of a database
A standby database environment is meant for disastrous failures. It protects the data even if a machine is wrecked beyond recognition. Therefore, it makes no sense to put a primary and a standby database on the same hardware.
A logical standby turns redo into inserts, updates and deletes, while a physical standby directly applies redo to its datafiles..

Primary database

In a standby environment, exactly one database is a primary database. All the other databases are standby databases.

Logical Standby Database

The logical standby database is new with Oracle 9iR2. The key advantage for logical standby databases is that they’re opened read/write, even while they’re in applied mode. That is, they can be used to generate reports and the like. It is indeed a fully functional database. Also, additional indexes, materialized views and so on can be created.

However (this being a disadvantage) not all datatypes are supported.

Oracle’s log apply services use the primary database’s redo log, transforms them into SQL statements and replays them on the logical standby database.

Physical standby database

A physical standby database is a byte for byte exact copy of the primary database. This also means that rowids stay the same in a physical standby database environment.

The log apply service uses the primary database’s redo log to recover the physical database.

A physical standby database might be opened read only, however, the received logs are in this case not applied. When the logs are applied, the database is not accessible (it is then in a managed recovery state).

Data Guard Architecture

Database Synchronization Options

Data Guard can be configured to run with varying synchronization modes indicating the potential for data loss:

Maximum Protection

Maximum protection ensures the highest level of data availability for the primary database. In maximum protection mode, redo log records are synchronously sent by LGWR to the standby database. Primary database changes are not committed until it has been confirmed that the data is available on at least one standby database.

Maximum Availability

Maximum availability provides the second highest level of data availability. As with its maximum reliability counterpart, redo data is synchronously transmitted from the primary database to the standby database by LGWR. The standby database may temporarily lag behind, or diverge, from the primary database without negatively impacting the production environment. If the standby database becomes unavailable for any reason, the protection mode is temporarily lowered to maximum performance until the problem has been corrected.

Maximum Performance

Maximum performance is the default protection mode. It offers lower data availability and higher performance than its counterparts.

Redo log data is asynchronously shipped to the standby database by either LGWR or ARCH. The commit operation on the primary database is not contingent upon the data being received by the standby server.

If all of the standby servers become unavailable, processing will continue on the primary database.

Data Guard Broker

Oracle’s Data Guard Broker is the management framework that is used to administer a Data Guard environment. An Oracle background server process called DMON is started on every site that is managed by the broker.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Categories

%d bloggers like this: