FIX: Multiple SQL Agent Jobs Launched At The Same Time May Fail With Primary Key Error Message

This article was previously published under Q286253
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 351502 (SHILOH_BUGS)
If multiple SQL Agent jobs owned by the same login are scheduled to start at the same time, one or more of the jobs may fail with an error message similar to:
The job failed. Unable to determine if the owner (DOMAIN\user) of job CopyM1ToMx has server access (reason: Violation of PRIMARY KEY constraint 'PK__syscachedcredent__0AD2A005'. Cannot insert duplicate key in object 'syscachedcredentials'. [SQLSTATE 23000] (Error 2627) The statement has been terminated. [SQLSTATE 01000] (Error 3621)).
SQL Agent keeps track of whether a job owner has access to the server and whether the job owner is a member of the sysadmin role. If two jobs owned by the same login are started at the same time, both jobs may attempt to insert a row into the same table, rather than one of them performing the insert and the other performing an update. When both jobs attempt to insert the row into the table, a primary key violation occurs.
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 theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack


NOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 1.

The English version of this fix should have the following file attributes or later:
   File name     Platform   ----------------------   s80242i.exe   x86				
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
Stagger the start times for the jobs that are owned by the same login so that only one job is started at a time.
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

Article ID: 286253 - Last Review: 12/06/2015 00:04:56 - Revision: 3.1

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbqfe kbsqlserv2000sp1fix KB286253