I have setup a full backup with SQL SQL Server Integration Services Package type and run as SQL Server Agent Service Account. Log on to the server using Windows Authentication. I kept getting this error when failed.
Execution of job 'ti-schedule - MaintenancePlan.Full Backup (Daily - Noon)' failed. See the history log for details.
Looking at the View History log I see this:
Date,Source,Severity,Step ID,Server,Job Name,Step Name,Notifications,Message,Duration,Sql Severity,Sql Message ID,Operator Emailed,Operator Net sent,Operator Paged,Retries Attempted
08/14/2019 06:42:27,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),,,The job failed. The Job was invoked by User myDomain\myUser. The last step to run was step 1 (Full
Backup (Daily - Noon)).,00:00:03,0,0,My-Comp Web Team,,,0
08/14/2019 06:42:27,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,1,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Full Backup (Daily - Noon),,Executed as user: myDomain\MSDB$. Microsoft (R) SQL Server Execute Package Utility
Version 14.0.3223.3 for 64-bit Copyright (C) 2017 Microsoft. All rights reserved. Started: 6:42:27 AM Error: 2019-08-14 06:42:28.45 Code: 0xC002F210 Source: {36B626B3-A88D-4AF3-8B63-14B1D89E24FE}
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"<c/> table "dbo.sysmaintplan_subplans"<c/> column 'subplan_id'. The statement has been terminated.". Possible failure reasons: Problems with the query<c/> "ResultSet"
property not set correctly<c/> parameters not set correctly<c/> or connection not established correctly. End Error Warning: 2019-08-14 06:42:28.45 Code: 0x80019002 Source: OnPreExecute Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the
number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning Error: 2019-08-14 06:42:28.55 Code: 0xC0024104 Source: {F0D2A16A-319D-4C6E-9AEC-21270919782F} 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<c/> and indicate the result using an "out" parameter.
End Error Warning: 2019-08-14 06:42:28.55 Code: 0x80019002 Source: OnPostExecute Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but
the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning Warning:
2019-08-14 06:42:28.55 Code: 0x80019002 Source: ti_schedule - MaintenancePlan Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but the number
of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning DTExec: The package
execution returned DTSER_FAILURE (1). Started: 6:42:27 AM Finished: 6:42:28 AM Elapsed: 0.766 seconds. The package execution failed. The step failed.,00:00:03,0,0,,,,0
08/13/2019 11:40:00,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),,,The job failed. The Job was invoked by Schedule 12 (ti_schedule - MaintenancePlan.Full Backup (Daily
- Noon)). The last step to run was step 1 (Full Backup (Daily - Noon)).,00:00:01,0,0,My-Comp Web Team,,,0
08/13/2019 11:40:00,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Error,1,MSDB\ti,ti_schedule - MaintenancePlan.Full Backup (Daily - Noon),Full Backup (Daily - Noon),,Executed as user: myDomain\MSDB$. Microsoft (R) SQL Server Execute Package Utility
Version 14.0.3223.3 for 64-bit Copyright (C) 2017 Microsoft. All rights reserved. Started: 11:40:00 AM Error: 2019-08-13 11:40:00.96 Code: 0xC002F210 Source: {36B626B3-A88D-4AF3-8B63-14B1D89E24FE}
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"<c/> table "dbo.sysmaintplan_subplans"<c/> column 'subplan_id'. The statement has been terminated.". Possible failure reasons: Problems with the query<c/> "ResultSet"
property not set correctly<c/> parameters not set correctly<c/> or connection not established correctly. End Error Warning: 2019-08-13 11:40:00.96 Code: 0x80019002 Source: OnPreExecute Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the
number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning Error: 2019-08-13 11:40:01.06 Code: 0xC0024104 Source: {F0D2A16A-319D-4C6E-9AEC-21270919782F} 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<c/> and indicate the result using an "out" parameter.
End Error Warning: 2019-08-13 11:40:01.06 Code: 0x80019002 Source: OnPostExecute Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but
the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning Warning:
2019-08-13 11:40:01.06 Code: 0x80019002 Source: ti_schedule - MaintenancePlan Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded<c/> but the number
of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. End Warning DTExec: The package
execution returned DTSER_FAILURE (1). Started: 11:40:00 AM Finished: 11:40:01 AM Elapsed: 0.828 seconds. The package execution failed. The step failed.,00:00:01,0,0,,,,0