Subject Re: AW: [IBO] Offtopic: Data replication.
Author Dalton Calford
If you forget the whole service concept and write it as a simple linear
program (hint from my experience) that, when started, connects to source
db, runs a procedure that returns a result set, and connects to a second
db and inserts the data into another stored procedure. When the insert
is finished, the program exits. Command line or ini file for the
programs list of servers/user names/passwords/stored procedures to run

The whole program is under 150 lines of code. All replication rules
reside in the database. The program is just a glorified datapump. No
threads, no user interface, no problems, the only complexity is the two
phase commit accross the databases.
By using stored procedures to provide the data to be pumped, as well as
a stored procedure to accept the pumped data, you do not need any
metadata queries. If the database has procedure with the correct names
and parameters, it works.
This allows the programmer to make any business replication rule changes
they want without needing to understand C or Pascal.

You can then port that code into any environment you want (Free pascal
comes to mind, cause that is what we used) and it would work with any
database that has those procedures.

You can then use a service application, or a cron daemon to fire off the
program on a set basis.

Simple, effective, easy to debug and port, can be written in C or
pascal. If the code was my copywrite, I would post it.

best regards


Jason Wharton wrote:
> BTW, Does anyone have an alternative to Borland's TService module as a
> starting point?
> Jason Wharton
> CPS - Mesa AZ
> ----- Original Message -----
> From: "DaveR" <mailings@...>
> To: <>
> Sent: Tuesday, April 10, 2001 11:59 AM
> Subject: RE: AW: [IBO] Offtopic: Data replication.
> > I agree that a generic Pascal version would be better.
> >
> > -----Original Message-----
> > From: Gerhardus Geldenhuis [mailto:linuxmail@...]
> > Sent: 10 April 2001 09:02
> > To:
> > Subject: RE: AW: [IBO] Offtopic: Data replication.
> >
> >
> > I agree that we should join efforts. I disagree on the NT Service module.
> I
> > feel the program should be generic pascal to make for easy porting to
> kylix.
> > This would also help to keep the code base simplified and not have two
> > development trees.
> >
> > Cheers
> > Gerhardus
> Your use of Yahoo! Groups is subject to