• dwithroder (5/5/2009)


    I also had to exclude 5 (unknown) from last_run_outcome in usp_getFailedJob. Had a bunch of 0's in the last_run_date in this case and broke the convert.

    Hi

    Are you refering to last_run_date/last_run_time or last_run_outcome? last_run_outcome should not be effected by last_run_outcome.

    If you're refering to the latter, you can customise last_run_outcome. I chose it to fail whenever it was unsuccessful. "last_run_outcome 1" but you don't have to. There's a number for each status in books online such as Running, Disabled etc

    If you are refering to the date, all my jobs have run dates, as they've all been run at sometime, so I rarely have this problem, but if you have a job has never had a run date, then you can give it one manually in the system table or by setting it to report successful when it fails (in the advanced tab of the job). Then run the job once. It will then fail, but report as being successful and give it a proper last_run_outcome date. Then change it back to report failure on failure. From then on, your convert wont break.