Troubleshooting Guide: SQL Server Error 3696 – “Internal Error While Preparing GUID”
Why This Error Happens
Error 3696 typically occurs when SQL Server’s internal mechanism for generating or parsing a GUID (Globally Unique Identifier) encounters a corrupted system catalog entry, a mismatched collation setting, or an improperly registered CLR (Common Language Runtime) component. This can also surface when the NEWSEQUENTIALID() function or extended properties referencing a UNIQUEIDENTIFIER column fail due to incomplete metadata after a failed upgrade or migration. In some cases, insufficient permissions on system-level temporary storage (tempdb) prevent SQL Server from allocating the memory structures needed to prepare the GUID value.
Step-by-Step Resolution Guide
Step 1: Verify SQL Server Service Account Permissions
- Open Services.msc on Windows Server 2025 / Windows 11 and locate the SQL Server (MSSQLSERVER) service.
- Confirm the service account has Full Control on the
tempdbdata/log file directories (default:C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA). - Restart the SQL Server service after applying permission changes using
net stop MSSQLSERVER && net start MSSQLSERVER.
Step 2: Rebuild or Repair the System Catalog
- Run
DBCC CHECKDB('master') WITH NO_INFOMSGS, ALL_ERRORMSGS;in SQL Server Management Studio (SSMS) to check for catalog corruption. - If corruption is found, restore the
masterdatabase from a known good backup rather than attempting an in-place repair. - For non-critical corruption, run
DBCC CHECKCATALOG('YourDatabaseName');to isolate issues to a specific user database.
Step 3: Validate and Re-register CLR Integration
- Check CLR status with
SELECT * FROM sys.configurations WHERE name = 'clr enabled'; - If disabled or misconfigured, re-enable it:
EXEC sp_configure 'clr enabled', 1;
RECONFIGURE;
- Drop and recreate any CLR-based GUID generation assemblies using
DROP ASSEMBLYfollowed byCREATE ASSEMBLYwith the correct.dllpath.
Step 4: Update SQL Server 2025 Cumulative Update
- Navigate to Microsoft Update Catalog and download the latest Cumulative Update (CU) for SQL Server 2025.
- Run the installer as Administrator and select the affected instance.
- Reboot Windows Server 2025 / Windows 11 after installation completes to finalize binary replacements related to GUID handling.
Step 5: Recreate the Affected Table or Column
- If the error is isolated to a specific table, script out the table definition using SSMS’s Generate Scripts wizard.
- Drop the UNIQUEIDENTIFIER column and recreate it with
ALTER TABLE YourTable ADD NewGUIDColumn UNIQUEIDENTIFIER DEFAULT NEWID(); - Re-insert or migrate data from a backup table to populate the new column correctly.
Alternative or Verification Steps
- Run a test query such as
SELECT NEWID();in a new query window to confirm GUID generation functions without triggering Error 3696. - If the issue persists after all steps, perform a full uninstall and clean reinstall of the SQL Server 2025 instance, ensuring the
tempdbandmastersystem databases are rebuilt from scratch using thesetup.exe /ACTION=REBUILDDATABASEcommand.