I'm struggling to get our SQL Server Agent to run a maintenance plan, which used to work in the past. (This is on SQL Server 2008 R2.)
The original problem was that the SQL Server Agent would not start, because it tried to connect to, let's call it "MyServer," which resulted in what appeared to be a network name resolution error. We then changed the alias from "MyServer" to "." (SSMS > SQL Server Agent > right-click Properties > Connection > Alias local host server). This fixed it and we can now start the agent.
The second and current problem is that when I execute a maintenance plan, then the log for the SQL Agent (not the log for the maintenance plan) shows a similar error, that it cannot log on to the server "MyServer." (See below for the exact error.) I updated the maintenance plan's connection to use the IP directly (in a desperate attempt), and I checked the job's user password, but it did not change anything. I think it fails before it gets to this point.
Why does it still want to use "MyServer?" Is there another place where I should set the alias, or clear a wrong alias?
This is a test server, so there is not much control over who changed what, which is probably how things broke in the first place.
Current error:  Logon to server 'MyServer' failed (ConnLogJobHistory)
Error for the original problem (now fixed):  Unable to connect to server 'MyServer'; SQLServerAgent cannot start
I already tried a server rename from "MyServer" to "MyServer.abc.def" (where "abc.def" is the DNS suffix), but the error message still shows a failure to log on to "MyServer" (without the suffix). The plan's data source is ".", so no server name mix-up there. I think the problem occurs before this point.