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

Troubleshooting Guide: SQL Server Error 3064 — “Write to backup block blob detected out of order write at offset”

Why This Error Happens

This error occurs when SQL Server 2025 writes backup data directly to Azure Blob Storage using the BACKUP TO URL command, and the sequential write order required by block blobs is violated. This typically happens due to network packet retransmission, latency spikes, or multiple concurrent processes/threads attempting to write to the same blob simultaneously. It can also be triggered by an outdated SQL Server backup component or a storage account configuration that does not support the required blob tier or API version.

Step-by-Step Resolution Guide

Step 1: Verify Network Stability and Latency

  • Check for packet loss or high latency between the Windows Server 2025 host and the Azure Blob endpoint using Test-NetConnection -ComputerName <storageaccount>.blob.core.windows.net -Port 443.
  • Review Windows Event Viewer under Applications and Services Logs > Microsoft > Windows > TCPIP for dropped connection warnings.
  • If running on a virtual machine, confirm the Accelerated Networking feature is enabled on the NIC.

Step 2: Disable Concurrent Backup Striping to the Same Blob

  • Open SQL Server Management Studio (SSMS) and review your backup script for multiple TO URL clauses pointing to the same blob container/file.
  • Ensure only a single writer thread targets each specific blob file; split backups into multiple distinct blob URLs if striping is required.
  • Example corrected syntax:
  BACKUP DATABASE [YourDB] 
  TO URL = 'https://<account>.blob.core.windows.net/backups/YourDB_1.bak'
  WITH COMPRESSION, STATS = 10;

Step 3: Update SQL Server and Storage Client Components

  • Navigate to Control Panel > Programs > Programs and Features and confirm the latest Cumulative Update (CU) for SQL Server 2025 is installed.
  • Download and apply the newest update from the official Microsoft Update Catalog if the build number is outdated.
  • Restart the SQL Server (MSSQLSERVER) service via services.msc after patching.

Step 4: Validate Storage Account Configuration

  • In the Azure Portal, confirm the target Storage Account tier is set to Hot or Cool (Archive tier does not support sequential block blob writes for backups).
  • Verify the Shared Access Signature (SAS) token or credential used in the CREATE CREDENTIAL statement has not expired and has Write and Create permissions.
  • Re-create the credential if necessary:
  CREATE CREDENTIAL [https://<account>.blob.core.windows.net/backups]
  WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
  SECRET = '<SAS_Token>';

Step 5: Clear Corrupted Blob Remnants

  • Delete any partially written or orphaned blob files in the target container using Azure Storage Explorer.
  • Re-run the backup job against a clean, empty blob path to rule out residual offset conflicts from a previous failed job.

Alternative or Verification Steps

  • To verify the fix, run the backup command manually in SSMS and monitor the SQL Server Error Log (via EXEC sp_readerrorlog) to confirm Error 3064 no longer appears upon completion.
  • If the error persists, switch the backup destination temporarily to a local disk path (e.g., D:\Backups\) to confirm the issue is isolated to the Blob Storage connection rather than the database itself.