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" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).