Tuesday, December 18, 2012

Logical Standby Vs Physical Standby

What is the difference between these two Data Guard configuration , When To Use them :

Physical Standby:

1- Physical Standby Database Its exactly same As Primary Database.
2-  In Physical Data Guard The archivelog Applied directly after transfer from primary database (FTP)

Properties of Physical Standby

1- Maintain Is Easy.
2- Creation is Easy .
3- Copy Of your Primary Database ( Disaster Recovery Solution ).

Usage :

High availability solutions Or disaster recovery Solution.

Logical Standby

1 - Opposite Of standby Database , Which is not Match primary Database .
2 - This Kind Of Configuration can be Opened in Read Only Mode .
3 - can have additional materialized views and indexes added for faster performance
4 - LogMiner Techniques to transfer Archivelog.

Properties Of Logical Database :

1 - Open In Read only Mode .
2 - Sometimes its used as RollBack Solution In Upgrade ,

Usage:

1 - reporting Database to avoid overhead in primary database.
2 - Query Database .


How they Works :

Regarding to Oracle documentation  :

LNS (log-write network-server) and ARCH (archiver) processes running on the primary database select archived redo logs and send them to the standby database, where the RFS (remote file server) background process within the Oracle instance performs the task of receiving archived redo-logs originating from the primary database.

Alternatively, a supplementary mechanism may transfer the archived redo logs. On the standby database a Fetch Archive Log (FAL) client monitors for gaps in the sequence of received logs. If it finds a gap, it may invoke one or more Fetch Archive Log (FAL) servers to run on the primary database to forward the missing item(s).

Once the archived redo logs have arrived, other processes (such as an ARCH (Archiver process), an MRP (Managed Recovery Process), and/or an LSP (Logical Standby Process)) may set about applying the log contents to the standby database.

 Conclusion :

The difference between physical and logical standby is in the way the changes from the primary are applied. Both created as an exact image of the primary database. Both receive redo logs from the primary database.

 Refernce :
 Oracle DataGuard architecture 


Thank you
Osama mustafa

5 comments:

  1. I have worked with Logical standby database and it indeed offered interesting challenges. Three of them where:

    1) During setup, on the primary side you need to run EXECUTE DBMS_LOGSTDBY.BUILD; as mandatory step. this package will wait for all active transactions to complete before you get you prompt back. The third party application had very long running transactions. In the end claimed maintenance window, did startup restrict and then worked within couple of minutes
    2) Space allocation. Both my primary side (6 Node Rac) and standby side (2 Node Rac) where sized too small when started. Make sure you have extra storage available, cause you will start with a delay in processing your archives so primary side is not allowed to let archives go ( since standby did not allow yet) and standby side is getting more and more archives and is still battling a backlog.
    3) We had firewalls between the prim. side and standby side and in the shipment that was surely a pain.

    ReplyDelete
    Replies
    1. Thanks For Adding ... You said it Challenges Which make our Job Interesting :)

      Delete
  2. can u tell me the way of activating the rfs process , i have tried alot but i failed while creating the physical data guard

    ReplyDelete
  3. great thread!
    I looking for this,, for my thesis :D

    thank you so much!

    ReplyDelete