--- title: "Set the AUTO_CLOSE Database Option to OFF | Microsoft Docs" ms.custom: "" ms.date: "03/04/2017" ms.prod: sql ms.prod_service: "database-engine" ms.reviewer: "" ms.technology: security ms.topic: conceptual helpviewer_keywords: - "Best Practices [Database Engine]" ms.assetid: e6b03364-263a-4ec4-9794-de9869d396ce author: VanMSFT ms.author: vanto --- # Set the AUTO_CLOSE Database Option to OFF [!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)] 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)](../../t-sql/statements/alter-database-transact-sql-set-options.md) ## See Also [Monitor and Enforce Best Practices by Using Policy-Based Management](../../relational-databases/policy-based-management/monitor-and-enforce-best-practices-by-using-policy-based-management.md)