Additional SQL Server features and topics not covered by specific categories
First of all, what does SELECT @@version report?
The first place to go to troubleshoot a situation like this is to go to the SQL Server errorlog. The current ERRORLOG file is not so much of interest, but the one to look in is the one that was active last time you had to restart SQL Server because of this condition. Say that your last restart of SQL Server was due to planned patching, but the restart before that was due to SQL Server being unresponsive. Then you should look in the file ERRORLOG.2. What you should look for? Stack dumps and other dumps. They are big and huge and impossible to miss. The type of dumps I primarily have in mind are out-of-memory conditions and hung schedulers. What to do if you find something? Come back and tell us what you find; there are so many alternatives that it would be useless to cover all beforehand.
One thing to try if you have this condition is to connect on the DAC, the Dedicated Admin Connection. Unless you have enabled the remote DAC, you need to connect from SSMS locally on the server itself, by prefixing the server/instance name with ADMIN:. You may get an error when you do this, because SSMS also wants to connect with Intellisense, but there is exactly one admin connection available. Even if SQL Server does not accept other connections, you may still be able to connect on the DAC, since it has a dedicated scheduler. Once connected, you can run diagnostic queries, for instance my beta_lockinfo or sp_whoisactive to see what is going on the server, and possibly kill queries that are taking up to much resources.
Again, there are so many alternatives for what could be the underlying reason for this condition that it would be useless to cover all in a single post, so I will stop here. But I will end with a few questions:
- How much RAM to you have?
- What is the value for
max server memory? - How many user databases are there on this server?
- Do you have Query Store enabled for one or more databases?