Hi,
One of my SQL Servers I have a job that runs a maintenance plan. I recently recreated the job on a different SQL Server and exported the SSIS package relating to the maintenance plan to that server. Now when I run the job on the new server it fails with the following error:
Date 01/08/2013 09:53:50 Log Job History (TimeWare_Full_Backup.Subplan_1) Step ID 1 Server ACHSQL01 Job Name TimeWare_Full_Backup.Subplan_1 Step Name Subplan_1 Duration 00:00:07 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0 Message Executed as user: ACHESON\sqlagent. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 09:53:50 Error: 2013-08-01 09:53:52.13 Code: 0xC002F210 Source: {8CA40E29-4E02-410D-956A-6DD73F1265C8} Execute SQL Task Description: Executing the query "DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp..." failed with the following error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id". The conflict occurred in database "msdb", table "dbo.sysmaintplan_subplans", column 'subplan_id'. The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error Error: 2013-08-01 09:53:55.36 Code: 0xC0024104 Source: Back Up Database Task Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed, and indicate the result using an "out" parameter. End Error Error: 2013-08-01 09:53:55.42 Code: 0xC0024104 Source: {E506B23C-1E30-4FF9-BABA-BD3968DC8EA7} Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed, and indicate the result using an "out" parameter. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 09:53:50 Finished: 09:53:55 Elapsed: 4.727 seconds. The package execution failed. The step failed.
Does anybody know how I can resolve this?
Cheers
Paul