Groups | Blog | Home
all groups > sql server programming > may 2005 >

sql server programming : replication with java


inder
5/25/2005 11:39:01 PM
Hi all,

I'm trying to develop a Java application that will manipulate and
transfer data from sql server X to sql server Y (transactional replication
is not an option). I'm pretty new to this sort of thing, but how can my
Java application be notified when a record is updated/inserted into X so
that it can be stored in Y? Does Java have some kind of event-driven api
for this sort of thing?

Many thank in advance,
John Bell
5/25/2005 11:56:02 PM
Hi

Are you acutually wanting to do replication or simultaneous updates? If the
latter then you would want to look at doing the repeated updates in the
middle tier, otherwise I would look at writing triggers that provided the
information that had changed and a process that periodically replayed the
changes on the second database. You will need to build in functionality that
provides resiliance and the ability to reset the process if anything happens.

John

[quoted text, click to view]
Inderjit Rai
5/26/2005 6:40:39 AM
Hi John,


I'm replicating (after some major data testing and modifications)
records one way, from sql server X to sql server Y. Sql server Y is a
backend database for a application called Blackboard and they have
several Java api's to update and retrieve data from their database, and
they suggest that we don't use transactional replication but build a
standalone application. I'm not familiar with developing applications
in middle tier (or any tier) and i was wondering if you could elaberate
or let me know of any online tutorials that deal with this sort of
thing.

Thanks again,
Inder

John Bell
5/26/2005 10:14:05 AM
Hi

If you are using their APIs to access the database then they have
effectively written your data access layer and it sounds like they don't want
you to access the database directly.

Why are you wanting to have two copies of the database? How up-to-date does
the second copy need to be? What activity will be occurring on the second
copy?

If transactional replication is not advisable you should find out why, then
you will be in a better position to work out if snapshot replication is
viable or possibly log shipping. Period manual backup/transfer/restore
operations may be adequate.

John
[quoted text, click to view]
AddThis Social Bookmark Button