Recently had some kind of a crash of SSIS on the production server. The cause was this error. After the crash and until server reboot, had messages in the SQL Server log every minute like this:
System.IO.FileLoadException: Could not load file or assembly 'microsoft.sqlserver.integrationservices.server...
Looking to fix this with the CLR suggested in that link. There's another problem: as a result all the SSIS packages which were scheduled while the problem persisted have ended up with rows in SSISDB.catalog.executions with status=1 ("Created").
This is just junk, which will get cleaned out in a couple of weeks. Problem is that one critical job starts by checking whether the package concerned is already (still) running. It does this like this:
SELECT execution_id FROM SSISDB.catalog.executions
WHERE
package_name='The package name.dtsx' AND
status IN (1,2,5,8) -- Created, Running, Pending, Stopping
If it finds anything, exits with error.
So obviously this failed after the server was rebooted, because there were execution records hanging about at status 1 (Created).
Is there a way to completely delete an SSISDB execution record, along with all its dependent rows? I've looked in the SSISDB stored procs (catalog and internal), but can't find anything.