Currently, I am transitioning a server from a company to another.
They want to keep SQL Server installed on the server so we are wiping clean all the databases, maintenance plans and jobs.
I'm trying to delete a bunch of SQL Server Agent jobs but even though they are disabled they are still on "IDLE" mode so it raises me the following error when trying to delete them:
Drop failed for Job
job_name.Subplan_1
. (Microsoft.SqlServer.Smo
)An exception occurred while executing a Transact-SQL statement or batch. (
Microsoft.SqlServer.ConnectionInfo
)The
DELETE
statement conflicted with theREFERENCE
constraintFK_subplan_job_id
. The conflict occurred in database "msdb", tabledbo.sysmaintplan_subplans
, columnjob_id
.The statement has been terminated. (Microsoft SQL Server, Error: 547)
How can I remove the IDLE status from the job so the delete gets through?