Re: 2-Phase commit or replication?

From: Kevin Jernigan <kjerniga_at_emergent.com>
Date: 1995/05/30
Message-ID: <kjerniga-3005951848570001_at_slipkevinj.emergent.com>#1/1


In article <3qfd01$142_at_tst.hk.super.net>, myung_at_hk.super.net (Mr Michael Wai Kee Yung) wrote:

> Dear all, my company is running a 40-50 Gigabyte database using Oracle 7.
> We're planning to set up a secondary site as the backup of our business
> database. Could you all experts give me a clue what's the best solution
> to implement this? I mean what's the pros and cons to use 2PC or
> replication? Is 2PC a high performance penalty option? Would appreciate
> if you can share with me your experience. Many thanks in advance.

If you use 2PC for all your transactions, presumably to make modifications appear in both databases at once, then you are guaranteed that either both databases are modified, or neither database is modified. However, this means that any time that one of the databases is unavailable, either because the network connection is down, or the system is down, or the database is down for maintenance, or for any other reason, then all modifications to the database that is up will remain "in-doubt", until either the other database becomes available again, or someone (presumably a DBA) manually commits or rolls back the in-doubt transactions.

If you use snapshots or symmetric replication, you lose the atomicity guarantee that both databases will be modified or neither will be, but you gain in flexibility. With snapshots and replication, changes can be staged over time, so that they are not propagated from one database to another immediately, but only at certain time intervals. This helps both in flexibility and in performance.

Let me know if you have any more questions.

   -Kevin J

-- 
~~~~~~~~~~~~~ emergent: the parallel systems experts ~~~~~~~~~~~~~~~
kevin jernigan                                      415-567-8915 (p)
emergent corporation                                415-265-0785 (c)
kjerniga_at_emergent.com   http://www.emergent.com     415-367-6414 (f)
Received on Tue May 30 1995 - 00:00:00 CEST

Original text of this message