TechTutorials - Free Computer Tutorials  

SQL 7.0 Replication 

Added: 01/12/2000, Hits: 2,102, Rating: 0, Comments: 0, Votes: 0
Add To Favorites | Comment on this article
By Brian Talbert

Merge Replication
Merge Replication is a brand new feature to SQL 7. This type of replication allows each subscriber to make updates to data. When two subscribers update the same data a configurable mechanism is used to resolve the conflict. The conflict may be decided based upon some sort of priority scheme, or based upon the outcome of a custom stored procedure.

When you initially configure merge replication, those tables involved in the replication will have several changes happen automatically. First, SQL Server will try to find a column on the published table that is unique, specifically a uniqueidentifier column with the ROWGUIDCOL property. If it can not find such a column it will create one, naming it rowguid and creating an index on that column. Next, a couple of system tables are created to support tracking changes to the articles. These system tables will be joined to the published tables via the unique column designated previously. Finally, triggers will be created to update these system tables when changes occur.

Conflict Resolution
As mentioned, there are two types of conflict resolution, priority based and stored procedure based. When resolution is based upon priorities, a value is assigned to each subscriber. When a conflict arises, the subscriber with the highest value wins. A subscriber can not have a value greater than the publisher. When a tie occurs, the first update to reach the publisher wins. This is the default configuration and it essentially means that if a change occurs at both the publisher and the subscriber at the same time, the publisher wins.

The other method of conflict resolution involves the use of stored procedures. Using this method you can create a custom conflict resolver that includes any logic you find necessary to make a decision as to which subscriber wins. You may for instance capture the name of the person making the change and base the winner according to who the person is making the change.

Replication Upgrading
It is possible to upgrade SQL 6.5 servers running replication to SQL 7.0. You should upgrade distributors first. You can then upgrade remaining servers when possible. A recommended approach is to upgrade the Distributor and then the Publisher. Finally upgrade subscribing servers.

You can not upgrade replication settings from SQL 6.0. You must first upgrade to SQL 6.5.

There are several good articles in Books Online about this subject. Be sure to read them!

Comments (0)

Be the first to comment on this article

Related Items

7 Seconds Resources, Inc.

IT Showcase