Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re:Two phases commit

Re:Two phases commit

From: <dgoulet_at_vicr.com>
Date: Fri, 16 Feb 2001 08:51:59 -0800
Message-ID: <F001.002B66C7.20010216070535@fatcity.com>

Eriovaldo,

    1st, I'm a little glad I don't have to pronounce your name. I'd probably butcher it in a similar manner as I butcher my brother-in-law's last name all the time, Oczkowski! Whew, what a mouthful!!

    Anyway, back to the subject. Two Phase Commit is Oracle's method of synchronizing two or more databases so that either everything commits or everything rollsback. One of the controlling parts of this is the
"commit_point_strength" in the init.ora file. The DB with the highest
"commit_point_strength" becomes the "coordinator" of the process irregardless if
the transaction started in that instance.

    OR, you've started a distributed transaction & issued the "COMMIT" statement, what happens:

  1. the coordinator gets selected. Assuming all of the commit_point_strengths are the same the DB with the most changes is suppose to become the coordinator, don't depend on that though.
  2. the coordinator issuse a "prepare to commit" command otherwise known as
    "collecting" in DBA_2PC_Pending.
  3. If the remote DB has nothing to commit it replies accordingly & is no longer part of the transaction. This part I know doesn't work consistently. I've opened a TAR on the subject with OTS & they could not explain it either.
  4. DB's that do have changes to make, take out the required locks & do the other things neccessary to commit a change like normal, but hold at the prepared point. They then communicate back to the coordinator that they are ready & promise to do as told.
  5. When the coordinator has recieved the promise from all nodes then the
    "commit" message is sent and the transaction is complete, for the most part.
    There is a final message from each node that signifies that they have in deed committed the transaction. If that is received then the issue is assumed to be complete & you get the appriopriate response.

Now, If any of these steps fails, that's when the "pending" transaction stuff shows up in the database and error messages about "remote DB in doubt" start showing up.

Dick Goulet

____________________Reply Separator____________________
Author: "Eriovaldo do Carmo Andrietta" <eca_at_widesoft.com.br>
Date:       2/16/2001 2:45 AM

Hi Friends :

Anyone knows about how two phases commit works. It maybe control the error deadlock ..

I would like to know more about this.

Thanks.

Eriovaldo do Carmo Andrietta
Limeira/SP - Brasil

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Eriovaldo do Carmo Andrietta
  INET: eca_at_widesoft.com.br

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: dgoulet_at_vicr.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Feb 16 2001 - 10:51:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US