Observed this on Microsoft SQL Server 2014 (SP2) but is probably true for any SQL Server versions. I am seeing a lot of lines like below in ERRORLOG:
2020-09-11 09:45:00.87 spid20s Starting up database 'DatabaseName'.
The reason for this repeated logs is that the AUTOCLOSE property of the database is set to TRUE. When AUTOCLOSE is set once the last connection to the database closes it will also close the database and release all the resources associated with it. This can be useful to conserve precious resources on the server, unfortunately this can also impact performance and I have seen cases that it actually depletes the resources on the server when the server is under memory pressure combined with maximum server memory is reached.
To disable AUTOCLOSE, open database properties using SSMS and set Auto Close to False under Options page.
Reference:
https://blog.sqlauthority.com/2016/02/20/sql-server-starting-up-database-why-multiple-times-in-errorlog/
Comments