Set the auto_close database option to off
Applies to: SQL Server
This rule checks whether the AUTO_ CLOSE option is set OFF. When AUTO_CLOSE is set ON, this option can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.
Best practices recommendations
If a database is accessed frequently, set the AUTO_CLOSE option to OFF for the database.
For more information
ALTER DATABASE SET Options (Transact-SQL)
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for