I've noticed that sysJobActivity shows a number of jobs where the stop_execution_date is NULL, but the run_requested_date is up to 3 years ago, so it looks like the job started 3 years ago and has not yet finished.
If I look at these jobs in Redgate SQL Backup or in SQLSoft SQLjobvis then it looks like the jobs are just starting and ending on their usual schedules.
I have 24 jobs in total like this, and it looks like the run_requested_date on them is in batches of around the same date/time per batch, so at first I though it might be something to do with the server being restarted and leaving jobs hanging, but the more recent ones were only 2 months ago and the server hasn't been restarted in over a year (it's a live/production server that is used 24/7).
So my questions are:
(1) What might have caused this?
(2) Is it safe to just do an UPDATE on these records and change the stop_execution_date to something like '1900-01-01'
(3) Are there any better ways to tidy this up?
EDIT: Source code to quickly see what I mean:
DATEDIFF(mi, activity.run_requested_Date, GETDATE()) as Elapsed
ONjob.job_id = activity.job_id
WHEREactivity.run_requested_date IS NOT NULL
ANDactivity.stop_execution_date IS NULL
--AND run_Requested_date >= '2013-01-01'
ORDER BY 4