Saturday 25 February 2012

Conflicts in Merge Replication

Hi,

I am using SQL Server 2000 Merge Replication. Sometimes when the data is replicated there are conflicts which when examined show it is due to voliation of foreign key constraint. But the data (keys) in already present in the master tables. Is there a way to give an order to the way the tables are replicated. This is so because i think the data in the details table is relpicated first instead of the master table. The conflicts are resolved properly when done using the conflict viewer.

In SQL Server 2000, it is not possible to specify an order. An order can be speficied in SQL Server 2005.|||

Li Zhang wrote:

In SQL Server 2000, it is not possible to specify an order. An order can be speficied in SQL Server 2005.

Then, could you tell me how do you specify the order in sql server 2005?

Cheers

|||Agreed, I have the exact same issue - how do you specify an order in 2005?|||

Hello,

Use the processing_order parameter of sp_addmergearticle stored proc, when adding articles to the publication.

[ @.processing_order = ] processing_order
Indicates the processing order of articles in a merge publication. processing_order is int, with a default of 0. 0 specifies that the article is unordered, and any other value represents the ordinal value of the processing order for this article. Articles are processed in order from lowest to highest value. If two articles have the same value, processing order is determined by the order of the article nickname in the sysmergearticles (Transact-SQL) system table. For more information, see Specifying the Processing Order of Merge Articles.

Thanks

Udaya.

|||

Hey,

I don't think there is a way to specify the order under sql server 2005.

Junhai Kan

No comments:

Post a Comment