Troubleshooting Guide: SQL Server Error 3968 – Snapshot Isolation Unavailable Due to Undocumented Trace Flags
Why This Error Happens
This error occurs because SQL Server 2025 was started with one or more undocumented (internal/diagnostic) trace flags that explicitly disable row versioning support at the engine level. Row versioning is a prerequisite for both snapshot isolation and read committed snapshot isolation (RCSI), and certain internal trace flags—often used by Microsoft support for diagnostic purposes—block this subsystem from initializing. As a result, any transaction attempting to use SNAPSHOT isolation or any database with RCSI enabled will fail because the versioning store cannot be created.
Step-by-Step Resolution Guide
Step 1: Identify Active Trace Flags on the Instance
- Open SQL Server Management Studio (SSMS) and connect to the affected instance.
- Run
DBCC TRACESTATUS(-1);to list all globally enabled trace flags. - Cross-reference the output against known documented trace flags; any flag not listed in official Microsoft documentation is a candidate for removal.
- Alternatively, check the SQL Server Error Log (
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for a line listing startup trace flags.
Step 2: Inspect SQL Server Startup Parameters
- Open SQL Server Configuration Manager from the Start menu on Windows Server 2025 / Windows 11.
- Navigate to SQL Server Services > right-click your instance (e.g.,
SQL Server (MSSQLSERVER)) > Properties. - Go to the Startup Parameters tab and review all entries prefixed with
-T(these represent trace flags passed at boot). - Note down any undocumented flag numbers (commonly internal flags outside the publicly documented range) for removal.
Step 3: Remove the Undocumented Trace Flags
- In the Startup Parameters tab, select the problematic
-T<flag_number>entry and click Remove. - Click Apply, then restart the SQL Server service for changes to take effect.
- If the flags were set via a Windows Registry edit or a startup script instead of Configuration Manager, locate and edit the registry key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\Parameters - Delete the corresponding
SQLArgnvalue containing the unwanted trace flag.
Step 4: Restart the SQL Server Service
- Open Services.msc on Windows Server 2025 / Windows 11.
- Locate SQL Server (MSSQLSERVER) (or named instance equivalent).
- Right-click and select Restart to apply the startup parameter changes.
- Confirm the service returns to a Running state without errors in the Windows Event Viewer.
Step 5: Re-enable Snapshot Isolation on the Database
- Connect via SSMS and run the following T-SQL to enable the required isolation features:
ALTER DATABASE [YourDatabaseName] SET ALLOW_SNAPSHOT_ISOLATION ON;
ALTER DATABASE [YourDatabaseName] SET READ_COMMITTED_SNAPSHOT ON;
- Ensure no active connections are blocking the
ALTER DATABASEcommand; switch to single-user mode temporarily if needed.
Alternative or Verification Steps
- Verify the fix by querying
sys.databaseswithSELECT name, snapshot_isolation_state_desc, is_read_committed_snapshot_on FROM sys.databases WHERE name = 'YourDatabaseName';—both values should confirm the features are active. - If removing trace flags is not feasible (e.g., required by a support case), consider migrating the workload to a different instance without the conflicting startup parameters, or contact Microsoft Support to identify a safe equivalent documented flag.