Microsoft KB Archive/215059

= SMS: Error "Violation of PRIMARY KEY constraint" When Status Manager Writes To Database =

Article ID: 215059

Article Last Modified on 10/27/2006

-

APPLIES TO


 * Microsoft Systems Management Server 1.2 Standard Edition
 * Microsoft Systems Management Server 2.0 Standard Edition

-



This article was previously published under Q215059



SYMPTOMS
The following errors may appear in the Statmgr.log:

SQL Err #10007> General SQL Server error: Check messages from the SQL Server.

SQL Msg #2627> Violation of PRIMARY KEY constraint 'StatusMessages_PK'. Cannot insert duplicate key in object 'StatusMessages'.

SQL Msg #3621> The statement has been terminated.

You may also receive the error on constraint 'StatusMessageAttributes_PK'.



RESOLUTION
To resolve this problem, obtain the latest service pack for Systems Management Server 2.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

236325 SMS: How to Obtain the Latest Systems Management Server 2.0 Service Pack



WORKAROUND
To work around this problem, perform the following steps:


 * 1) Stop the SMS_STATUS_MANAGER using the Systems Management Server Service Manager.
 * 2) Delete the oldest SQL file in the \SMS\Inboxes\statmgr.box\retry directory.
 * 3) Restart the SMS_STATUS_MANAGER using the Systems Management Server Service Manager.
 * 4) Repeat steps 1-3 until the Statmgr.log file no longer reports the SQL errors.

NOTE: Performing the workaround above may result in the loss of status messages. If losing currently queued status messages is acceptable, then you can simply delete all of the SQL files in step 2 and skip step 4.



STATUS
Microsoft has confirmed that this is a problem in Systems Management Server 2.0. This problem was first corrected in Systems Management Server 2.0 Service Pack Service Pack 1.

Additional query words: prodsms statmgr primary key violation SMS20SP1FIX

Keywords: kbhotfixserver kbqfe kbbug kbdatabase kbfix kbsms200fix kbstatsum KB215059

-

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

© Microsoft Corporation. All rights reserved.