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 -> Dual database update

Dual database update

From: John Kaliski <nospam_at_nospam.com>
Date: Sat, 15 Jun 2002 19:17:44 GMT
Message-ID: <spMO8.43196$UT.2946608@bgtnsc05-news.ops.worldnet.att.net>


I want to insert data into two different databases, at the same time. I could run an INSERT statement on two different ADO connections in my Visual Basic DLL. This obviously has problems, if the first INSERT fails, I don't want to run the second INSERT.

So, it's been suggested the best way to do this is;

Create a stored procedure (or function) on database 1. Pass *all* the data to this function. It then adds the relevant data to database 1, then using a database link to the 2nd database, it adds the other set of relevant data to the 2nd database. This way, everything is kept inside the same transaction.

Not being an expert on Oracle, does this sound OK? ...any flaws in doing this?

Cheers,
John. Received on Sat Jun 15 2002 - 14:17:44 CDT

Original text of this message

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