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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Data 1

Status
Not open for further replies.

fiber0pti

ISP
Nov 22, 2000
96
US
I'm using SQL 2000. I have a database in my office and a database with my webhost. Is there anyway that I could setup SQL 2000 to update my office database and vice versa when the databases are updated.

Example1: I get a new user on my webpage to sign up. I want that information to be transfered to my office db aswell.

Example2:I add a new product in my offfice db, I want the webpage to be updated.

I don't mind if it has to be done only once a day like a scheduled task but is there even anything like this?
 
Hiya,

You should be able to do this via a trigger on each table, that as you insert or update information on either table, the other is automatically updated.

Your SQL manual should tell you the commands to do this, especially if they are on different servers.

Tim
 
Another way is with replication. You can setup the replication in a way that once a day every new or changed data on one server is send to the other.
For replication it is necessary that it is impossible that your OfficeDB cannot change records and the WebDB can change them also. Only one of them may change the data of a range of data in a table.
The same is for appending records. When both will append and they use the same Primary key numbers the replication will fail. So make sure if both can append that they both have their one range of Id's.

JNC73
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top