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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Keeping two databases synch'ed?

Author  Topic 

groston
Yak Posting Veteran

61 Posts

Posted - 2004-09-29 : 14:32:58
The Master Application (MA) which I am developing has core data that is shared among several Site Applications (SA). The MA runs on MasterServer and the SAs run on SiteServers.

Tables that exist in the database on MasterServer include:
Site <= many-to-many => Org <= many-to-many => Client

Tables that exist in the database on the SiteServer include:
Org <= many-to-many => Client

The Site table contains the names of the SiteServers and the necessary SQL authentication information for accessing these remote sites. (Currently, it is in the form of a .NET SqlConnection.)

When data on MA is added/modified/deleted, these data must be "pushed" to the appropriate SiteServer(s).

For example: Using MA, the name of a Client associated with an Org which is associated with Site1 is changed. This requires that the the name of a Client in the Client table on SiteServer1 be changed in the same manner.

The problem is, I do not know the "best" way to accomplish this task. One thought is to use ADO.NET's DataAdaper.RowUpdating event to capture all changes being made, munge these into a dynamic SQL statement and pass the statement to the appropritae SiteServer. (Given that the number of transactions is not likely to exceeed hundreds per week, and since scalability is not a concern, this oculd work.)

However, I am wondering if there is a better way, posisbly using a mechanism similar to that used by the folks at RedGate for synchronizing databases.

I look forward to your suggestions!

chadmat
The Chadinator

1974 Posts

Posted - 2004-09-29 : 15:56:56
How about replication?

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

groston
Yak Posting Veteran

61 Posts

Posted - 2004-09-29 : 16:09:51
quote:
Originally posted by chadmat

How about replication?



Chad
Thanks for the reply!

Pretend (which, in this case doesn't require much imagination) that I know next-to-nothing about SQL. In a short sentence or two, can you please tell me what "replication" is.

thanks!
Go to Top of Page

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-09-29 : 16:40:35
Ok!
This seems like a popular thing to do here.

http://www.justfuckinggoogleit.com/search?query=%22sql+server%22%3B+%22Replication%22


Duane.
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2004-09-29 : 16:58:30
Look it up in Books Online. Basically it is exactly what you explained you want to do.

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

groston
Yak Posting Veteran

61 Posts

Posted - 2004-09-29 : 17:27:57
Thanks - I'm checking it out.

p.s. The justfuckinggoogleit.com is quite hilarious!
Go to Top of Page
   

- Advertisement -