Home > SQL server DBA administration, SQL Server Job Management > Resolution for the Maintenance plan error “The INSERT statement conflicted with the FOREIGN KEY constraint

Resolution for the Maintenance plan error “The INSERT statement conflicted with the FOREIGN KEY constraint


Topic: Resolution for the Maintenance plan error “The INSERT statement conflicted with the FOREIGN KEY constraint “FK_sysmaintplan_log_subplan_id”.” At SQL server 2008 R2.

 

 

We have faced the strange issue at sql server 2008 R2 and suddenly start to failed all the  backup maintenance plan due to above  error.

 

Reason: This is caused by multi connections stored within maintenance plan. When we create or edit a maintenance plan from another instance, it creates another connection. It happened cause sometime we are register the sql server from other box and want to modify the current maintenance plan as it automatically saves a new  connection and tries to insert job history in new connection causing FK Violation and eventually job fails.

 

Resolution: Please upgrade the service pack 2 in sql server 2008 R2 environment to resolve the issue permanently or recreate the new maintenance plan as like old.  To avoid such incident Please login to same sql server instance whenever we wish to update\modify any main plan and don’t use other box  to connect the server.

Advertisements
  1. January 31, 2013 at 8:34 pm

    Howdy! This is my first visit to your blog! We are a
    collection of volunteers and starting a new project in a community in the same niche.
    Your blog provided us useful information to work on. You have done
    a extraordinary job!

  2. February 27, 2017 at 10:23 pm

    “Great Blogpost! I couldn’t refrain from commenting. _Perfectly written!”

  3. February 28, 2017 at 3:37 pm

    “Great Blogpost! great threat, i like it, thanks very_ much.”

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: