Freigeben über


Unable to start SQL Server Agent

We are unable to start SQL Server Agent. It was giving the following error when we were trying to start it from the services console

The SQL Server Agent (MSSQLSERVER) service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.

When we try to change the service account for SQL Server Agent we get the below error,

The process terminated unexpectedly. [0x8007042b]

Tried to start SQL Server Agent from the command prompt using:

SQLAGENT90 -C -V>C:\SQLAGENT.OUT

SQLAGENT.OUT:

Unable to rename C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.OUT to C:\ProgramFiles\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.1 (reason: The system cannot find the path specified)

2007-08-24 10:10:31 - ! [241] Startup error: Unable to initialize error reporting system (reason: The system cannot find the path specified)

2007-08-24 10:10:31 - ? [098] SQLServerAgent terminated (normally)

Resolution:

Checked the value of key ErrorLogFile in the following registry hive:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent

ErrorLogFile key had the below value:

C:\ProgramFiles\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.out

However we did not had any such directory present on the machine. Also we did not had any SQLAgent log file.

Changed the value in the ErrorLogFile key to reflect the correct location of the log folder which was on a different drive.

After making the changes we were able to start the SQL Server Agent.

 

 

Abhishek Soni

Support Engineer, Microsoft SQL Server.

Reviewed By,

Mukesh Nanda,
TL, Microsoft SQL Server

Comments

  • Anonymous
    July 27, 2009
    I saw this problem, but fixed it by allowing the SQL service account modify rights on the folder in the suggested registry key.

  • Anonymous
    August 26, 2009
    The comment has been removed

  • Anonymous
    April 13, 2010
    Thanks ..I struggled with this for hours so that I could install MS DPM...once I followed your steps I was home free!

  • Anonymous
    March 16, 2011
    I am struggeling to set up SQL Server Agent. I ahve changed the registry but still it is giving same message. Can you suggest other alternative. <a href="http://www.ourbody.in">Plastic surgery</a>

  • Anonymous
    March 17, 2011
    Need assistance in starting SQL SERVER Agent. i am facing below mentioned error SQL Server Scheduled Job 'Websense_ETL_Job__wslogdb70' (0xAE9EF75299D6814EAA9FBAC7AF6BCAC0) - Status: Failed - Invoked on: 2011-03-18 18:15:20 - Message: The job failed.  Unable to determine if the owner (sa) of job Websense_ETL_Job__wslogdb70 has server access.

  • Anonymous
    May 02, 2011
    hi, i have win home xp sp3 and have installed sql server 2000 but when i go to query analyzer it is asking me to connect with small authentication,it as written sa in login and pwd is blank,it is not allowing me to move further pls help me with it,as i am not able to practice sql server..

  • Anonymous
    February 21, 2012
    Guys try with disabling VIA port from configuration settings... and try restarting services.. Thanks http://www.parigh.com

  • Anonymous
    January 26, 2013
    The comment has been removed

  • Anonymous
    July 17, 2013
    Thanks for this!

  • Anonymous
    December 10, 2013
    thanx a billion... after trying so many articles yours actually solved my problem

  • Anonymous
    December 24, 2013
    Gr8 this solves my problem after trying so many solutions for an hour

  • Anonymous
    April 14, 2014
    Excellent it worked.  Thanks for the information.  

  • Anonymous
    May 10, 2015
    Good

  • Anonymous
    May 13, 2015
    Using your information above, I can see that in my case, given the multiple instances on my server, that the SQLAgent.OUT being accessed belongs to a different instance.   I've been searching the registry without any luck so far to find out where the registry reference originates that maybe pointing incorrectly.  In this case, the instance for the agent is trying to point to the SQLAgent.OUT owned by the default instance.  It cannot get access (rightfully so).

  • Anonymous
    June 09, 2016
    i am unable to connect sql database from other computer

  • Anonymous
    November 10, 2016
    Wow this is confusing i hope you post actual screenshot of what you are saying,Because there are instances that the location you are saying can be located on other location.I hope you can provide more user friendly explanation