SQL Server Agent will not restart after reboot
Question
Tuesday, August 20, 2013 6:27 PM
I have a SQL Server 2008 R2(sp1) stand alone server. When I reboot the server, SQL Server restarts without any issues but SQL Server Agent does not restart. I am receiving the following SQL Server Agent errors:
[000] Unable to connect to server; SQLServerAgent cannot start
[298] SQLServer Error: 18452. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [SQLSTATE 28000]
[382] Login to server failed. (DisableAgentXPs)
[098] SQLServerAgent terminated (normally)
I checked the SQL Server Agent properties and the startup type is set to automatic. The recovery is set to restart the service (after 5 minutes). Does anyone have any suggestions on what I need to do to have SQL Server Agent restart.
All replies (9)
Thursday, August 22, 2013 4:23 PM âś…Answered | 2 votes
I was able to figure out what the problem was. When the server was rebooted, both SQL Server and SQL Server Agent were starting up at the same time. I believe SQL Server Agent was attempting to use SQL Server services that were not available. This caused SQL Server Agent not to log in and create an error.
The solution was going to the Services and opening the properties of SQL Server Agent. I set the startup type to Automatic (delayed start). This resolved the issues.
Tuesday, August 20, 2013 6:29 PM
It implies that the login isn't working... can you look at the service itself and change the login it's using to a valid local admin domain account and see if that works?
Tuesday, August 20, 2013 6:58 PM | 1 vote
Hi Stephen,
Please check the account in which the agent service is running.
open sql server configuration manager-->Sql Server Services-->right click SQl Server Agent-->properties-->Log On Tab
If the agent service is running on a domain account. Check for your domain policy. Whether the policy in domain has been set as like your password will expire after certain days.
If you have changed the password for that account recently, type the new password here and restart the service.
Thanks
Tuesday, August 20, 2013 9:02 PM
The account is a local windows account and not a domain account. The password for this account is set to not expire. Here is the SQL Server logs when the login error occurs:
Error: 17806, Severity: 20, State 14.
SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of the failure. [CLIENT: <local machine>]
Error: 17806, Severity: 20, State 1.
Login failed. The login is from an intrusted domain and cannot be used with Windows authentication. [CLIENT: <local machine>]
Tuesday, August 20, 2013 9:14 PM
Hi Stephen,
Please can you try this with a domain account. The error message states that it doesn't like the fact that it isn't a domain account. I'm not sure why this is, but to verify we need you to try this with a domain account.
Thanks
Tuesday, August 20, 2013 9:17 PM | 1 vote
Hello,
Please read the following resources:
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com
Wednesday, August 21, 2013 5:42 AM
Hi,
The below link might also help you,
Thanks & Regards RAJUKIRAN L Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers.
Wednesday, August 21, 2013 8:04 AM
Error: 17806, Severity: 20, State 14.
SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of the failure. [CLIENT: <local machine>]
Error: 17806, Severity: 20, State 1.
Login failed. The login is from an intrusted domain and cannot be used with Windows authentication. [CLIENT: <local machine>]
Hi stephenbp,
As Alberto post, it may seem that the issue is related to Kerberos, because we see most of the SSPI handshake error messages due to Kerberos failure, which would most likely be related to non-existent SPN or bad SPN for SQL Server. We would expect that, for local connections, we are connecting over NTLM and the SPN is not required for NTLM.
There is a reference discussion on the same error, you can refer to this forum post. http://social.msdn.microsoft.com/Forums/sqlserver/en-US/642272d5-2a3b-43de-b1a8-cff8be317292/error-18452-severity-14-state-1-error-17806-severity-20-state-2
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support
Friday, August 23, 2013 1:24 AM
Hi stephenbp,
I am glad to hear that the issue is resolved, and thanks for your post a reply to share your solution. Other community members could benefit from your sharing.
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support