SQL Server Agent Not Starting -- FIX



If you get any of below errors :

  1.  The SQL ServerAgent service on started and then stopped
  2.  The Request failed or the service did not respond in timely fashion. Consult the event log or other applicable error logs for detail.
  3.  StartServiceCtrlDispatcher failed (error 0).
  4.  Unable to renameSQLAGENT.OUT to SQLAGENT.1 (reason: The process cannot access the file because it is being used by another process)
  5.  [257] Startup error: Another instance of SQLServerAgent is already servicing server instance
  6.  [098] SQLServerAgent terminated (normally)
Screen shots : 

If you start sql server agent from configuration manager



If you start sql server agent from SSMS

When sql server didn't start i tried to start same from command prompt. To find sql agent exe check here



If sql agent is not coming and error is not clear then start sql server in console/ verbose mode as below










This simply means SQL server agent is not able rename existing file. So we have to move existing sql agent  log agent log file from current location. is also available here

/*******************************************************************/

sp_configure 'show advanced options' ,1

go 

reconfigure with override

go

sp_configure 'Agent XPs' , 1
go
reconfigure with override
go
EXEC msdb..sp_get_sqlagent_properties
GO
EXEC MSDB.DBO.SP_SET_SQLAGENT_PROPERTIES @ERRORLOG_FILE=N'C:\SQLAGENT.OUT'
GO
EXEC msdb..sp_get_sqlagent_properties
GO
/*******************************************************************/

If this doesn't work the we have to directly go to registry and fix same. But make sure you are pointing to correct "sqlagent.out". If you have more than one instance than be careful.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL server\MSSQL11.MSSQLSERVER\SQLServeragent\Errorlogfile














For me its changed from registry, Make sure before modifying registry you should take backup of same.

7 comments:

  1. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. this page

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. A Dedicated Server requires an operating system that is compatible with the server hardware and the applications or services.

    ReplyDelete
  4. Elevate your online presence with powerful singapore dedicated server. Experience unmatched performance and reliability for your business needs.

    ReplyDelete
  5. Escape to a luxurious best resort in jaipur, where royal elegance meets modern comfort. Enjoy world-class amenities, serene landscapes, and unforgettable experiences.

    ReplyDelete