Article ID: 326483 - Last Review: October 11, 2005 - Revision: 1.6 FIX: The Merge Agent incorrectly deletes rows after a primary key violation occurs
This article was previously published under Q326483 BUG #: 361118 (SQL Server 8.0) On This PageSYMPTOMS In a merge replication environment, a row is missing at the
publisher at and all the subscribers. Additionally, two rows that have the same primary key value exist in the conflict table for the article. For example, the conflict table for the article contains text that is similar to the following: Primary Key Reason_Code Conflict_Type Reason_Text 1 2627 6 The row was inserted at 'publisher' but could not be inserted at 'subscriber'. Violation of PRIMARY KEY constraint 'pkey_constraint'. Cannot insert duplicate key in object 'Article'. Primary Key Reason_Code Conflict_Type Reason_Text 1 2627 5 The row was inserted at 'subscriber' but could not be inserted at 'publisher'. Violation of PRIMARY KEY constraint 'pkey_constraint'. Cannot insert duplicate key in object 'Article'. CAUSEDuring the download phase of the Merge Agent execution, the
INSERT statement for the missing row is run before the compensating DELETE
statement is run for the primary key violation.
RESOLUTIONService pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:290211
(http://support.microsoft.com/kb/290211/
)
How to obtain the latest SQL Server 2000 service pack
Hotfix informationNote The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.Note You must install SQL Server 2000 SP2 before you apply this hotfix. A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: http://support.microsoft.com/contactus/?ws=support
(http://support.microsoft.com/contactus/?ws=support)
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. Date Time Size File name ------------------------------------------------- 12-Jul-2002 22:28 32,580 bytes Qfe359375.sql To install this hotfix, follow these steps:
WORKAROUNDIf you still experience the problem after you apply the
hotfix, we recommend that you increase the generation batch size of the
Merge Agent. To do this, use the -UploadGenerationsPerBatch parameter or the -DownloadGenerationsPerBatch parameter. Warning If the network is not stable, increasing the generation batch size of the Merge Agent can have an adverse effect. If you make the generation batch bigger, you increase the chance of interrupting the batch. If the batch is interrupted, you must resend the whole batch. Like the hotfix, this workaround corrects the problem. However, it does not prevent the problem. STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.
| Article Translations
|
Back to the top
