Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Tanger
Starting Member
1 Post |
Posted - 2007-10-21 : 21:21:54
|
| Hi all,I am hoping that someone here will be able to help point me in the right direction to solve the problem I currently have.To set the scene.I have two computers (basically the brains behind a couple of vending machines), one of them (computer1) holds a SQL database (MSDE) and they both access it to update the information held in it (when someone uses it or fills it etc.). The computer2 without the database is connecting to the other via an ADSL connection.What I am having problems with is that computer2 is occasionally dropping out when a users attempts to use the vending interface (problem with connecting to database). I have been testing the ADSL connection and the network connections for the last month (constant ping tests) and from the data the connections are fine.So I am thinking of having a copy of the database put on computer2, and then "syncing" the two databases. So that the data is kept consistant (allowing staff to analyze the complete data). In regards to the syncing, I am looking at some database software to compare the two databases and then uploading the differences from computer2 to the master database on computer1. From there throw the sync'ed master database from computer1 over the top of computer2. The idea of the syncing and the local database is to minimize the need for the ADSL connection (speed up response time due to local database) but to also keep the master database up to date with all the information.My question is, "Is this the right way about going about it?". I'm new to SQL (very limited use so far, plus using MSDE so it's cut down to start with), and currently I'm just using basic common sense trying to solve the problem.Thank you in advance for any help. Starting to run out of options and the sync idea to be honest is quite complicated and turning out to be a lot of work/maintenance.Troy |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-21 : 21:38:43
|
| You could "flag" all transactions with a Batch Number.The batch number cna be used to find what transactions are new since last time.So:Set batch number (e.g. 1)All rows inserted get Batch Number = 1Now ready to synchronise:Increment batch Number (i.e. now 2)Copy all rows with batch number = 1 to remote database(If any new rows are added during this process they will be given Batch=2, so will be part of the next transfer)Kristen |
 |
|
|
|
|
|