Lesson 4: Configuring Conflict Resolution for Merge Replication in .NET framework

Generator PDF-417 2d barcode in .NET framework Lesson 4: Configuring Conflict Resolution for Merge Replication

Lesson 4: Configuring Conflict Resolution for Merge Replication
PDF-417 2d Barcode Generation In .NET
Using Barcode printer for VS .NET Control to generate, create PDF 417 image in Visual Studio .NET applications.
www.OnBarcode.com
PDF-417 2d Barcode Recognizer In VS .NET
Using Barcode scanner for .NET Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
23. Verify that the Name column for the row with a ProductID of 1 is also the one updated at the Publisher and that both databases have the same value. The merge default conflict resolver chose a winner, and data is consistent in both databases. The conflict winner is always the publisher database. 24. In the toolbar, click New Query. 25. In the Query Editor, type the following queries:
Barcode Encoder In .NET
Using Barcode printer for .NET framework Control to generate, create bar code image in .NET framework applications.
www.OnBarcode.com
Barcode Recognizer In .NET
Using Barcode reader for .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
USE ReplTesting UPDATE Production.Location SET Name=Name+'Updated at Publisher' WHERE LocationID=1 WAITFOR DELAY '00:00:15' USE SubsTesting UPDATE Production.Location SET Name=Name+'Updated at Subscriber' WHERE LocationID=1 SELECT * FROM ReplTesting.Production.Location WHERE LocationID=1 SELECT * FROM SubsTesting.Production.Location WHERE LocationID=1
Make PDF417 In C#
Using Barcode maker for .NET framework Control to generate, create PDF417 image in Visual Studio .NET applications.
www.OnBarcode.com
PDF417 Printer In Visual Studio .NET
Using Barcode encoder for ASP.NET Control to generate, create PDF-417 2d barcode image in ASP.NET applications.
www.OnBarcode.com
26. Execute the queries and verify that the SELECT statements return two rows, and that the ModifiedDate column has a 15-second difference. 27. Navigate to the Replication, Local Publications, [ReplTesting]: Inventory publication. 28. Right-click the COMPUTERNAME.SubsTesting subscription and choose View Synchronization Status. 29. Click Start to initiate the Distribution Agent and synchronize the Publisher and the Subscriber. 30. Wait for the agent to replicate and then click Close. 31. Right-click the [ReplTesting]: Inventory publication and choose View Conflicts. 32. Double-click the Location(1) table. 33. In the Microsoft Replication Conflict Viewer, review the conflict winner and loser. The winner this time is the row updated at the Subscriber because it was the last one you updated. 34. Do not submit the winner or loser. Close the Microsoft Replication Conflict Viewer.
Generate PDF417 In Visual Basic .NET
Using Barcode printer for VS .NET Control to generate, create PDF-417 2d barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Universal Product Code Version A Creation In Visual Studio .NET
Using Barcode creator for .NET framework Control to generate, create Universal Product Code version A image in .NET framework applications.
www.OnBarcode.com
19
Data Matrix 2d Barcode Creator In Visual Studio .NET
Using Barcode generator for .NET Control to generate, create Data Matrix image in Visual Studio .NET applications.
www.OnBarcode.com
Draw Code 3 Of 9 In .NET Framework
Using Barcode drawer for VS .NET Control to generate, create Code 39 Extended image in Visual Studio .NET applications.
www.OnBarcode.com
Managing Replication
GS1 DataBar-14 Creation In .NET Framework
Using Barcode generation for .NET framework Control to generate, create GS1 DataBar image in Visual Studio .NET applications.
www.OnBarcode.com
USPS PLANET Barcode Generator In .NET Framework
Using Barcode drawer for Visual Studio .NET Control to generate, create Planet image in Visual Studio .NET applications.
www.OnBarcode.com
35. Navigate to the Databases, ReplTesting, Tables, Production.Location table. 36. Right-click the table and choose Open Table. 37. Verify that the Name column for the row with a LocationID of 1 is the one updated at the Subscriber. 38. Close the table window. 39. Navigate to the Databases, SubsTesting, Tables, Production.Location table. 40. Right-click the table and choose Open Table. 41. Verify that the Name column is also the one updated at the Subscriber and that both databases have the same value. 42. In the toolbar, click New Query. 43. In the Query Editor, type the following queries:
Encoding Code 128 Code Set C In None
Using Barcode maker for Font Control to generate, create Code-128 image in Font applications.
www.OnBarcode.com
Code 3 Of 9 Drawer In None
Using Barcode maker for Microsoft Excel Control to generate, create Code 3/9 image in Microsoft Excel applications.
www.OnBarcode.com
USE ReplTesting UPDATE Production.ProductInventory SET Quantity=Quantity-20 WHERE ProductID=1 AND LocationID=1 WAITFOR DELAY '00:00:15' USE SubsTesting UPDATE Production.ProductInventory SET Quantity=Quantity-50 WHERE ProductID=1 AND LocationID=1 SELECT * FROM ReplTesting.Production.ProductInventory WHERE ProductID=1 AND LocationID=1 SELECT * FROM SubsTesting.Production.ProductInventory WHERE ProductID=1 AND LocationID=1
Generate UPC-A Supplement 2 In C#.NET
Using Barcode encoder for .NET framework Control to generate, create UCC - 12 image in .NET framework applications.
www.OnBarcode.com
Print Data Matrix 2d Barcode In .NET
Using Barcode generator for ASP.NET Control to generate, create DataMatrix image in ASP.NET applications.
www.OnBarcode.com
44. Execute the queries and verify that the SELECT statements return two rows, that the Quantity column displays different values in each database (the Subscriber is lesser), and that the ModifiedDate column has a 15-second difference. 45. Navigate to the Replication, Local Publications, [ReplTesting]: Inventory publication. 46. Right-click the COMPUTERNAME.SubsTesting subscription and choose View Synchronization Status. 47. Click Start to initiate the Distribution Agent and synchronize the Publisher and the Subscriber.
GTIN - 128 Creation In Java
Using Barcode creation for Java Control to generate, create GTIN - 128 image in Java applications.
www.OnBarcode.com
Encoding UPC-A In None
Using Barcode creator for Microsoft Word Control to generate, create UCC - 12 image in Office Word applications.
www.OnBarcode.com
Lesson 4: Configuring Conflict Resolution for Merge Replication
Generating EAN 13 In Java
Using Barcode creator for Java Control to generate, create EAN-13 image in Java applications.
www.OnBarcode.com
Barcode Drawer In None
Using Barcode printer for Office Excel Control to generate, create barcode image in Excel applications.
www.OnBarcode.com
48. Wait for the agent to replicate and then click Close. 49. Right-click the [ReplTesting]: Inventory publication and choose View Conflicts. 50. Double-click the ProductInventory(1) table. 51. In the Microsoft Replication Conflict Viewer, review the conflict winner and loser. The winner this time is the row updated at the Publisher, but the Quantity column is the lesser value of both columns and is the value updated at the Subscriber. 52. Do not submit the winner or loser. Close the Microsoft Replication Conflict Viewer. 53. Navigate to the Databases, ReplTesting, Tables, Production.ProductInventory table. 54. Right-click the table and choose Open Table. 55. Verify that the Quantity column displays the value updated at the Subscriber. 56. Close the table. 57. Navigate to the Databases, SubTesting, Tables, Production.ProductInventory table. 58. Right-click the table and choose Open Table. 59. Verify that the Quantity column displays the value updated at the Subscriber and that both databases have the same value.
Lesson Summary
Merge replication allows simultaneous updates in multiple databases, which might cause data conflicts. To resolve these conflicts, SQL Server lets you create components that define business logic to determine the winning row. To configure conflict resolution in merge replication, use the Article Properties page of the New Publishing Wizard in SSMS or the @article_resolver parameter of the sp_addmergearticle stored procedure. SQL Server 2005 provides a set of COM-based conflict resolvers that implement common business rules, but you can also create custom components.
Copyright © OnBarcode.com . All rights reserved.