none
SQLAGENT CAN't START

    Question

  • SQLAGENT CAN't START

    this log:

     

    SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).

     

    Thursday, January 11, 2007 10:33 AM

Answers

  • I fixed it...

    I found that the Agent XPs wasn't enabled...

    So I enabled it using this script:

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Agent XPs', 1;
    GO
    RECONFIGURE
    GO
    Thursday, March 01, 2007 5:18 PM

All replies

  • Which account is the service running with ?

    HTH, Jens K. Suessmeyer.

    ---
    http://www.sqlserver2005.de
    ---

    Thursday, January 11, 2007 1:23 PM
  • it's run administrator account.

    I tested in local and domain administrator .

    I also tested in local system

    D. schmitt

    Thursday, January 11, 2007 2:24 PM
  • I am receiving the same error.  For some odd reason my sqlserveragent will not start.  I am using a domain accoutn that does have access to sysadmin on sql server 2005.  were you able to get this running.
    Friday, February 16, 2007 3:34 PM
  • check sql server agent error log...post the error..

     

    Madhu

    Saturday, February 17, 2007 10:15 AM
  • In the event viewer we have the following error:

    Event Type: Error
    Event Source: SQLSERVERAGENT
    Event Category: Service Control
    Event ID: 103
    Date:  3/1/2007
    Time:  10:16:30 AM
    User:  N/A
    Computer: MyServer
    Description:
    SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).

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

     

    Thursday, March 01, 2007 3:32 PM
  • the error is self descriptive... your startup account is not having enough permission. Add this particular startup (preferably Domain user) to sysadmin role

     

    Madhu

    Thursday, March 01, 2007 3:40 PM
  • Yes, but the problems is because the user is in the sysadmin role on the SQL Server, and I tried the user as a local administrator.  but it still doesn't work...

     

    Thursday, March 01, 2007 4:29 PM
  • I fixed it...

    I found that the Agent XPs wasn't enabled...

    So I enabled it using this script:

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Agent XPs', 1;
    GO
    RECONFIGURE
    GO
    Thursday, March 01, 2007 5:18 PM
  •  

    I cant run this script as the sql agent is nor running. I get somme errors
    Tuesday, December 11, 2007 11:13 AM
  • One follow up to this.  If you are using AWE, you need to make sure the service account for the SQL Server service has been granted the "Lock pages in memory" privilege.  I was having the same issue as the original poster, and when I ran the Agent XPs script, I received a message that:

     

    "Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege which is not currently present in the access token of the process."

     

    My service account for the SQL Server Agent had been granted this privilege, but my service account for the SQL Server service had NOT been granted this privilege.

     

    I granted the privilege to the SQL Server service account and restarted the SQL Server service.  Then I was able to run the Agent XPs script and get my SQL Server Agent started.

     

    One additional note about ANY SQL Server 2005 service: ALWAYS use the SQL Server Configuration Manager to start, stop and configure SQL Server 2005 services.  The Configuration Manager takes care of assigning the correct permissions to the service accounts.

    Wednesday, March 05, 2008 1:42 PM
  • Thanks guys.

    I had these errors in my application log:

    5845 MSSQL$

    Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege which is not currently present in the access token of the process.

    103 SQLAgent$

    SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).

     

    But after I applied 'lock pages in memory' permission to my sqlaccount and gave it ‘sysadmin role’ in SQL, errors are gone and SQLAgent starts and works successfully.

     

    Thanks a lot!

     

    Wednesday, April 30, 2008 7:24 AM
  • I'm running into the same problem trying to enable AWE on a SQL Server 2005 64-bit cluster. 

     

    How did you apply 'lock pages in memory' permission to the SQLAgent ?   

     

    Thursday, May 08, 2008 12:32 PM
  • I just answered my own question:

     

    To enable the lock pages in memory option

    1. On the Start menu, click Run; in the Open box, type gpedit.msc.

      The Group Policy dialog box opens.

    2. On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.

    3. Expand Security Settings, and then expand Local Policies.

    4. Select the User Rights Assignment folder.

      The policies will be displayed in the details pane.

     

    • Proposed as answer by RubSay Sunday, January 31, 2010 4:57 AM
    Thursday, May 08, 2008 12:41 PM
  • I my case resetting the sa password was sufficient.

    SQLServerAgent apparently uses the sa account to logon.

     

    cheers,

    Peter

     

    Thursday, July 10, 2008 8:06 AM
  •  

    I was stumped - and this worked like a charm. Thanks to you Ken and the folks below with the gpedit.msc posting.

     

    Tuesday, October 28, 2008 2:36 PM
  • This just worked for me as well. Note that the SQL Server Agent still would not start until I restarted the SQL Server service.
    Thursday, October 22, 2009 12:40 PM
  • Thanks sqlmikesql...

    Your post did the magic for me. I was stuck on this for 2 days...!!!!
    Sunday, January 31, 2010 4:58 AM
  • I tried this

     

    Run your SQL Server and Agent on local system account.

    Then run following command 

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Agent XPs', 1;
    GO
    RECONFIGURE
    GO


    Tuesday, May 03, 2011 3:15 PM
  • Hi,

    we had the same error after a P2V with the VMware Converter.

    At the P2V we decided to use only two CPUs and not four as in our physical server.

    And that was the big problem.

    Solution:
    Give your VM the same CPUs as your physical one have.
    (We think this error occur, because MSSQL is licenced on CPUs)

    • Proposed as answer by VMTom Monday, November 21, 2011 3:36 PM
    Monday, November 21, 2011 3:35 PM
  • Worked for me...
    Wednesday, March 07, 2012 2:05 AM
  • But I dont understand why is the below query dependent on Locking pages in Memory for a sql server service account?


    sp_configure 'show advanced options', 1;
    GO
     RECONFIGURE;
    GO
    sp_configure 'Agent XPs', 1;
    GO
     RECONFIGURE
    GO

    Wednesday, March 07, 2012 2:36 PM
  • I'm having this issue this morning all of a sudden.  I've verified the AD user is a sysadmin and a local admin on the server and I'm not using AWE.  

    Just for fun though I ran the script below and enabled the "allow lock pages in memory" group policy setting for the login.

    Interestingly, the SQL service itself starts and run fine while using that same service account.

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Agent XPs', 1;
    GO
    RECONFIGURE
    GO

    Any other suggestions of things to try?

    Wednesday, March 07, 2012 4:55 PM
  • Hello,

    You will need first to allow the service account to Lock Memory Page from gpedit.msc -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> {Lock Pages in Memory}.

    Then try to restart the agent services services.

    BR,

    Abdurrahman Gori

    Monday, December 17, 2012 6:51 AM
  • The lock pages in memory setting worked for me on our Windows 2003 SQL Server Cluster.

    We added our domain service accounts that run SQL to this group policy object.

    Did a simple restart of the SQLSERVER service and everything was good!

    THANK YOU! Saved me from growing some grey hairs for sure!

    Wednesday, August 28, 2013 8:32 PM
  • Thanks... This is THE solution!!! afterwards re-start the SQL Server Engine and then the Agent service and you're back up and running.
    Monday, September 09, 2013 3:13 PM
  • this is very good solution after adding  the sql server service account on which i am trying to start the agent service it run sucessfully .

    You will need first to allow the service account to Lock Memory Page from gpedit.msc -> Computer Configuration -> Windows Settings ->Security Settings -> Local Policies -> User Rights Assignment -> {Lock Pages in Memory}.

    Thanks Alot for this .


    Friday, July 25, 2014 3:37 PM