SQL SERVER – Why SQL Server Service is Stuck in Starting / Change Pending State?

Recently, I wrote a blog about “Change Pending” state of SQL Server service. After looking at that blog one of my readers contacted me via email for the “similar” issue. In this blog, we would learn about another variation of “Change Pending” state. ­­­­

Here is my earlier blog for your reference. SQL SERVER – What is Change Pending State of in SQL Server Configuration Manager?

This was the state in SQL Server Configuration Manager.

So, I went ahead and checked Services.msc and found that it was in “Starting” state and this is not same as my earlier blog.

If we right-click, we didn’t see any option to make any change.

Now, I started to look to see what does ERRORLOG say and I was surprised to see that ERRORLOG file was not generated at all. If you are not aware of ERRORLOG file, then please refer one of my earlier blogs.

SQL SERVER – Where is ERRORLOG? Various Ways to Find ERRORLOG Location

Since there was no ERRORLOG, I wanted to know what sqlservr.exe is doing. So, I captured Process Monitor and found something interesting.

As we can see, SQL Server is looking for ERRORLOG with some big number. I have generally seen ERRORLOG.6, ERRORLOG.5 etc. but here it was a big weird number.

Based on my search on internet, it is picked from registry key and I found below key NumErrorLogs

Due to that big number, SQL Server was looking for that file and I guess it was trying to go until ERRORLOG.1 and hence taking time.


Since SQL was always getting stuck in starting state, I was not able to connect and change the number of logs from SQL Server Management Studio. I killed sqlservr.exe from task manager, changed the value to of NumErrorLogs to 10 in above registry key and then attempted to start SQL service and Voila, we were back in business.

My client didn’t know how the value got changed but it was truly an interesting situation.

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

SQL Error Messages, SQL Server, SQL Server Services, Starting SQL
Previous Post
SQL SERVER – How to Execute the Query Without Using Management Studio?
Next Post
SQL SERVER – What is Tail-Log Backups?

Related Posts

11 Comments. Leave new

Leave a Reply Cancel reply

Exit mobile version