Ran into an interesting one today where a database was spamming us emails for severity 21 alerts, all of them like below:

DATE/TIME: 16/04/2015 08:09:15

DESCRIPTION: The log for database ‘XXX’ is not available. Check the event log for related error messages. Resolve any errors and restart the database.

COMMENT: (None)

JOB RUN: (None)

looking at the error log you see something like this:

Error9001

The error is raised due to database having AUTO CLOSE = TRUE.

To resolve the issue simple turn auto close to false. Note that when we had the issue trying to alter the database didn’t work till we toke the database offline and brought it back online.

USE [master]
GO
ALTER DATABASE [XXX] SET AUTO_CLOSE OFF WITH NO_WAIT
GO