Maintenance Plans Execution Failure

I'm using SQL Server 2008R and I experince the following error on every package I create and execute:
"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. "
Do you have any experience?
Below, the complete error messege
Executed as user: *******. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4000.0 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  6:37:47 AM  Error: 2014-02-01 06:37:47.81    
Code: 0xC002F210     Source: {A77A0D78-E4F8-48DA-9933-68E53270789C} 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  Warning: 2014-02-01
06:37:47.81     Code: 0x80019002     Source: OnPreExecute      Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, 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  Progress: 2014-02-01 06:37:48.37    
Source: Check Database Integrity Task      Executing query "USE [*******]  ".: 50% complete  End Progress  Progress: 2014-02-01 06:37:51.58     Source: Check Database Integrity Task     
Executing query "DBCC CHECKDB(N'*******')  WITH NO_INFOMSGS...".: 100% complete  End Progress  Progress: 2014-02-01 06:37:51.58     Source: Check Database Integrity Task      Executing query
"USE [*******]  ".: 50% complete  End Progress  Progress: 2014-02-01 06:37:54.19     Source: Check Database Integrity Task      Executing query "DBCC CHECKDB(N'*******')  WITH
NO_INFOMSG...".: 100% complete  End Progress  Error: 2014-02-01 06:37:54.20     Code: 0xC0024104     Source: Check Database Integrity 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: 2014-02-01 06:37:54.20    
Code: 0xC0024104     Source: {23A7637D-F19B-4BDA-BF4E-D82C1A7F3682}      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  Warning: 2014-02-01 06:37:54.20     Code: 0x80019002     Source: OnPostExecute     
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, 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  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  6:37:47 AM  Finished: 6:37:54 AM  Elapsed:  6.692 seconds.  The
package execution failed.  The step failed.
Thank you in advance for the help.
Martino Pavone

Hi,
The cause of this problem was that the job had become orphaned. We can prove this by doing the following test.
use msdb
go
select * from dbo.sysjobs
go
sysjobs in MSDB which stores the information for each scheduled job to be executed by SQL Server Agent.
Copy the job ID for the job that had stopped working and check in sysmaintplan_subplans for the same job ID.
use msdb
go
select * from sysmaintplan_subplans where job_id = <JOBID of that job that is a part of the maintenance plan which has stopped execution>
go
sysmaintplan_subplans in MSDB is updated by the SQL Server which contains the information like the job id ,Plan_id ,Sub_plan name, subplan_id.
If the job ID is present in the sysjobs but not in the sysmaintplan_subplans table then the job becomes orphaned.
You may get an output which returns no rows and returns only the column names. Or get the below error:
Msg 8169, Level 16, State 2, Line 1
Conversion failed when converting from a character string to uniqueidentifier.
To work around this problem, manually create the record of the maintenance plan that you import. See the below KB article for details:
BUG: Error message when you try to save a maintenance plan in SQL Server Management Studio: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"
http://support.microsoft.com/kb/922651
Thanks.
Tracy Cai
TechNet Community Support

Similar Messages

  • Order from maintenance plane

    hi experts,
    after maintenance plane execution order is genrated , but i can not see it in iw38 but after go to ip10 check there order ,save and again check it in iw32 then it is present how it is , i am confuse please tell me exact what happen in this condition
    thanks
    suhas

    hi
    what do you mean by Maintenance plan execution?
    the process flow is like this
    create a maintenace plan with required frequency
    Run the IP10 for the maintenace plan you have created( system will calulate the plan date if the date is already passed system will create an order and will say scheduled save to call hence when you save it will generate an order)
    i think you forgot to save ,kindly check once again and revert back
    regards
    thyagarajan

  • Send a Failure Email Notification After Load Plan execution in ODI 11g

    Hi Experts,
    Greetings!
    I am trying to send an email if any of the step fails during Load Plan execution. Irrespective of the failed object, only 1 email should be sent to the Administrator. I unable to do this. Mails are getting sent for the no of times the no of object fails. For eg if 10 out of 100 steps fails, 10 emails are getting sent. I need to send only 1 email.
    I am using ODISendMail.
    I have tried various combinations however, all in Vain.
    For instance:
    root step --> Exeception Step (Send Failure Email) and Execption behaviour (Run Exception and Ignore). Using this because, I dont want to stop the load plan on the step failure.
    Interface1: Exeception Step (Blank) and Execption behaviour (Run Exception and Ignore).
    Interface2: Exeception Step (Blank) and Execption behaviour (Run Exception and Ignore).
    Exception not getting executed.
    Please help.
    Regards,
    Andy

    Thanks SH.
    I tried your suggestion as per below.
    1. Created global variable "v_cnt" with default value "0"
    2. Created package "pkg_v_cnt" to increment the variable by 1
    3. created package "pkg_sendError_Email" to check if v_cnt > 0 then Send Error Email.
    For Instance, the loan plan looks like this:
    root step --> Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Raise)
    Interface1: Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Ignore).
    Interface2: Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Ignore).
    Send Error Email (pkg_sendError_Email)
    The issue here is that, the variables are not getting the incremented value and hence unable to send email . The variable value remains "0" even after execution of the exception steps when both interfaces fails.
    Pls help.
    Thanks,
    Andy

  • Maintenance plan for backup executes endlessly.

    Hi All,
    I have a maintenance plan for a full back which is scheduled to run once every night. It has been running quite peacefully with out any error and usually takes 50min average. But Now(the last three days), it starts executing but never completes. I tried
    to run sp_who2 and saw a block when the execution reaches at a specific database. I stopped the execution, killed the spid on the 'Blk By' and then restarted the execution but same problem show up again. Whats going on? Any ideas?
    Thanks.

    -So as you told me i ran the sp_readerrorlog and found the below message. Looks like a virtual device kind of a things . . . .  
    2014-04-03 09:20:24.280 spid148      BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device '(local)_AAA_DEV_SQL_Database-SQL_Database-1396486800084#11-3006-SQL'.
    Operating system error 995(The I/O operation has been aborted because of either a thread exit or an applicat.
    And last night i tried to change the schedule at which the job is running and it worked well for today
    but i think its not going to be like this today or on the weekends. So i couldn't see any block.
    Thanks. 
    Tina
    VIRTUAL_DEVICE generally means here that anything which is not local or shared disk.Like thrid taking party tool backup on tape or VSS backups  which kind of take snapshot backup.If youo say that no Third party toll is involved and you dont want any
    VSS backups please disable SQL Server VSS writer service.This will stop the VSS backups.Or as you suggested ,if you want VS backups ,you can schedule your backup at different time.
    >>And last night i tried to change the schedule at which the job is running and it worked well for today
    I guess I am correct about VSS backups interfereing your regular backup.
    PS: Since you killed the thread you got message like below
    BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device '(local)_AAA_DEV_SQL_Database-SQL_Database-1396486800084#11-3006-SQL'. Operating system error 995(The I/O operation has been
    aborted because of either a thread exit or an applicat.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Maintance jobs with Maintenance plans - troubleshooting

    Some of our old servers have maintenance jobs created with inbuilt mainteance plans. We find difficulty in troubleshooting these kind of jobs when it fails. Can anyone shed a detailed analysis of how to troubleshoot these jobs which are created with maintenance
    plan like where to look, any system table/view that could help etc. The job history gives very minimal details and often result in cropped off messages.
    I was told that if we alter the maintenace plans associated with the jobs and save it. It will break the job, is it so?

    For SQL server 2000
    You can check the failure logs either from jobs or Maintenance plan history
    In enterprise manager, expand the server group
    Expand the management folder and select the database maintenance plans
    Right click the maintenance plan that failed and select the Maintenance plan history
    Check for the failure occurred and double click the failed row to see more details or on failure
    Similarly from SQL server 2005 onwards maintenance plan history, you can check from maintenance plan
    In SSMS, connect to SQL instance
    Expand the Management folder and select the maintenance plans
    Select the maintenance plan and click on maintenance plan history and check for the failure
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Backup Maintenance Plan on SQL AlwaysOn Availability Group Secondary Read-Only node

    I have 3 node SQL 2012 AlwaysOn Availability nodes with the 3rd node as Read-Only.
    The backup job within SQL Maintenance plan is failing with the following error:
    Failed:(-1073548784) Executing the query "declare @backupSetId as int
    select @backupSetId =..." failed with the following error: "Cannot open backup device 'C:\\SQLDBName_backup_2014_06_08_170156_9292095.bak'. Operating system error 2(The system cannot find the file specified.).
    VERIFY DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    I have verified the SQL AlwaysOn Backup preference to be "Prefer Secondary"
    Is there any special steps/settings I need to do to setup and run the backups using maintenance plan in SQL AlwaysOn?

    Hi,
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan

    Hi Experts,
    IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan for Daily/weekly??
    Vinai Kumar Gandla

    Hi Vikki,
    Many systems rely solely on SQL Server to update statistics automatically(AUTO UPDATE STATISTICS enabled), however, based on my research, large tables, tables with uneven data distributions, tables with ever-increasing keys and tables that have significant
    changes in distribution often require manual statistics updates as the following explanation.
    1.If a table is very big, then waiting for 20% of rows to change before SQL Server automatically updates the statistics could mean that millions of rows are modified, added or removed before it happens. Depending on the workload patterns and the data,
    this could mean the optimizer is choosing a substandard execution plans long before SQL Server reaches the threshold where it invalidates statistics for a table and starts to update them automatically. In such cases, you might consider updating statistics
    manually for those tables on a defined schedule (while leaving AUTO UPDATE STATISTICS enabled so that SQL Server continues to maintain statistics for other tables).
    2.In cases where you know data distribution in a column is "skewed", it may be necessary to update statistics manually with a full sample, or create a set of filtered statistics in order to generate query plans of good quality. Remember,
    however, that sampling with FULLSCAN can be costly for larger tables, and must be done so as not to affect production performance.
    3.It is quite common to see an ascending key, such as an IDENTITY or date/time data types, used as the leading column in an index. In such cases, the statistic for the key rarely matches the actual data, unless we update the Statistic manually after
    every insert.
    So in the case above, we could perform manual statistics updates by
    creating a maintenance plan that will run the UPDATE STATISTICS command, and update statistics on a regular schedule. For more information about the process, please refer to the article:
    https://www.simple-talk.com/sql/performance/managing-sql-server-statistics/
    Regards,
    Michelle Li

  • Assign Maintenance Planning Plant to Maintenance Plant

    Hi All,
    What is the purpose of the configuration node "Assign Maintenance Planning Plant to Maintenance Plant"?
    What happens if we don't maintain this configuration?
    Regards,
    Devasenapathy.K

    Hi ,
    Maintenance Planning Plant and Planning Plant are different
    In Logistics you define Plant which has to be distinguished as Maintenance Planning Plant . In these Plants you will plan for all your maintenance tasks
    You can plan and created
    1. Task list
    2. Planning and scheduling of Maintenance Plans
    3.creation of  Notifcations
    4. Execution of Maintenacne Orders
    Maintenance Plants are also termed as Plants in which your technical objects are installed
    For example, if an equipment X is installed in the Plant 0001 then Plant 0001 is called as Planning Plant and this plant on its own cannot plan for maintenance activities unless it is created as Maintenance Planning Plant
    if this Plant 0001 is created as Maintenance Planning Plant, then this plant is responsible for Planning and execution of tasks for maintenance
    this is where your assignment is needed, if not Maintenance and execution cannot happen
    hope it is clear
    thanks

  • "Value cannot be null" error when trying to edit or create Maintenance Plan in SQL Server 2008

    I have SQL Server 2008 installed on Windows Server 2008 64bit, every time I try to open or create a new Maintenance Plan I receive the error:
    Value cannot be null.
    Parameter name: component (System.Design)
    Program Location:
       at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetDesigner(IComponent component)
       at Microsoft.DataTransformationServices.VsIntegration.DtsDesignerService.OpenDesigner(String connectionString, Object connection, String objectUrn)
       at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()
    And in the Design view screen
    "Microsoft SQL Server Management Studio is unable to load this document: Could not load type 'Microsoft.SqlServer.Dts.runtime.Wrapper.IDTSPackageSigning100' from assembly 'Microsoft.SqlServer.DTSRunTimeWrap, Version=10.0.0.0, Culture=neutral'. 
    I have searched for a possible solution and have tried some suggestions of registering the msxml6.dll but and have installed VS2008 SP1 but I'm not in a position where I can do a full reinstall of SQL Server right now. Any help is appreciated. My SQL server
    environment information is below. 
    Microsoft SQL Server Management Studio
    10.0.1600.22 ((SQL_PreRelease).080709-1414 )
    Microsoft Analysis Services Client Tools
    2007.0100.1600.022 ((SQL_PreRelease).080709-1414 )
    Microsoft Data Access Components (MDAC)
    6.0.6002.18005 (lh_sp2rtm.090410-1830)
    Microsoft MSXML 3.0 4.0 5.0 6.0 
    Microsoft Internet Explorer 8.0.6001.18943
    Microsoft .NET Framework 2.0.50727.4206
    Operating System 6.0.6002

    I digged a little deeper and figured out it was a missing directory/file in %TEMP%. Seems some CleaningTool removes all files/directories in %Temp% and after that SSMS was not working any longer. The missing file is actually not needed, but the
    missing directory causes the "Value cannot be null" error.
    My missing file name was:
    C:\Users\<username>\AppData\Local\Temp\2\6vvdaozf.tmp
    But the file name changes on every startup.
    So my missing directory name was:
    C:\Users\<username>\AppData\Local\Temp\2
    After creating a empty directory with the name "2" in %TEMP% all went back to work fine for me.
    I'm not sure the directory name is every time the same, but you can discover your missing file with the process monitor from Sysinternal Tools and filters to "Process Name is ssms.exe" and "Path contains AppData\Local\Temp"
    Hope this helps other people to solve their issues too.
    Thank you!! When I run %temp% it takes me to "C:\Users\Admin ...~\AppData\Local\Temp\some random number". At first the random number was 3, after I logged off and back on it was 2. My temp variable in enviromental variables is correct. I looked on another machine
    running SQL2008 and temp is correct there. If I try to rename the numbered folder SSMS stops working. Any idea?

  • Work Order - Maintenance Planning plant change

    Hi Gurus,
    Is there any way to change the maintenance planning plant in a created work order? We are having an issue on work orders and we need to tranfer our open work orders to another plants to solved the issue. Please me let me know if this is possible to do in SAP. And let me know how to do it in SAP.
    Thanks in advance,

    Hi,
    The start of the plan is not option as this will surely have an impact. Anyway, work around for this issue was provided and this is OK now. We will continue with the old orders untill such time they will finally be closed. No postings will be created against this old orders and if there's a need to do GR new orders will be created in new plants for the postings.
    Thanks for you help,

  • No maintenance plan has been confirmed for Order 000004024181; Follow-up ca

    Hi
    I try to close a list of preventive order (initiated by maintenance plan) from the transaction IW38 but the system displays the following error message
    "No maintenance plan has been confirmed for Order 000004024181; Follow-up call exists
    Message no. IW597"
    thank you for your help

    Hi,
    You mean close -
    >TECO???
    If yes Go in IW38 select all orders  ,click Enviroment Tab and you can do the TECO but that order should not have Open reservation.
    Regards,
    Rakesh
    Edited by: RAKESH ASHOK MANE on Aug 26, 2010 1:02 PM

  • Certain Maintenance Plan not getting scheduled in the background job

    Hi Gurus,
    I am facing an issue here.
    A weekly background job (RISTRA20) runs every weekend and schedules the maintenance plans.
    But we have noticed that some maintenance plans are not getting scheduled. i.e no orders or schedule is getting generated.
    When I run IP30 manually for these plans then the schedule gets generated and orders get called.
    I have checked up the background job and it is running fine.
    Also, i have noticed a similarity in all these plans which are not getting scheduled. There schedule has been restarted (through IP10) at somepoint or the other.
    But i don't see any direct impact of this?
    Can any of you provide some help on this?? Points will be rewarded.
    Thanks and regards,
    Nitin Saini

    Hi Narender,
    Thanks for replying.
    The message number for 'Groups don't match' is ME303.
    I think this does not have anything to do with the restart as i have done further investigation.
    Whenever I run IP30 with sortfield input as AS02*, i get the error as mentioned above for a certain number of maintenance plans while the remaining plans get scheduled.
    If i run IP30 for any other sort fields, it runs fine and i don't encounter the error
    mentioned above.
    If you send me ur email address, i could forward you screen-shots of the issue.

  • Maintenance Item assignment to a Maintenance Plan

    Dear Expert,
    we need some help about the following scenario.
    Currently we are working on preventive maintenance in SAP ECC 6.0 system. We have created several maintenance items without assignment to maintenance plans in order to use them like models: to make quickly the creation of a maintenance plan our users can choose the suitable maintenance item from a range.
    In these items we have inserted only strategy and maintenance task list but we have not insert the technical object.
    We carry out the following steps:
    1. we run transaction IP42;
    2. we insert the maintenance category and the strategy;
    3. in the tab "Item" we press the button "Assign more items";
    4. system runs report RIMPOS00 (Display Maintenance Item: Selection Criteria) in order to select the item to insert in the maintenance plan. In this screen the followin fields are locked (we can not change them):
    - "Maint. plan cat.";
    - "Maintenance strategy";
    - "MaintPlan assignment" and the radio botton is set on "without".
    In this way if a maintenance item has been already assigned to a maintenance plan users can not select it for the current plan.
    In your opinion could we open the radio buttons for the field "MaintPlan assignment" ? Could anyone help us ?
    Thank you very much for your help.
    Kind regards.

    Hi,
    Pl.try following path in SPRO,
    Plant Maintenance and Customer Service..Maintenance Plans, Work Centers, Task Lists and PRTs..
    Maintenance Plans..Set List Editing for Maintenance Items
    After clicking on Execute button u will get a pop up " Customising list editing "Double click on selection do the changes & save.
    It will work i think.
    Pl.try.
    Regards,
    Amit

  • Reversal of a maint. order which was released through a maintenance plan?

    Hi All,
    Is there a way to do reversal of a maintenance order that was released through a maintenance plan?
    Because I do not want to process the order; as such I would like to put a reversal indicator for that order and go ahead with the next order that was called through a maintenance plan.
    If YES, kindly let me know how to do it?
    Many thanks in advance.
    Kannan J

    Hi Thyagarajan, Thanks for the response!
    When I want to skip the maintenance call object that was generated through a plan, the system gives me the following message.
    "CALL CAN NO LONGER BE SKIPPED"
    When I press for further help, system gives me the following message:
    "Call can no longer be skipped
    Message no. IP405
    Diagnosis
    You have tried to skip a date that has already been called.
    System Response
    Since maintenance call objects, for example, maintenance orders, already exist for the dates that have been called, you can no longer skip a date within the scheduling process.
    Procedure
    If you do not want to perform the maintenance call objects due on that date, you must reverse the orders that have been called.
    You can select the maintenance call objects that have been called using the list editing functions in maintenance processing."
    Which means there should be a way to reverse the order, isn't it?
    May be with this message you may be able to throw some help on this.
    Many thanks in advance
    Kannan J

  • Unable to edit maintenance plan Sql Server 2008R2

    Hi All,
    I am unable to edit sql server maintenance plan and it is failing continuously from job as well.When I try to open the same the throws an error:
    Microsoft SQL Server Management Studio is unable to load this document.:
    Error loading from XML. No further detailed error information can be supplied for this problem because no Event objects was passed where detailed error information can be stored. It used to work pretty well in the past.Throws same error when I try to connect
    remotely.
    Regards
    Rahul

    Has the MP been developed in SQL Server 2008r2 as well?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • Problem with radius and wep/wpa

    Hi I have problem with wrv200 (1.0.38) +freeradius (2.0.5) +wpc54g v3.1 with wxp with patch to use wpa/wpa2 I think that authentication in my radius pass correct but there is some problem with wpa mode or wpa compatibility In my wrv200 I try mode: wp

  • How to migrate mail system from one hard drive to another under 10.6.8 in a macpro

    how do you migrate mail settings, calendar information, etc from one hard drive to another under 10.6.8 in the same computer?  Migration Application does not show this option.  It shows from an old computer to another, etc.

  • How can I reset the CTI for each clip to 00:00?

    I'm brand new to this - got Premier Elements 12 yesterday, so please bear with me. I have clips from a soccer game, each of which starts with 00:00. I have written notes about key scenes in each clip using the time that scene occurs in each clip. But

  • Internal computer noise with firewire audio devices

    Hello I have a Power Mac G5 PPC 2.3 and Mac Os X 10.5.6, with tiger I have the same problem too, I bougnt my Mac for audio work, and from the purchase day, I have the same problem, I bought my first audio sound card, M-Audio Firewire 1814, and I inst

  • CRM 2007 - Customer Fact Sheet

    Hi Gurus, i've been looking for customer fact sheet screen but can't find any in the standard account master screen in CRM 2007. any help really appreciated JD