Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an alternative to replication 1

Status
Not open for further replies.

raymsuser

Technical User
Jul 14, 2002
3
AU
Does anybody know of a method other than replication for updating a database on one machine with new information entered into a copy of the database located in another state. Unable to make a direct connection between the databases so the altered database is zipped and emailed. Cannot use replication as unfortunately the primary keys for some of the more main tables were originally designed as unique identifiers which are also used as visual aids in record "eyeballing". This can be changed but don't really want to get into that.
 
Hi

Yes, well it is possible, but you are going to have to write some code to effectively do your own 'replication', dependind on the scope of amends possible, this may not be trivial.

You need to either:

In the copy database, make a table which logs all changes to the copy, Email that log, in the main database, process the log to update the main database

OR

Mark all amended records in some way (eg data/time stamp perhaps).

EMail the copy database

Write code to read the Copy database, pick out the amended records, and apply the amendments to teh master copy.

As I said, this is not a trivial task Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks for that KenReay,
I had expected that a bit of cute code was required. Any hints as to where I might find such a piece of code? I don't really have VB etc. The datestamp idea seems like an excellent approach.
thanks again
Ray
 
I don't know how experienced a user/programmer you are, but it might be useful to 'get the feel' of the process and at the same time test a few things.
First, work on copies.
You can use the link the tables in the mailed and unzipped database to the main database. You can now see what you have to do to upgrade the main database. If this is a one-time job, you'd probably build queries to update your data. Be careful that referenced records should be added first, before the records that reference them. Also, the no-longer referenced records should be deleted last.
Try this "playing around" before you write a program. It helps to gain insight.

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top