About Me

My photo
Bangalore, India
I am an Oracle Certified Professional working in SAP Labs. Everything written on my blog has been tested on my local environment, Please test before implementing or running in production. You can contact me at amit.rath0708@gmail.com.

Friday, August 9, 2013

Difference between Physical Standby and Logical Standby Database.

Standby databases act as a failover for our Production Databases. If Production Database crashes , running applications can quickly switchover to standby database.

There are two types of stanby database , Physical standby and Logical Standby.

1. Physical Standby :-  

  a. Physical Standby Schema Structure matches exactly with primary database.

  b. Archived redo logs are moved directly from primary database to physical standby which is running in recover mode. Once archive log arrived , they are applied directly to standby database.

2. Logical Standby :-

  a. Logical standby schema structure does not have to match with Primary database. It can have a different structure.

  b. Logical Standby uses Log Miner Technique and change the archive redo logs in primary to change it into native DML statements i,e insert,update and delete . These DMLs are transported and then applied to logical standby.

  c. Logical Standby can have additional Indexes and Materialized views ahead of Primary database which enhance faster performance of database.

  d. Logical standby tables can be open as Read only and all other standby tables can be open for updates.

Advantages of having Physical Standby Database :-

1. Identical copy of primary database.
2. Disaster Recovery, High availability and High Data Protection.
3. Primary database workload is reduced, can be open in Read-Only mode for querying purpose.

Advantages of having Logical Standby Database :-

1. Simultaneously can be used for querying  , reporting and summation.
2. There are some limitation on the use of certain datatypes.
3. Reduction in Primary database workload.

I hope this article helped you.

Regards,
Amit Rath

No comments:

Post a Comment