Solved

SQL Database is in auto closed mode

  • 5 March 2022
  • 1 reply
  • 3825 views

Badge

Hello,

 

Backup of one of my SQL DB is failing with error “Database is in autoclose mode”

On checking with DBA, they said that DB is in auto closed mode. But I am able to backup other DBs on same instance which is in auto closed mode.

icon

Best answer by Stuart Painter 5 March 2022, 14:51

View original

If you have a question or comment, please create a topic

1 reply

Userlevel 7
Badge +15

Hi @Sharad Singh 

Thanks for the question and welcome to the Community!

AUTO_CLOSE mode in SQL Server enables SQL to close down the database when all connection resources are released.

https://docs.microsoft.com/en-us/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off?view=sql-server-ver15

https://support.microsoft.com/en-us/topic/recommendations-and-guidelines-for-setting-the-auto-close-database-option-in-sql-server-92c1c3a8-4393-29a1-b727-1f0ce31acefc

 

So, it may be for this particular database, if all resources have been released and the database has been closed, Commvault is unable to perform a backup. Potentially other databases within the same instance are remaining open due to current activity.

You will need to ensure the database is in an active and available state before attempting to backup.

Thanks,

Stuart