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

Home -> Community -> Usenet -> c.d.o.server -> Re: ESQL/C and OCI examples using two-phase commit

Re: ESQL/C and OCI examples using two-phase commit

From: Bill Manry <B.Manry_at_upsizeme.us.oracle.com>
Date: 1997/08/07
Message-ID: <5sdba8$ipm$1@inet16.us.oracle.com>#1/1

Jerry Abramson (jerry_abramson_at_stratus.com) wrote: [...]
>Now I would like to do the same thing from within an ESQL/C program and
>an
>OCI program. Do I need to use the:
> CONNECT :user IDENTIFIED BY :pw AT db_name USING :net_string
>syntax? How else can I get connected to both databases? Once I am
>connected I would think it is straight-forward.

I don't think you want to connect to multiple databases directly from your program. If you do that, your program has to act as the commit coordinator, logging transaction state, explicitly executing the two commit phases, and providing abort and recovery actions.

Use the same technique as you did with SQL*Plus: connect to Oracle, and use Oracle's distributed processing capabilities to access the other database(s). Then Oracle does the commit coordination for you.

/b

--
Bill Manry  -  IBM Products Division  -  Oracle Corporation
These are my opinions, not necessarily Oracle's.
Remove "." from "B.Manry" to email me.
Received on Thu Aug 07 1997 - 00:00:00 CDT

Original text of this message

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