SQL Server database tries to restore itself automatically (and gets stuck) I currently run into an issue, that a SQL Server Database has the state 'recovery pending' every morning.
No one has started a database recovery, the server itself decides to do it.
The recovery process gets stuck and the SQL Server stops working, as its memory limit is reached.
Temporarily, I can resolve it by restarting the MSSQLSERVER process and then taking the database offline and back online. However, as this seems to be happening every day now, this is an unacceptable workaround.
I am eager to know:

What are the possible reasons, that a SQL Server automatically starts such an automated restore process
Are there any Logs / Events I can look for, to find the reason.
How can I solve it :)

Any help or hint will be highly appreciated.

Update: Database was in recovery pending, not in restore pending . The SSMS is installed in german language and didn't show me the english status.
I have a feeling that what you really  have is &quot;recovery pending&quot; and not &quot;restore pending&quot;. If you look at the documentation for sys.databases, the state column, you will see that there isn't a state called &quot;restore pending&quot;. So, I will assume it is indeed &quot;recovery pending&quot; below. If it is anything else, please let us know, show is what it look like in SSMS Object Explorer as well as the state column from sys.databases.
Recovery pending means that SQL server couldn't do recovery at startup of the database. Note that start of the database can happen outside startup of SQL Server. Having the autoclose database option set to true is one such case.
Anyhow, whenever recovery isn't doable, the database goes into recovery pending. But SQL server will document why, in the errorlog file. So your task is to hunt down these error messages and act on them. My guess is that any of the database files are used by some other process (anti-virus, snapshot thingie, etc). But at a later time, the files are accessible to SQL Server.