Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Dual database update
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