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

Troubleshooting Guide: SQL Server Error 4028 – “End of Tape Has Been Reached”

Why This Error Happens

This error occurs when SQL Server completes writing data to the current tape volume during a backup or restore operation and requires an additional tape to continue the process, but no additional media has been loaded into the drive. It commonly happens when the database or backup set being processed exceeds the physical storage capacity of a single tape cartridge. Additionally, this can occur if the tape drive hardware fails to signal proper media-change events back to SQL Server, or if the backup operation was configured without accounting for multi-volume sets in unattended/scheduled jobs.

Step-by-Step Resolution Guide

Step 1: Prepare and Insert the Next Tape Volume

  • Physically locate the tape labeled in the error message (the %ls placeholder will show the specific tape name/sequence number).
  • Remove the full tape from the drive bay and insert the next blank or designated tape in the sequence.
  • Ensure the new tape is not write-protected and is compatible with the drive firmware (check for LTO generation mismatches on Windows Server 2025 hardware).

Step 2: Resume the Backup/Restore Operation in SSMS or T-SQL

  • If running via SQL Server Management Studio (SSMS), click the Retry button on the prompt dialog to signal SQL Server that the tape has been swapped.
  • If running a scripted job via T-SQL, ensure your script includes the BLOCKSIZE and MEDIANAME parameters correctly to avoid mismatch errors upon tape swap.
  • For unattended jobs, verify that xp_cmdshell or the SQL Server Agent job step does not time out while waiting for manual intervention.

Step 3: Verify Tape Drive Hardware and Drivers

  • Open Device Manager on Windows Server 2025 and check the Tape drives node for any yellow warning icons.
  • Update the tape drive driver via Update driver > Search automatically for drivers or download the vendor-specific driver (e.g., IBM, Quantum, HPE).
  • Restart the Removable Storage service via services.msc to ensure Windows correctly detects the newly inserted media.

Step 4: Switch to Multi-File Backup Striping (Recommended Fix)

  • To avoid the need for physical tape swaps on large databases, modify your backup script to stripe the backup across multiple tape drives simultaneously if your server has more than one drive bay.
  • Alternatively, migrate the backup destination to a Virtual Tape Library (VTL) or disk-based backup to eliminate physical capacity limits entirely.
  • Update the backup command to include multiple TAPE = destinations in the BACKUP DATABASE syntax to allow parallel writing.

Alternative or Verification Steps

  • Verify the fix: Check the SQL Server Error Log or the Windows Event Viewer (Application Log) for Event ID 4028 to ensure the backup completed with a “Processed X pages” success message rather than terminating with a fatal error.
  • Alternative solution: If physical tape changes are consistently causing bottlenecks or failures, consider decommissioning the tape backup strategy in favor of Azure Blob Storage backup targets, which are natively supported in SQL Server 2025 and eliminate the “end of volume” limitation entirely.