Christoph Muthmann
Architektur und Administration
Architektur und Administration
Gelegentlich liest man von Fehlern bei diesem Job. Im Jobverlauf findet man dann z. B. diese Bechreibung: "Violation of PRIMARY KEY constraint 'PK_active_sessions_and_requests'. Cannot insert duplicate key in object 'snapshots.active_sessions_and_requests'.
...
Wenn man sich nicht in die Tiefen dieser Verarbeitung für die Systemdaten-Sammlung einarbeiten möchte und auch auf einige Daten der Datensammlung verzichten kann, scheint folgender Weg erfolgsversprechend zu sein:
Hier gestaltet sich die Analyse unter Umständen etwas schwieriger. Das folgende Skript sollte helfen der Ursache auf die Sprünge zu kommen.
SELECT MAX(ID) FROM msdb..sysssislog; -- let it be 12345678
-- increase the logging level from 0 to 1
UPDATE msdb..syscollector_collection_sets
SET logging_level = 1 -- from 0
WHERE name = 'Query Statistics';
--Now run the job "collection_set_3_upload" manually
--check the latest entries in the table
SELECT * FROM msdb..sysssislog WHERE id >12345678; --- replace this with the proper value
--Check the "Message" column, which actually stores the exact error message.
--Once you fix this issue, change the logging back to 0
UPDATE msdb..syscollector_collection_sets
SET logging_level = 0
WHERE name = 'Query Statistics';
Zufall oder nicht, bei mir trat der Fehler mit einer Datei auf, in der genau der Zeitraum der herbstlichen Sommerzeitumstellung enthalten war. Da haben wir ja auch zweimal die Zeit von 2:00 Uhr bis 3:00 Uhr!.
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK_active_sessions_and_requests'. Cannot insert duplicate key in object 'snapshots.active_sessions_and_requests'. The duplicate key value is (578211, 2012-10-28 02:58:11.7970000 +02:00, 1).".
| Print article | This entry was posted by Christoph Muthmann on 30.11.12 at 13:21:00 . Follow any responses to this post through RSS 2.0. |