Dec
25
2012

SQL Agent service stopping due to a stop request from a user process or the os…

On SQL Server 2008 R2 RTM edition faced issue that SQL Agent is not coming up, following errors noticed when services started via SSCM (SQL Server Config Manager) console and via SSMS (SQL Server Mgmt Studio),

SSCM:

SSMS:

 

In Agent Error logs, following was found,

——

2011-11-29 13:28:30 – ? [310] 4 processor(s) and 8192 MB RAM detected

2011-11-29 13:28:30 – ? [339] Local computer is xxxxx running Windows NT 6.1 (7601) Service Pack 1

2011-11-29 13:28:30 – ? [432] There are 7 subsystems in the subsystems cache

2011-11-29 13:28:35 – ! [364] The Messenger service has not been started – NetSend notifications will not be sent

2011-11-29 13:28:35 – ? [129] SQLAgent$xxxx starting under Windows NT service control

2011-11-29 13:28:36 – + [260] Unable to start mail session (reason: No mail profile defined)

2011-11-29 13:28:36 – + [396] An idle CPU condition has not been defined – OnIdle job schedules will have no effect

2011-11-29 13:28:38 – ? [131] SQLAgent$xxxx service stopping due to a stop request from a user, process, or the OS…

2011-11-29 13:28:41 – ? [098] SQLServerAgent terminated (normally)

——-

 

Troubleshooting Steps:

 

1. Check the location of errorlog are correct by going to SSCM > services > double click SQL Services > Advanced tab > Check the startup parameters > check –e parameter and see if location is correct and it contains sqlagent.out file (if not then go to Step 2 and then 3)

2. Go to SSCM > Services > double-click SQL Server agent services > go to advanced tab > check dump directory and see if SQLAgent.out file is available on location, if not then go to step 3

3. Execute following in msdb database to update sql agent error log location,

use msdb

GO

sp_set_sqlagent_properties @errorlog_file=‘<error log location>\SQLAGENT.OUT’

GO

 

4. If after doing above also doesn’t fix issue then issue is surely with ACL (access control), in my case issue is fixed by doing following,

 

Starting SQL Server agent fails and no new log file named SQLAGENT.OUT is created. For sure there’s a file permission issue there which is definitively fixed by putting the agent service domain user account in the local SQLServerMSSQLUser$%COMPUTERNAME%$InstanceName group then starting the service. Restarting then SqlAgent service works definitively fine afterwards.

 

You can check the security settings of log folder, SQLAgent service account should have full privileges, if not, then give privileges or you can try re-adding user as well

 

Solution Reference:

http://connect.microsoft.com/SQLServer/feedback/details/624656/sql-agent-starts-then-stop-after-sql-2008-installation

 

Hope it helps!

Download PDF

About the Author: Nitin G

Indian born, trekker, biker, photographer, lover of monsoons. I've been working full time with SQL Server since year 2005 and blogs to post the content aquired during my research on new topics or fixing issues faced by me as a DBA while working in different kind of projects, hope some of my posts may helps others in SQLDBA community. Everything you read on my blog is my own personal opinion and any code is provided "AS-IS" with no warranties!

2 Comments + Add Comment

  • Keep on working, great job!

  • Awesome post.

Leave a comment

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 72 other subscribers

Translate this blog!

EnglishFrenchGermanItalianPortugueseRussianSpanish

Calender

June 2018
M T W T F S S
« Nov    
 123
45678910
11121314151617
18192021222324
252627282930  

View Post by Categories

%d bloggers like this: