Monday, October 6, 2008

Distributed transaction

In distributed transaction, you may commit only from the site from where transaction began.  This implies you cannot execute DDL over dblink since that DDL cause implicit commit.

2 PC commit: 
1.  Driving Site asks secondary databases participating in transaction to prepare for commit.  All participating databases send the message back that they are ready to commit.
2.  Primary site sends broadcast message to all of them to commit.

To do DDL over the remote site, Oracle can use DBMS_JOB to schedule a job to do DDL on the remote site via db link.

No comments: