metricsign
Start free
Critical severityconfiguration

Power BI Refresh Error:
9001

What does this error mean?

The SQL Server transaction log is not available — the log file may be missing, corrupt, or the database is in an unexpected state.

Common causes

  • 1The log file was deleted or moved while SQL Server was not running
  • 2The disk hosting the log file failed or was disconnected
  • 3The database was attached without the log file and SQL Server cannot create a new log

How to fix it

  1. 1Step 1: Check the database state: SELECT name, state_desc FROM sys.databases WHERE name = 'yourdb'; — a state other than ONLINE indicates the problem.
  2. 2Step 2: If the log file was accidentally deleted, attempt an emergency repair: ALTER DATABASE [yourdb] SET EMERGENCY; ALTER DATABASE [yourdb] SET SINGLE_USER; DBCC CHECKDB ([yourdb], REPAIR_ALLOW_DATA_LOSS);
  3. 3Step 3: If the log is on a failed disk, restore from the most recent full + log backup after addressing the hardware issue.

Frequently asked questions

Can error 9001 be caused by anti-virus software?

Yes — anti-virus software that locks or scans transaction log files can cause SQL Server to lose access to the log, resulting in error 9001. Exclude SQL Server data and log file directories from real-time AV scanning.

What is REPAIR_ALLOW_DATA_LOSS and when should I use it?

It is the most aggressive DBCC CHECKDB repair option — it may delete pages to make the database consistent, resulting in data loss. Use it only as a last resort when no backup is available.

How do I prevent error 9001?

Store log files on reliable storage with redundancy (RAID 1 or 10, or Azure Premium SSD). Monitor disk health and SQL Server error log alerts. Maintain regular backups so recovery is possible if the log is lost.

Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-9001-database-engine-error

Other configuration errors