How to fix Error 9054 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 9054 – Invalid Request to Move First VLF During Hyperscale Log Transformation

Why This Error Happens

Error 9054 occurs when SQL Server 2025 attempts to convert the transaction log to the Hyperscale log architecture, but the first Virtual Log File (VLF) is still active or in use and cannot be relocated. This typically happens because the log file has not been fully truncated, a long-running transaction or replication process is holding a reference to the first VLF, or the log file has excessive fragmentation that prevents the required VLF reordering. Additionally, corrupted log headers or an interrupted previous shrink/conversion operation can leave the log in a state that blocks the Hyperscale transformation.

Step-by-Step Resolution Guide

Step 1: Verify Current VLF Status and Active Transactions

  • Run DBCC LOGINFO; against the target database to inspect VLF status and identify which VLF is marked as “active” (status = 2).
  • Run DBCC OPENTRAN; to check for any long-running or orphaned transactions holding the log active.
  • Check sys.dm_tran_database_transactions and sys.dm_tran_active_transactions for sessions preventing log truncation.
  • If an open transaction is found, commit or kill the offending session using KILL <session_id>;.

Step 2: Clear Log Backup Chain and Force Truncation

  • Ensure the database is not in SIMPLE recovery mode if point-in-time recovery is needed; otherwise, switch temporarily:
  • ALTER DATABASE [YourDB] SET RECOVERY SIMPLE;
  • Take a transaction log backup to clear inactive VLFs (if in FULL/BULK_LOGGED recovery):
  • BACKUP LOG [YourDB] TO DISK = 'E:\Backups\YourDB_log.trn';
  • Switch back to FULL recovery mode and take a fresh full backup to restart the log chain:
  • ALTER DATABASE [YourDB] SET RECOVERY FULL;
  • BACKUP DATABASE [YourDB] TO DISK = 'E:\Backups\YourDB_full.bak';

Step 3: Shrink and Rebuild the Transaction Log File

  • Shrink the log file to reset VLF boundaries before retrying the Hyperscale conversion:
  • DBCC SHRINKFILE (YourDB_log, 1);
  • If shrink fails due to the stuck VLF, take the database offline briefly and bring it back online to release file locks:
  • ALTER DATABASE [YourDB] SET OFFLINE WITH ROLLBACK IMMEDIATE;
  • ALTER DATABASE [YourDB] SET ONLINE;
  • Re-run DBCC LOGINFO; to confirm the first VLF is no longer flagged as active.

Step 4: Retry the Hyperscale Log Transformation

  • Re-initiate the Hyperscale conversion command or Azure Arc-enabled SQL Server 2025 migration wizard.
  • Monitor SQL Server error logs at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for recurrence of Event ID 9054.
  • If the error persists, restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER in PowerShell (run as Administrator) to clear any cached log metadata.

Step 5: Validate File System and Disk Health

  • Confirm the underlying storage volume (especially on Windows Server 2025 ReFS/NTFS volumes) is not reporting I/O errors using chkdsk E: /f /r.
  • Verify there is no antivirus or backup software locking the .ldf file during the conversion window.

Alternative or Verification Steps

  • After remediation, run DBCC LOGINFO; and confirm the first VLF shows status 0 (inactive) before re-attempting the Hyperscale conversion — a successful conversion will log a confirmation entry in the SQL Server ERRORLOG with no further 9054 entries.
  • If the issue persists after all steps, as a fallback, create a new database copy using CREATE DATABASE ... AS COPY OF (or export/import via BACKUP/RESTORE) to a fresh Hyperscale-enabled database, then redirect applications to the new instance.