Rich
Rich

Reputation: 3821

SSIS package within msdb, maintenance throwing error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id"

I'm getting the following error when executing a job, which in turn executes an SSIS package that I've just lifted off another SQL Server.

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id"

I think it's saying that there is a list of unique ids of maintenance jobs and that this package's guid isn't in the list. Probably because I just lifted it off another server - but I can't find how to add it to the list anywhere..

Is there a way to register an SSIS package in the maintenance folder so that I don't get this error?

Upvotes: 2

Views: 2881

Answers (1)

Rich
Rich

Reputation: 3821

This turned out to be a bit of a no-brainer.

1) Connect object explorer to Integration Services

2) Navigate to MSDB\Stored Packages\Maintenance folder

3) Import all dtsx packages you wish to use as Maintenance jobs

4) Connect object explorer to database you wish to run the jobs on

5) Under management node, expand Maintenance Plans

6) Open each package and save to generate jobs

Upvotes: 2

Related Questions