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

Re: Dual database update

From: David Simpson <dsimpson_at_dotcomsolutionsinc.net>
Date: Sun, 16 Jun 2002 13:22:09 GMT
Message-ID: <5i0P8.218801$cQ3.8087@sccrnsc01>


John,
It sounds like what you really want to do is replication. If you have the Enterprise Edition of Oracle you can setup Multi-Master replication inside the database to perform this task for you. Also, the databases will handle updates (not just insert changes) as well. Trying to write your own form of replication involves quite a few challenges which could take quite a bit of time. How do you handle conflicts, how do you handle the situation of the 2nd database being temporarily unavailable etc.

Here are some scripts I use to setup replication (for oracle8i - oracle 9i): http://www.dotcomsolutionsinc.net/products/repgen/repgen_files.html

You can download all of the scripts here: http://www.dotcomsolutionsinc.net/downloads/demo_software/index.html

David Simpson
www.dotcomsolutionsinc.net

"John Kaliski" <nospam_at_nospam.com> wrote in message news:spMO8.43196$UT.2946608_at_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 Sun Jun 16 2002 - 08:22:09 CDT

Original text of this message

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