In previous article , we have seen basics about Oracle Dataguard ORACLE DATAGUARD. In this article we will see oracle dataguard architecture in depth.

Let us understand above diagram with example. Let us assume our primary database is in Delhi, India and standby database is in Bangalore , India.

When we have just primary database , it fills log buffer , whenever any changes are made to the database and LGWR[log writer] process does it works and writes to online redo log files. When log switch occurs ARCn process awakes and content of online redo log files will be flushed to Archive redo log files.

Now , how it works with Standby database configured ?

  1. LNS process of primary database captures redo from redo log buffer.
  2. Send it to RFS process of standby database through oracle net.
  3. RFS process then writes that redo information to standby redo log files.
  4. If LNS process is not fast enough to capture  redo information before it goes to online redo log files or if redo data are going online redo log files very quickly then LNS process will read from Online redo log files and send redo to RFS process through Oracle net.
  5. If some network outage occur and online redo log gets log switch and data goes to archived redo log files , before its been written to standby redo log files then RFS process will directly communicate to ARCn process and works for Archive log gap resolution.
  6. Once with any possible way redo are written to standby redo log files then , MRP [in case of physical dataguard] or LSP [in case of logical dataguard] process apply that redo or sql to standby database.
  7. And as redo data is being applied on standby database , ARCn process of standby database also generates archive logs.

You can use your standby database for resource intensive task like backup and also it is usable for reporting tasks.

Primary Database Processes for Dataguard Environment  :

1. LGWR : LGWR collects transaction redo information and updates online redo log files.

2.LNS process [Log writer network server]: LNS process works in two way.

  1. SYNC mode : When you have configured your dataguard environment in sync Redo transport Service , LGWR passes redo to LNS process , which transfers data directly to RFS process on the standby database. LGWR waits for confirmation from the LNS process and LNS process waits confirmation from RFS process that redo data are applied to standby database before acknowledging commit.
  2. ASYNC :  When you have configured async redo transport service, it is independent of LNS process , whether LNS process have read from redo log buffer or from online redo log files .  Dataguard just starts asynchronous LNS process , other than that LGWR has no interaction with  any asynchronous standby destinations. In simple terms , data guard will not wait for any acknowledgement from standby database that redo are applied or not and keeps on doing its work. So it is way faster than sync mode .

3. ARCn Process  : As we know ARCn process creates a copy of the online redo log files . ARCn is also responsible for shipping redo data to an RFS process at a standby database and for pro-actively detecting and resolving gaps on all standby database.

Standby Database Processes :

1. RFS [Remote File Server] : As we have seen above RFS process can get redo data either from LNS process or from ARCn process of primary and RFS process can writes redo information to standby redo logs files.

Each LNS and ARCn process that communicates with Standby database has its own RFS process.

2. ARCn [Archiver] : The ARCn process archives standby redo logs.

3. MRP [Managed Recovery Process] : In case of physical dataguard MRP process comes into play.MRP process applies archived redo log information to the physical standby database.You can start managed recovery using “ALTER DATABASE RECOVER MANAGED STANDBY DATABASE” this foreground session performs recovery. And if you want to perform recovery on background then you can optionally use DISCONNECT FROM SESSION. clause where MRP background process will start .

If you use DG BROKER to manage your dataguard , it always starts MRP background process.

4. LSP [Logical Standby ]: It comes into play for logical dataguard only. It controls the application of archived redo log information to the logical standby database. LSP process will transform redo data into sql statements and then these sql statements will be applied to logical standby database.

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel : https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

 

About The Author

Comments

  1. Yaseen

    Good and Keep writing …

    It would be good if you write about the steps in detail to configure dataguard and all related commands . 11gr2 RAC to RAC is preferable .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.