Search This Blog

Sunday, November 28, 2010

SQL Agent in SQL Server Express with Advanced Services Features

I was recently playing with my Express installation on the personal laptop and was trying to get SQL Agent to run on Windows XP and SQL Server 2008 Express with Advanced Services Features SP2. I set up an account added it to the administrators group, added this account to the instance with the sysadmin role. However, the agent would try to start, but then terminate unexpectedly. I then checked and enabled agent xp

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO
As stated in http://technet.microsoft.com/en-us/library/ms178127.aspx

However the agent still would not start. After searching the event view, specifically  the Windows Application log for errors and found the following

SQLServerAgent could not be started (reason: This installation of SQL Server Agent is disabled.  The edition of SQL Server that installed this service does not support SQL Server Agent.).

Seems that if we want to have automated unattended jobs running, we will have to use power shell and Windows Task Scheduler. I am going to do some browsing and see what I can find out then have an update to this post on a workaround for those of  us who use free edition.

The documentation does state that the SQL Agent is not included, I must have missed this link, check it out

http://msdn.microsoft.com/en-us/library/ms365248.aspx

1 comment:

  1. You can create a SQL script and then run it in a batch file, once this works use task scheduler to schedule the task under a service account.

    ReplyDelete