Home‎ > ‎DBA Stuff‎ > ‎

DB Replication

Compare replication methods for Oracle databases: 

Storage-based replication (ie SAN to SAN)
vs Host-based replication (ie OS to OS (ie Double-Take))
vs Application-based replication (Database to Database). 

An example of Database to Database replication could be Oracle Data Guard.  Data Guard requires Oracle Enterprise Edition which is extremely expensive so we've been looking into 3rd party alternatives to Data Guard.






  • Active Replication: Happens at the time of the write (write twice)
  • Passive Replication: Happens at some point after the write.  

  • Synchronous Replication: Writes are made at both DB's, and must be confirmed.  If done properly, there is a zero RPO (recovery point objective).  If there is a link issue, changes can be made with local writes, and synced later.  This removes the true "synchronous" model, but prevents the system from having massive behaivor problems based on the links between the DB's.
  • Asynchronous Replication: Write is complete when written locally.  The remote DB is synced with some lag or some level of RPO. 

Issues with Async replication
  • what happens when the wan link starts messing up?  is it ok to modify your RPO?  if you can't copy every 30 min (or whatever), because of WAN issues, does this mean that you want to shut down the server, or know that you are going to blow the RPO.
  • what is your process for post failover?  how do you resync the primary site afterward?  when primary is down, does this mean that your in trouble because you are not syncing to a different DR?




1. Storage Based Replication: (SAN Based)

Replication that is performed from the SAN/NAS infrastruce itself.  Here the SAN server would mirror one or many of the LUNs from one SAN to another.

Overview of Pros/Cons:

  • Very Expensive
  • Storage-centric.  Must work with the same kind of SAN/NAS storage equipment.
  • Application/OS insensitive.  
  • Processing is offloaded to SAN/NAS
  • can't easily fail one server or service and not the other. Whole SAN or not, otherwise it's really difficult.
  • Good for large numbers of servers, sees all data copies, doesnt' care about # of boxes, or what kind of data.

Vendor Examples:



See EMC's Replication Page.

EMC SRDF  (Symmetric Remote Date Facility)

  1. Synhronous Mode (SRDF/S)
    • Primary array waits until data is copied and acknowladged from the secondary array before acknowladging its own successful write. 
    • zero RPO, high bandwidth, must have very low latency.
  2. Asynchronos Mode (SRDF/A)
    • Data is copied to primary, and then after defined time sets, deltas are copied to the secondary.
    • some level of RPO, reduced bandwidth and latency needs.




2. Network Based Replication:

Standalone appliences that connect to your SAN or NAS infrastructure, and replicate the data from one location to another. 

Overview of Pros/Cons:

  • don't always scale to well because traffic needs to travel through a single (or a set # of network ports).  If a port gets oversubscribed, this can affect the entire SAN.
  • Difficult to upgrade (normally a forklift operation)  Also Expensive.
  • Very turnkey.
  • Very good on the network as far as QoS, compression, and WAN friendly transport protocols.
  • if  your servers are dual attached (multi-path environments) , how do you handle this with one device? 
  • How do you handle the failover/failback?  DR-> primary resync, mechanics are very complicated.

Vendor Examples:




EMC RecoverPoint

An applience that can sync multiple volumes from different vendors across the WAN
  • Synchronos mirroring, data locking until remote data is written and confirmed.
  • Can also do Asynchronos replication
  • from Fido: "It's a flaming piece of shit."  How do you confirm both SANs are in sync? 





  • Continuous Data Protection (CDP): creates a running journal of storage write activity, with updates bein logged every time a change occurs to the system.
  • Continuous Remote Replication (CRR): EMC calls CDP that runs between datacenters to be CRR.



3. Host Based Replication:

Software that runs on a server, and replicates it, or it's data to another location elsewhere on the network.

Overview of Pros/Cons:

  • use up system resources
  • per host costs
  • less optimized on the WAN
  • But good match for different storage environments.
  • Can be integrated with the DB/applications to automate failover/startup process
  • OS patches etc. must match at both locations.
  • Have much better solutions for failover/failback
  • more diffcult when dealing with lots of different servers. 
  • can do "point in time" data verification.  So at sync point "5", we know that both SANs are perfectly in sync.  (md5sum action)
  • easier to test your DR data and confirm that it actually is good.

Vendor Examples:


Double-take software

  • Async data duplication. 
  • app that installs on source and destination servers.
  • some data compression for WAN transmission.
  • Can sync servers as well, and even do P2V, V2P operations.




4. Database to Database Replication

Operations within a Database application that can mirror data from one location to another. 

Overview of Pros/Cons:

  • failover/switchover between the databases are interlinked with the replication.  The primary and secondary db are always known, and transfer of ownership is smoother.
  • Very little to no WAN optimazation

Vendor Examples:

  • Oracle DataGuard is designed as a DR solution, and works by transferring and applying redo data from the master to DR DB.  (comes with Oracle Enterprise Edition)
  • Oracle replication is an API or trigger based replication, not intended for DR. (comes with Oracle Standard Edition)
Oracle's four basic types of replication
Replication Type Description Example
Read-only snapshots A master table is copied to one or more databases. Changes in the master table are reflected in the snapshot tables whenever the snapshot refreshes. The snapshot site determines the frequency of the refreshes; data is pulled. A company may maintain its master product price list in a table at headquarters; regional sales offices or retail sites each have a snapshot of the price list in their local databases.
Updateable snapshots Similar to read-only snapshots, except that the snapshot sites are able to modify the data and send their changes back to the master. The snapshot site determines the frequency of the refreshes and the frequency with which updates are sent back to the master. A table of customer leads resides at headquarters. Sales staff with laptop computers visit prospective clients and enter notes about their meetings. When the sales staff dials in to the headquarters database every evening, their notes are uploaded, and they receive any updates that may have occurred since their last data refresh.
Multi-master replication A table is copied to one or more databases, and each database has the ability to insert, update, or delete records from it. Modifications are pushed to the other database at an interval that the DBA sets for each replication group. The highest theoretical frequency is once per second. A company achieves scalability and high availability by running its order entry system on two database instances; orders and inventory are modified on both machines.
Procedural replication A call to a packaged procedure or function is replicated to one or more databases. A procedure call applies a discount of 10% to all orders over US$500 by updating the ORDERS table in a replicated order entry system.

As you can see, these modes of replication are quite different, and each is


Comments