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

Troubleshooting Guide: SQL Server Error 3093 – “Database Count Changed During Snapshot Backup”

Why This Error Happens

This error occurs when SQL Server’s VSS (Volume Shadow Copy Service) snapshot backup process detects a mismatch between the number of databases present when the backup operation initialized versus when it attempted to finalize the snapshot. This typically happens because a database was created, dropped, attached, detached, taken offline, or brought online while the VSS writer was enumerating and freezing the database set. Since snapshot backups require a consistent, unchanging database topology across the entire freeze/thaw cycle, even a brief DDL operation or automated process (like a maintenance plan or availability group failover) touching the database list can trigger this validation failure.

Step-by-Step Resolution Guide

Step 1: Identify Concurrent Database Operations

  • Check the SQL Server Error Log and Windows Application Event Log around the timestamp of Error 3093 for CREATE DATABASE, DROP DATABASE, ALTER DATABASE ... SET OFFLINE, or attach/detach events.
  • Run the following query to correlate timing with any recent database state changes:
SELECT name, state_desc, create_date 
FROM sys.databases 
ORDER BY create_date DESC;
  • Review any scheduled SQL Agent Jobs, SSIS packages, or DBA scripts running at the same time as the backup window.

Step 2: Isolate and Reschedule Conflicting Automation

  • Open Task Scheduler or SQL Server Agent > Jobs and identify any job that provisions/deprovisions databases (e.g., automated test environment refreshes, tempdb-like scratch databases).
  • Stagger these jobs so they do not overlap with the VSS backup window defined in your backup software (e.g., Windows Server Backup, Veeam, or Azure Backup).
  • Adjust the backup schedule via Task Scheduler or your third-party backup tool’s job properties to avoid the conflict window entirely.

Step 3: Validate VSS Writer Stability

  • Open an elevated Command Prompt and check the health of the SQL Server VSS Writer:
vssadmin list writers
  • Confirm the SqlServerWriter service status shows [No error]. If it shows a failed or retryable state, restart the service:
net stop "SQL Server VSS Writer"
net start "SQL Server VSS Writer"
  • Ensure the VSS Writer service path is correctly registered under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\VSS Writer in the Windows Registry.

Step 4: Exclude Volatile Databases from Snapshot Scope

  • If certain databases are routinely created/dropped as part of application logic (e.g., session or temp databases), exclude them from the VSS backup component selection.
  • In your backup tool’s SQL Server plugin configuration, manually deselect these databases under the “Items to back up” or “Database Selection” pane rather than using a wildcard/full-instance selection.

Alternative or Verification Steps

  • Verify the fix: Re-run the snapshot backup job manually during a low-activity window and confirm it completes without Error 3093; check the backup history table via SELECT * FROM msdb.dbo.backupset ORDER BY backup_start_date DESC; to confirm success.
  • Alternative: If the error persists intermittently due to unavoidable dynamic database creation, switch the backup method from VSS-based snapshot backup to native SQL Server streaming backups (BACKUP DATABASE ... TO DISK), which do not require a frozen, instance-wide database count.