SQL SERVER – Error 1051: A Stop Control Has Been Sent to a Service that Other Running Services are Dependent On

SQL
1 Comment

Sometimes there are some random unexpected errors and it’s always fun to find the cause of them. In this blog we would learn about an error 1051 (A stop control has been sent to a service that other running services are dependent on) which I received while stopping SQL Service in my lab server.

First, I must tell you that you might not see this error unless you do something unusual. In my case, I dropped some databases from SQL Server, which I thought were not needed, but they were having some purpose.

THE SITUATION

When I was trying to stop SQL Service, first I got below error:

Windows could not stop the SQL Server (MSSQLSERVER) service on Local Computer.
Error 1051: A stop control has been sent to a service that other running services are dependent on.

Here is the screenshot:

SQL SERVER - Error 1051: A Stop Control Has Been Sent to a Service that Other Running Services are Dependent On sql-stop-01

Solarwinds

I saw that it didn’t stop so I did it again and this time a new message comes.

SQL SERVER - Error 1051: A Stop Control Has Been Sent to a Service that Other Running Services are Dependent On sql-stop-02

Followed by below message:

Windows could not stop the SQL Server (MSSQLSERVER) service on Local Computer.
Error 1061: The service cannot accept control messages at this time.

Have a look at below screenshot of the services which provided me some pointers.

SQL SERVER - Error 1051: A Stop Control Has Been Sent to a Service that Other Running Services are Dependent On sql-stop-03

SQL Service is having dependency with “PolyBase Data Movement” and “PolyBase Engine” which explains the cause of errors seen earlier. What next?

WORKAROUND/SOLUTION

The quick way to stop SQL Service at this point is to kill the dependent services.  Here was the path of the executable for the service.

“C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\Polybase\mpdwsvc.exe” -dweng -Polybase

“C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\Polybase\mpdwsvc.exe” -dms -Polybase

So, to come out of the situation, I killed below processes shown. They are the one which I found in the path above. Note both are the same exe so I killed both of them.

SQL SERVER - Error 1051: A Stop Control Has Been Sent to a Service that Other Running Services are Dependent On sql-stop-04

Once I killed the process, SQL Server was getting stopped and started successfully.

As I mentioned earlier, I messed up and dropped some databases from SQL Server without knowing about them. This was not my production server, so I was OK in uninstalling and reinstalling the feature. If this was a production server for you, look for backups of those databases and restore them.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, , ,
Previous Post
SQL SERVER – SQL Clustered Resource in Online Pending State for Long Time Before Coming Online
Next Post
SQL SERVER – Patch Failure – Unable to Retrieve the Cluster Service

Related Posts

1 Comment. Leave new

  • Why you killed services instead of stopping them gracefully? It may not be safe option after all, even in test server.

    Reply

Leave a Reply

Menu