0

A customer has the strangest situation. Windows Server 2016 with SQL Server 2016. There is only one SQL instance on the machine (the default). Service name: MSSQLSERVER.

The service take a very long time to stop (about a minute), but once it is shown as Stopped, the SQLSERVER.EXE process still appears in the TaskMgr for up to another minute. If I try terminating the process from TaskMgr I get error: Access Denied.

This causes problems when restarting SQL Server. This is what happens:

  • Stop SQL Server and wait for service to Stop (net stop mssqlserver)
  • Process remains in TaskMgr
  • Try to start SQL Server again (net start mssqlserver)
  • SQL Server fails to start because the Master database is currently in use

Has anyone seen anything like this? Why would the process still be running after the Service has stopped?

  • Have you checked the Windows Event logs and SQL Error Logs to see if you can correlate any messages after the Stop command that may indicate why? Also, how many DBs and what size are they (avg and max)? SHUTDOWN in SQL requires all user processes to be terminated and checkpoints in all DBs, perhaps that is slowing down the SHUTDOWN but the service in Service Control Manager is being signalled before these processes are completed. – HandyD Dec 17 '19 at 22:13
  • When we stopped the service, there were no user processes logged in. They are fairly large databases and the VM is not too fast. The only thing in the Application Event Log was that SQL Server could not start because the Master database file was already in use in another process. – Neil Weicher Dec 17 '19 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.