Troubleshooting Guide: SQL Server Error 3434 — Reindexing Failure During Collation Change
Why This Error Happens
Error 3434 occurs when SQL Server attempts to rebuild all system and user indexes under a new collation (sort order/locale) during a rebuildm or setup-driven collation change, but fails partway through the process. This is commonly caused by insufficient disk space for the temporary index rebuild operations, corrupted system table structures, incompatible or deprecated collation IDs, or insufficient permissions on the SQL Server service account to access the Data and Log directories. Because the operation is transactional at the server level, any interruption forces SQL Server to halt and revert, leaving the instance unable to start cleanly until the underlying issue is resolved.
Step-by-Step Resolution Guide
Step 1: Verify Disk Space and File Permissions
- Confirm the drive hosting
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATAhas at least 2-3x the size of your largest database free (reindexing requires temporary duplicate storage). - Check that the SQL Server service account (visible in SQL Server Configuration Manager) has Full Control on the DATA and LOG folders.
- Right-click the folder → Properties → Security tab → confirm
NT SERVICE\MSSQLSERVERor your custom service account is listed with write access.
Step 2: Run the Rebuild Utility Manually with Verbose Logging
- Stop the SQL Server service via Services.msc or
net stop MSSQLSERVER. - Navigate to
C:\Program Files\Microsoft SQL Server\170\Tools\Binn\and locaterebuildm.exe(or usesetup.exe /ACTION=RebuildDatabasefor SQL Server 2025 setup-based rebuilds). - Launch the tool as Administrator and re-select your target collation (e.g.,
SQL_Latin1_General_CP1_CI_AS). - Export the rebuild log from
%ProgramFiles%\Microsoft SQL Server\170\Setup Bootstrap\Log\and inspect for the specific failing object (table, index, or system catalog).
Step 3: Restore System Databases from a Known-Good Backup
- If the master, model, or msdb databases were mid-rebuild when the failure occurred, restore them from your last verified backup.
- Use SQL Server in single-user mode:
sqlservr.exe -m -T3608to start without fully initializing tempdb/other databases. - Run
RESTORE DATABASE master FROM DISK = 'path_to_backup.bak' WITH REPLACEfrom the SQLCMD prompt if master is corrupted.
Step 4: Rebuild the Instance Using Setup (If Manual Rebuild Fails)
- Launch SQL Server 2025 Installation Center → Maintenance → Repair.
- Select the affected instance and choose Rebuild System Databases rather than repair, specifying the desired collation explicitly in the
/SQLCOLLATIONparameter. - Example command-line invocation:
Setup.exe /QUIET /ACTION=RebuildDatabase /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS
Alternative or Verification Steps
- After rebuilding, run
SELECT SERVERPROPERTY('Collation');in a new query window to confirm the collation was applied correctly and the instance started without errors. - If the rebuild still fails, consider a clean uninstall/reinstall of the instance and restoring user databases from backup rather than attempting an in-place collation change, since cross-collation restores are generally safer than live reindexing.