Microsoft KB Archive/813494

= FIX: Distribution Agent Fails with &quot;Violation of Primary Key Constraint&quot; Error Message =

Article ID: 813494

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Desktop Engine (Windows)
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition 64-bit

-



BUG #: 363920 (SHILOH_BUGS)



SYMPTOMS
The Distribution Agent for transactional replication may fail with a primary key violation on a temporary replication table, and you receive the following error message:

Violation of Primary Key constraint 'PK__@snapshot_seqnos__{UniqueNumber}'. Cannot insert duplicate key in object '#{UniqueNumber}'.

This problem might occur after you apply SQL Server 2000 Security Update for Service Pack 2, version 8.00.0679. To verify that you are running this security update, connect to SQL Server by using Query Analyzer, and then run:

select @@version

This problem is fixed for SQL Server 2000 Service Pack 2 systems that are running version 8.00.0733.

The problem also exists in SQL Server 2000 Service Pack 3, version 8.00.0760. To fix this version, you must apply SQL Server 2000 Service Pack 3 rollup, version 8.00.0765.

You must apply the hotfix for this problem to the instance of SQL Server where the distirbution database resides. This article discusses one possible cause of this message. This hotfix only helps if you are encountering the exact scenario that is described in this article.



Service pack information
To 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 How to obtain the latest SQL Server 2000 service pack

Hotfix information
The English version of this fix has the file attributes (or later) 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.

SQL Server 2000 Service Pack 2
Use this hotfix build for a server that is running SQL Server 2000 Service Pack 2.   Date         Time   Version         Size             File name -

17-Jan-2002 20:45  2000.80.568.0      29,244 bytes  Dbmslpcn.dll 17-Jan-2003 18:23                    786,432 bytes  Distmdl.ldf 17-Jan-2003 18:23                  2,359,296 bytes  Distmdl.mdf 11-Dec-2002 09:50                        180 bytes  Drop_repl_hotfix.sql 02-Jul-2002 07:35  2000.80.650.0     107,088 bytes  Impprov.dll 11-Dec-2002 09:50                      1,402 bytes  Inst_repl_hotfix.sql 17-Jan-2003 12:33                    774,409 bytes  Instdist.sql 20-Aug-2002 08:24  2000.80.679.0     111,172 bytes  Logread.exe 15-Dec-2002 15:21  2000.80.717.0      90,692 bytes  Msgprox.dll 06-Apr-2002 18:08  2000.80.606.0      62,024 bytes  Odsole70.dll 02-Jan-2002 17:59                     18,185 bytes  Qfe356326.sql 20-Aug-2002 08:47  2000.80.679.0     135,748 bytes  Qrdrsvc.exe 26-Aug-2002 14:49  2000.80.679.0     406,088 bytes  Rdistcom.dll 03-Oct-2001 17:36                    437,302 bytes  Replcom.sql 20-Aug-2002 08:33  2000.80.679.0     152,136 bytes  Replmerg.exe 25-Nov-2002 13:43                  1,004,990 bytes  Replmerg.sql 15-Dec-2002 15:21  2000.80.717.0     221,768 bytes  Replprov.dll 15-Dec-2002 15:21  2000.80.717.0     303,688 bytes  Replrec.dll 03-Oct-2001 17:36                    986,906 bytes  Replsys.sql 03-Oct-2001 17:36                    881,228 bytes  Repltran.sql 26-Aug-2002 14:49  2000.80.679.0     283,208 bytes  Rinitcom.dll 16-Sep-2002 14:31                    390,045 bytes  Securityhotfix.sql 26-Aug-2002 14:49  2000.80.679.0      28,672 bytes  Sqlagent.dll 26-Aug-2002 10:39  2000.80.679.0     311,872 bytes  Sqlagent.exe 28-Aug-2002 08:32  2000.80.679.0      49,152 bytes  Sqlagent.rll 26-Aug-2002 14:49  2000.80.679.0      53,824 bytes  Sqlcmdss.dll 28-Aug-2002 08:40  2000.80.679.0      12,288 bytes  Sqlcmdss.rll 14-Jan-2003 13:39  2000.80.725.0     172,600 bytes  Sqlmap70.dll 14-Jan-2003 13:39  2000.80.725.0   7,479,377 bytes  Sqlservr.exe 01-Nov-2002 10:56  2000.80.698.0      45,644 bytes  Sqlvdi.dll 17-Jan-2002 20:45  2000.80.568.0      29,244 bytes  Ssmslpcn.dll 19-Dec-2002 16:55  2000.80.719.0      82,492 bytes  Ssnetlib.dll 02-Jan-2003 12:12  2000.80.722.0      25,148 bytes  Ssnmpn70.dll 06-Apr-2002 18:08  2000.80.606.0      70,208 bytes  Xplog70.dll 06-Apr-2002 18:08  2000.80.606.0      53,828 bytes  Xpqueue.dll 06-Apr-2002 18:08  2000.80.606.0     156,228 bytes  Xprepl.dll 11-Jul-2002 17:00  2000.80.658.0     279,104 bytes  Xpstar.dll 16-Sep-2002 15:12  2000.80.686.0      98,872 bytes  Xpweb70.dll

SQL Server 2000 Service Pack 3
Use this hotfix build for a server that is running SQL Server 2000 Service Pack 3.  Date        Time   Version         Size             File name ---

08-Feb-2003 05:43                    786,432 bytes  Distmdl.ldf 08-Feb-2003 05:43                  2,359,296 bytes  Distmdl.mdf 30-Jan-2003 01:55                        180 bytes  Drop_repl_hotfix.sql 30-Jan-2003 05:18                    746,470 bytes  Instdist.sql 30-Jan-2003 01:55                      1,402 bytes  Inst_repl_hotfix.sql 08-Feb-2003 06:40  2000.80.765.0      90,692 bytes  Msgprox.dll 08-Feb-2003 03:53                  1,065,895 bytes  Replmerg.sql 08-Feb-2003 06:40  2000.80.765.0     221,768 bytes  Replprov.dll 08-Feb-2003 06:40  2000.80.765.0     307,784 bytes  Replrec.dll 30-Jan-2003 05:18                  1,084,318 bytes  Replsys.sql 08-Feb-2003 06:40  2000.80.765.0     176,696 bytes  Sqlmap70.dll 08-Feb-2003 06:40  2000.80.765.0      57,920 bytes  Sqlrepss.dll 08-Feb-2003 06:41  2000.80.765.0   7,528,529 bytes  Sqlservr.exe 08-Feb-2003 06:40  2000.80.765.0      45,644 bytes  Sqlvdi.dll 08-Feb-2003 06:40  2000.80.765.0      82,492 bytes  Ssnetlib.dll Note: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.



MORE INFORMATION
This hotfix is also available in the MS03-031 security patch. For additional information about the MS03-031 security patch, click the following article number to view the article in the Microsoft Knowledge Base:

821277 MS03-031: Security patch for SQL Server 2000 Service Pack 3

Keywords: kbbug kbfix kbqfe kbsqlserv2000presp4fix kbhotfixserver KB813494

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.