Skip to content

SQL Server agent service failing with errors

SQL Server agent service may fail with following errors and you may find below errors in SQL Server agent log file:-
2011-10-26 10:58:10 - ! [298] SQLServer Error: 10061, TCP Provider: No connection could be made because the target machine actively refused it. [SQLSTATE 08001]</div>
<div>2011-10-26 10:58:10 - ! [165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]</div>
<div>2011-10-26 10:58:10 - ! [298] SQLServer Error: 10061, An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [SQLSTATE 08001]</div>
<div>2011-10-26 10:58:10 - ! [000] Unable to connect to server 'MSSQLSERVER\TEST'; SQLServerAgent cannot start</div>
<div>2011-10-26 10:58:15 - ! [298] SQLServer Error: 10061, TCP Provider: No connection could be made because the target machine actively refused it. [SQLSTATE 08001]</div>
<div>2011-10-26 10:58:15 - ! [165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]</div>
<div>2011-10-26 10:58:15 - ! [298] SQLServer Error: 10061, An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [SQLSTATE 08001]</div>
<div>2011-10-26 10:58:15 - ! [382] Logon to server 'MSSQLSERVER\TEST' failed (DisableAgentXPs)</div>
<div>2011-10-26 10:58:16 - ? [098] SQLServerAgent terminated (normally)
SQL Server agent may not start and will fail with above errors after you have changed the port number for SQL Server. One of the reson for this failure is that you already have a alias created for this instance and it is using the old port number.
In order to fix this issue, go to SQL Server configuration Manager –> SQL Native Client Configuration –> Aliases. Here check the properties of alias created for the instance and make sure the port number is correct, else correct the same and try to start SQL Server agent srevice again. It will start ithout issues.
So, bottom line is to make sure that port number being used by the instance mentioned under TCP/IP and in alias is same. Else SQL Server agent will not start and will just fail.

Comments

  1. Wallace Houston says:

    What if there are NO ALIASES? The agent logon is LOCAL SYSTEM. I also get the ODBC error. There are no Data sources set up in ODBC. This server has been set up this way for 4 years, but we only get the login timeout and ODBC errors occasionally.