Monday, February 25, 2013

SQL Agent doesn’t start

SQL Agent won’t start for SQL Server 2008 R2. Everything else works.

Symptoms:

When trying to start the SQL Server Agent service, either from the service.msc or the Management Studio error “Unable to start SQLAgent” is given.

image

Actions:

Check output from sqlagent.out. To change the path of sqlagent.out

use msdb

go

sp_set_sqlagent_properties @errorlog_file='c:\temp\sqlagent.out'

go

Following message in sqlagent.out:

---- - ! [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_has_server_access', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

Resolution:

Added the SQL Agent service account as sysadmin on the sql server from Securites.

image

References:

http://codespin.blogspot.se/2008/01/fixing-startup-failure-of-sql-server.html

http://qa.social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/542bab08-c8a6-4106-ae96-99bf0f895bd8

No comments:

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...