FIX: Multiple SQL Agent Jobs Launched At The Same Time May Fail With Primary Key Error Message (286253)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q286253
BUG #: 351502 (SHILOH_BUGS)
SYMPTOMS
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)).
CAUSE
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.
RESOLUTIONTo 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 INF: How to Obtain the Latest SQL Server 2000 Service Pack
HotfixNOTE: 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.
WORKAROUND
Stagger the start times for the jobs that are owned by the same login so that only one job is started at a time.
STATUSMicrosoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Modification Type: | Major | Last Reviewed: | 10/9/2003 |
---|
Keywords: | kbBug kbfix kbQFE kbSQLServ2000sp1fix KB286253 |
---|
|