I'm using SQL Server 2014 and having a problem.
In Task Manager, on Services tab, I found SQLAgent$VILLBE_SQLSERVER (VILLBE is my computer name), right click and Start.
It started and... stopped after 1 second.
Then, I open services.msc, and Start the SQL Server Agent (VILLBE_SQLSERVER). It's working.
After 30 seconds, it stopped automatically. When I click Start again, it said that:
The SQL Server Agent (VILLBE_SQLSERVER) service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
Last, I right click SQL Server Agent, choose Properties, set Start up type is Automatic and reboot my PC.
When reboot is done, SQL Server Agent still is stopped
Some other services:
SQL Server Browser - Running - Automatic (start up)
SQL Server (SQLEXPRESS) - Cannot start within warning: **Windows could not start the SQL Server (SQLEXPRESS) on Local Computer....error code 17058.**
Can you give me anyway to fix the problem?
Thank you!
If you are running SQLEXPRESS, then SQLAGENT doesn't run.
If you are running SQL2008 OR SQL2012, probably you changed SQL SA password.
You can change SQL Service authentication from Network Service to Local System, then Start the service manually.
SQL Server Agent has to log on as Local System Account. Open up services console (start > run > type services.msc) and locate "SQL Server Agent" service and double click on it. Go to "Log On" tab and ensure "Local System Account" is selected. After confirming, you should be able to start this service. You can also use "net start SQLAgent$SQLEXPRESS" command.
Start, Stop, or Pause the SQL Server Agent Service
Make sure you are not using express edition, you can repair SQL server using setup.exe file it will fix your issue.
I had to give the user running SQL Server Agent service Modify rights to its log:
C:\Program Files\Microsoft SQL Server\<SERVER NAME>\MSSQL.<INSTANCE NAME>\Log\SQLAGENT.OUT
But, I wasn't using SQL Express, either.
Assuming that you are trying to schedule some SQL Server automation, before running out of solutions, registering one of your own user-defined stored procedures to be automatically executed whenever SQL Server instance is started may a usefull workaround for you, since you can write your onwn scheduling loop that may be kept running as long as your SQL Server service is up.
In that case, you should know that ALL SQL Server versions (including Express) offers a system stored procedure name sp_procoption which allows you to register a stored procedure for auto-start.
exec sp_procoption @ProcName = ['put your procedure name'], @OptionName = 'STARTUP', @OptionValue = [on|off]
For further reading, I would suggest checking Armando Prato's excellent article and this SQL Server Online Book
Hope it helps!
This can be one of reason
1.Goto Sql Server Configration Manager
2.Click SQL Server Services from left panel
3.Right click SQL Server Agent From right panel and click properties
4.Goto service tab
5.Change start type automatic if it is set manuel