Introduction
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.
Problem
Disable Database Auto Close (if enabled)
Solution
https://github.com/steverezhener/DBA/blob/master/Procedures/bestpractices.usp_change_auto_close.sql
Based on