SQL Server Agent can't start

  • Hello,

    I have these messages while trying to start the Agent. Knowing that a day before, it worked without any problems : all the tasks were well scheduled and executed.

    - Message from Event viewer :

    Type: Error

    Source: SQLAGENT$C1TEST

    Category: Service Control

    Event ID: 103

    Date: 07/08/2010

    Time: 10:16:30 AM

    User: N/A

    Computer: MyServer

    Description:

    SQLServerAgent could not be started (Reason: Could not connect to server "MyServer". SQL ServerAgent could not be started).

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    - Message from Log viewer of Management Studio (log du sql aussi)

    2007-03-15 09:40:02 - ! [298] SQLServer Error: 2, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

    2007-03-15 09:40:02 - ! [165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]

    2007-03-15 09:40:02 - ! [298] SQLServer Error: 2, 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]

    2007-03-15 09:40:02 - ! [000] Unable to connect to server '(local)'; SQLServerAgent cannot start

    2007-03-15 09:40:07 - ! [298] SQLServer Error: 2, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

    2007-03-15 09:40:07 - ! [165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]

    2007-03-15 09:40:07 - ! [298] SQLServer Error: 2, 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]

    I tried to start it manually in SQL Server Management, still not working!

    Do you have any idea please??? I've been searching for a solution for several days ...

    Thank you very much in advance!

  • Try entering the actual instance name in "ServerHost" under

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\SQLServerAgent

    in registry.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Hello,

    This might be a silly question but do you mind giving some more details please? (I'm kind of new in this ...)

    Where can I find the registry that you talked about? And when I find it, I have to type this line "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\SQLServerAgent" don't I?

    Thank you again.

  • ahhh, I found it. Thank you but it didn't work.

    As the SQL server agent is on "off" status, when I tried to change it into "active", I've got a message from WMI provider "can't call a distant procedure".

    Is it normal?

    Thank you.

  • Has the password been changed, look in SQL Server configuration manger and ensure the right password in stored. Another thing to look at is trying to start the service from the command prompt using:-

    net start SQLSERVERAGENT

    Facts are stubborn things, but statistics are more pliable - Mark Twain
    Carolyn
    SQLServerSpecialists[/url]

  • Oh, Yes, actually, the password of my login to the server has been changed. Where can I find the password in stored? I was using "local system" for all the services so does it have any impacts?

    I also tried another solution: I rechanged to the previous password. It seemed to work better (or not). But " SQL Server Agent started and stopped because it had no task to do, for example Alert Services or Performance Log" - message sent by Computer Management when I tried to start the agent.

    Otherwise, does the fact that I have 2 instances on the server have anything to do with this?

    Thank you.

  • The SQLAGENT.out file should have more details as to why it failed. This file is usually located at

    [Installation Drive]\Microsoft SQL Server\MSSQL.1\MSSQL\LOG

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • The details are also what you could see from above, in the paragraph of Log viewer of Management Studio. (It's actually the same message)

  • Also the value of the key should be the exact name of the instance!

    Get that value by doing a SELECT @@servername!

  • Problem solved!!!

    In conclusion, I modified the serverhost name in HKEY like Adiga and Twinsoft SME said and also made sure that the password in SQL Configuration Manager is correct as Carolyn Richardson suggested.

    Thank you very much for your help. 🙂

  • Hey Adiga, your solution just saved my day. It's awesome and many thanks.

  • change the ServerHost Name worked for me.

    tks guys

    DBA from SD...

  • Thanks to Adiga. This fix is great.

  • I had similar issue running SQL Server Agent for one of instances There are 2 instances of SQL on the machine by the way.

    I got the message:
    "Message
    [000] Unable to connect to server 'SQLDB01\SQLDB'; SQLServerAgent cannot start"

    I have 2 instances : SQLDB and DEVDB
    The only way which helped me to change ServerHost in register to "SQLDB01". Before SQL Server Agent thought that server name is "SQLDB01\SQLDB" and was not able to connect.

    Thank you everyone!!!

  • Adiga - Wednesday, August 11, 2010 9:26 AM

    Try entering the actual instance name in "ServerHost" underHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\SQLServerAgentin registry.

    I had similar issue where SQL Server agent keeps crashing...by entering the actual instance name + PortNumber on  "ServerHost" did the trick for me. 

    Thanks everyone.
    Abdifatah Gaal

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply