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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using OCI (v7.x) how to make a two phase commit work ?

Re: Using OCI (v7.x) how to make a two phase commit work ?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 04 Jan 1999 21:34:47 GMT
Message-ID: <369e3378.29226475@192.86.155.100>


A copy of this was sent to "Steven Belbin" <steven.belbin_at_consyst-sql.com> (if that email address didn't require changing) On Mon, 4 Jan 1999 15:08:01 -0500, you wrote:

>Hi,
>
> I will directly get to the point, using OCI (version 7.x) how can I
>issue a prepare to commit statement, followed either by a confirmation or
>cancelation of the previously prepared transaction.
>
> The context is the following; I wrote a program that applies the two
>phase commit model on a relational database and other data sources. The
>other data sources are not necessarily a relational database (it could be a
>COM / CORBA transaction, third party product, etc...). These data sources
>are just required to provide the two phase commit model.
>
> In short, I wrote a lite model of a transaction manager (like TUXEDO,
>ENCICA) specifically for our software.
>
> With OCI version 8, Oracle has publically provided the the OCI C
>functions to manage a database transaction. Thus allowing us to start a
>database transaction, issue a prepare to commit, commit, rollback and
>stopping of the database transaction (yeah, no problem for OCI version 8).
>
> How can I manage a database transaction with an Oracle 7 database
>(especially the prepare to commit statement, commit and rollback ) ?
>
> Under OCI version 7.x, how could this be achieved ?
>
>
>P.S. :
>
> I know it is possible, since several X-OPEN compliant transaction
>managers have successfully implemented it for Oracle 7 databases. However,
>most of our clients do not use one of these X-OPEN compliant transaction
>managers. Therefore X-OPEN solutions are not applicable in my case.

But the problem here is that they use the XA interface to Oracle and you have just said "No XA, No X-Open". We have an XA interface to Oracle in v7. We use it with Tuxedo and others.

Short of that, in v7, you could make oracle the 'commit' point -- that is, ask the other N-1 data sources to prepare to commit. If they all vote yes, then issue the commit in Oracle v7. If it succeeds -- the 'vote' from Oracle was to commit (and it already has). If it fails -- the 'vote' from Oracle was to rollback (and it already did).  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jan 04 1999 - 15:34:47 CST

Original text of this message

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