Agent Job Fails with Error: Unable to connect to SQL Server ‘(local)’. The step failed.
We see this error semi regularly in our dev environments, its an easy fix, normally caused by the step running against a speficic database that no longer exists (or has been renamed)
The error message you see is like this:
And if you open up the job to the Step you’ll see that its Database to run from is empty
The solution of course is to re-select the relevant database to run the step against.