SQL Server Agent service could not be started SQL Server Agent service could not be started docker docker

SQL Server Agent service could not be started


My solution was to upgrade the build-server to Windows Server 2019. That's it. Then everything worked without any further change.


Hi you need to start SQL Server Agent Service, How to start service you can follow this link: Start Service

Step 1: First, you have to click on the start menu and search for the SQL Server Configuration Manager and click on the SQL Server Configuration Manager option from the search result.

Step 2: Then you have to select the SQL Server Services from the left menu and you can see the service SQL Server (SQLEXPRESS) is not running and it is stopped.

Step 3: Now, you have to start the service SQL Server (SQLEXPRESS) and for that, you have to press mouse right click on SQL Server (Agent) service and select Start option to start the service.

Step 4: You can see the state of service is running, Now you should try again to connect SQL server database engine.


Because you are running in a docker container, i am assuming you are also using some form of environmental management (chef, puppet, jenkins) etc. Carefully review all the actors in your environment. maybe one of these is detecting the agents status and whether agent xp's should be allowed. Further you may need to check SQL Policy and AD Policies if you are in a domain. But the speed at which the reversal occurs suggests that an agent in the docker instance is too blame.