Getting Started With Data Guard

Oracle Data Guard is one of the software solutions provided by Oracle Corporation to maximize high availability of Oracle databases. Oracle Data Guard maintains one or many secondary databases as alternatives to the primary production database.

Standby database is nothing but transactionally equally copy of primary database.A standby database is initially created from a backup copy of the primary database.Once created, Data Guard automatically maintains the standby database as a transactional consistent copy of the primary database by transmitting primary database redo data to the standby system and then applying the redo logs to the standby database.

Data Guard provides two methods to apply this redo data to the standby database and keep it transactional consistent with the primary,and these methods correspond to the two types of standby databases supported by Data Guard.

Physical Standby: When the primary database transactions generate redo entries, a redo apply process keeps up the secondary databases with the exact block copies of the primary database.

Logical Standby: SQL apply processes read the redo and convert it to SQL transactions. These are then applied to the secondary database.

 

Architecture

The Oracle  Data Guard architecture incorporates the following items:

  • Primary Database – A production database that is used to create standby databases. The archive logs from the primary database are transfered and applied to standby databases. Each standby can only be associated with a single primary database, but a single primary database can be associated with multiple standby databases.
  • Standby Database – A replica of the primary database.
  • Log Transport Services – Control the automatic transfer of archive redo log files from the primary database to one or more standby destinations.
  • Network Configuration – The primary database is connected to one or more standby databases using Oracle Net.
  • Log Apply Services – Apply the archived redo logs to the standby database. The Managed Recovery Process (MRP) actually does the work of maintaining and applying the archived redo logs.
  • Role Management Services – Control the changing of database roles from primary to standby. The services include switchover, switchback and failover.
  • Data Guard Broker – Controls the creation and monitoring of Data Guard. It comes with a GUI and command line interface.

The services required on the primary database are:

  • Log Writer Process (LGWR) – Collects redo information and updates the online redo logs. It can also create local archived redo logs and transmit online redo to standby databases.
  • Archiver Process (ARCn) – One or more archiver processes make copies of online redo logs either locally or remotely for standby databases.
  • Fetch Archive Log (FAL) Server – Services requests for archive redo logs from FAL clients running on multiple standby databases. Multiple FAL servers can be run on a primary database, one for each FAL request. .

The services required on the standby database are:

  • Fetch Archive Log (FAL) Client – Pulls archived redo log files from the primary site. Initiates transfer of archived redo logs when it detects a gap sequence.
  • Remote File Server (RFS) – Receives archived and/or standby redo logs from the primary database.
  • Archiver (ARCn) Processes – Archives the standby redo logs applied by the managed recovery process (MRP).
  • Managed Recovery Process (MRP) – Applies archive redo log information to the standby database.

 

Data Guard Modes

Oracle Data Guard can operate in 3 different modes:

  • Maximum Protection: Transactions are not allowed to commit until all redo data are written to the online redo logs and propagated to at least one synchronized secondary database. If for any reason, the primary database cannot propagate its redo stream to one secondary database, the primary will shutdown to ensure maximum protection mode.
  • Maximum Performance: Transactions are not allowed to commit as soon as the redo are written to the online redo logs. The redo stream is asynchronously propagated to the secondary databases to ensure maximum performance mode.
  • Maximum Availability: Transactions are not allowed to commit until all redo data are written to the online redo logs and propagated to at least one synchronized secondary database. If for any reason, the primary database cannot propagate its redo stream to one secondary database, the primary will NOT shutdown and operates as it it were in maximum performance mode until issues are fixed.

 

 

 

 

 

 

Leave a comment