Troubleshooting Guide: SQL Server Error 1823 — Database Snapshot Failed to Start
Why This Error Happens
Error 1823 typically occurs because SQL Server cannot allocate sufficient disk space for the sparse file that backs the database snapshot, or the service account lacks the required NTFS permissions on the target directory. It can also arise when the underlying volume does not support sparse files (e.g., FAT32 or certain network shares), or when the source database has unresolved transactions or corrupted pages that prevent a consistent snapshot state. In some cases, antivirus or filesystem filter drivers intercept the sparse file creation process, causing the operation to abort.
Step-by-Step Resolution Guide
Step 1: Verify Disk Space and Volume Format
- Confirm the target volume has adequate free space—snapshot sparse files grow dynamically and need headroom beyond the source database size.
- Run
fsutil fsinfo volumeinfo C:(replaceC:with your target drive) to confirm the file system is NTFS or ReFS, since sparse files are not supported on FAT32. - Avoid placing the snapshot file on compressed or deduplicated volumes, as this can conflict with sparse file allocation.
Step 2: Check and Correct NTFS Permissions
- Ensure the SQL Server service account (e.g.,
NT Service\MSSQLSERVERor a custom domain account) has Modify and Write permissions on the folder where the snapshot file will be created. - Navigate to the target directory in File Explorer, right-click → Properties → Security tab, and add the service account with the correct permissions.
- Alternatively, use PowerShell to grant access:
icacls "D:\SQLSnapshots" /grant "NT SERVICE\MSSQLSERVER:(OI)(CI)F"
Step 3: Validate the Source Database State
- Run
DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;to rule out corruption that could block snapshot creation. - Ensure there are no long-running uncommitted transactions by checking
sys.dm_tran_active_transactions. - If corruption is found, repair the source database before attempting the snapshot again.
Step 4: Recreate the Snapshot with Explicit File Paths
- Use fully qualified paths and confirm the
.ssfile name does not already exist in the target directory. - Execute the snapshot creation command manually to capture the exact error context:
CREATE DATABASE YourDB_Snapshot ON
(NAME = YourDB_Data, FILENAME = 'D:\SQLSnapshots\YourDB_Data.ss')
AS SNAPSHOT OF YourDB;
- Check the SQL Server error log immediately after for any extended details tied to Error 1823.
Step 5: Temporarily Disable Antivirus/Filter Drivers
- Some antivirus or backup agent filter drivers intercept sparse file I/O operations and silently block creation.
- Add an exclusion for the SQL Server data and snapshot directories in your antivirus console, then retry the operation.
Alternative or Verification Steps
- After applying fixes, re-run the
CREATE DATABASE ... AS SNAPSHOT OFcommand and confirm the.ssfile appears in the target directory with a non-zero size. - If the issue persists, use SQL Server Configuration Manager to confirm the service account identity, then restart the SQL Server service and repeat Steps 2–4 to rule out a stale permission cache.