Troubleshooting Guide: SQL Server Error 3911 – Persistent Version Store Full
Why This Error Happens
This error occurs when the Persistent Version Store (PVS), used by SQL Server 2025’s Accelerated Database Recovery (ADR) feature, grows until it consumes all available space within the database’s data files. The root cause is typically a long-running or orphaned transaction that prevents the version store cleanup process from reclaiming stale row versions, causing the version store to grow unbounded. This can also happen if the database has a fixed maximum file size and autogrowth is disabled, leaving no room for the PVS to expand even when active transactions are healthy.
Step-by-Step Resolution Guide
Step 1: Identify Long-Running or Blocking Transactions
- Run the following query to find sessions preventing version cleanup:
SELECT * FROM sys.dm_tran_active_snapshot_database_transactions ORDER BY elapsed_time_seconds DESC; - Cross-reference results with
sys.dm_exec_sessionsandsys.dm_exec_requeststo identify the offending session ID (SPID). - Look specifically for sessions in a “sleeping” or “rollback” state that have been open for an unusually long time.
Step 2: Terminate the Offending Session
- Once the problematic SPID is confirmed, terminate it safely using
KILL <SPID>; - Monitor the rollback progress via
SELECT percent_complete FROM sys.dm_exec_requests WHERE session_id = <SPID>; - Note that terminating large transactions may take time as SQL Server unwinds the transaction log.
Step 3: Increase Database File Size or Enable Autogrowth
- Navigate to SQL Server Management Studio (SSMS) and right-click the affected database, then select Properties > Files.
- Ensure the Autogrowth/Maxsize setting is not capped at a restrictive limit; set it to “Unlimited” or a significantly higher value.
- Alternatively, run via T-SQL:
ALTER DATABASE [YourDB] MODIFY FILE (NAME = YourDB_Data, MAXSIZE = UNLIMITED);
Step 4: Manually Force Version Store Cleanup
- If automatic cleanup is lagging, execute a manual cleanup task:
EXEC sys.sp_persistent_version_cleanup 'YourDB'; - This forces SQL Server 2025 to scan and remove unnecessary row versions immediately rather than waiting for the background thread.
- Verify disk space has been reclaimed afterward using
sys.dm_tran_persistent_version_store_stats.
Step 5: Review Disk Space on the Host Server
- On Windows Server 2025, open File Explorer or Disk Management to confirm the physical drive hosting the
.mdf/.ndffiles has sufficient free space. - If the physical disk is full, move secondary data files to a drive with more capacity using
ALTER DATABASE ... MODIFY FILE (FILENAME = 'D:\NewPath\file.ndf');(requires taking the file offline temporarily).
Alternative or Verification Steps
- Verify the Fix: Query
sys.dm_tran_persistent_version_store_statsand confirm that thepersistent_version_store_size_kbvalue is decreasing or stable rather than continuously climbing. - Alternative Solution: If the version store continues to fill due to application design (e.g., frequent long transactions), consider disabling ADR temporarily via
ALTER DATABASE [YourDB] SET ACCELERATED_DATABASE_RECOVERY = OFF;until the application logic is optimized to use shorter transactions.