7

I am using the SQL Server Agent to run some jobs every day, but the problem is that whenever the server (the machine itself) is restarted, the SQL Server Agent doesn't automatically start when the computer boots back up again...and I have to start it manually myself.

How can I set the Server Agent to Auto-Start after a computer restart?
Is there a particular Windows Service I need to set as auto-start ?

Andreas Grech
  • 195
  • 1
  • 1
  • 7

6 Answers6

9

Run services.msc, go to SQL SERVER AGENT service and set it on automatic start-up type

You can do the same thing by accessing sql server configuration manager that should be located in start/programs/microsoft sql server/configuration tools.

Paul
  • 714
  • 2
  • 6
  • 19
4
  1. Check/ reset the user account that SQL Server Agent is using through SQL Server Configuration Manager (don't use services.msc) This will ensure correct permissions on files.
  2. Check the Windows event log for any errors
  3. Check the SQLAGENT.OUT file for any errors
  4. Open SSMS and ensure that your MSDB database is there & functional
Nick Kavadias
  • 10,796
  • 7
  • 37
  • 47
3
  1. Run Program: SQL Server Configuration Manager
  2. click on SQL Server Services.
  3. Right Click on SQL Server Agent and click on Properties.
  4. click on Service tab and set Start Mode = Automatic.
shA.t
  • 107
  • 6
1

This is a known circumstance to us with multiple versions of SQL Server, 2000, 2005, 2008 and I've concluded it's a bug. We do monthly Windows patching on servers with about 50 instances, and typically we will have two or three which fail to restart the SQL Agent. We also experience rare and random instances of SQL Agent stopping even without server reboots. Typically there is no evidence in the error log or the agent log. It just stops.

We have an SSIS package we developed to monitor servers and collect, centralize, and report Windows and SQL Server status info, space, size, growth,job failures, missing backups, security and config changes, etc. One of it's features is to report status of all SQL Agent services.

1

If you have it set to automatic after you reboot the server, do you get a popup box that says "A service did not start....." ?

If it is set to automatic, it should start and if it doesn't, or fails it will log it.

If something else is stopping it, that would also be logged.

Take a look in your Event log (right click my computer --> manage) Then in the Event log select system. Go though these just after your reboot and see if anything mentions the SQL Agent. It should show it starting then failing or stopping and "hopefully" why.

From there, google the message or post it here.

SpaceManSpiff
  • 2,547
  • 18
  • 20
-2

It's possible that the service may start and then stop if it detects that it has no works to do. An alternative option would be to NET START it just before your daily job kicks in (I would do this anyway so as to ensure that it's up).

Maximus Minimus
  • 8,987
  • 2
  • 23
  • 36