Troubleshooting Guide: SQL Server Error 674 (RowsetNewSS Destructor Exception)
Why This Error Happens
Error 674 occurs when SQL Server’s storage engine encounters an unhandled C++ exception while attempting to destroy a RowsetNewSS object, typically during the cleanup phase of a bulk-insert operation. This is most commonly triggered by corrupted or fragmented pre-allocated disk extents that the engine cannot properly deallocate, often due to underlying storage I/O failures, antivirus interference on data files, or a mismatch between the database’s expected allocation map and actual disk state. In rare cases, outdated storage drivers or filesystem-level corruption on Windows Server 2025/Windows 11 volumes hosting the .mdf/.ndf files can also trigger this fault.
Step-by-Step Resolution Guide
Step 1: Verify Disk and Storage Health
- Open Event Viewer (
eventvwr.msc) and check the System log for Disk or Ntfs warnings correlating with the SQL error timestamp. - Run
chkdsk D: /f /r(replaceD:with your data drive letter) during a maintenance window to repair filesystem-level corruption. - Confirm the storage controller drivers are up to date via Device Manager or vendor firmware tools.
Step 2: Run Database Consistency Checks
- Open SQL Server Management Studio (SSMS) and connect to the affected instance.
- Execute
DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;to detect allocation or page-level corruption. - If errors are returned, review recommended repair levels before proceeding (avoid
REPAIR_ALLOW_DATA_LOSSunless a backup is confirmed).
Step 3: Exclude SQL Server Files from Antivirus/Defender Scanning
- Navigate to Windows Security > Virus & threat protection > Manage settings > Exclusions.
- Add exclusions for
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\(adjust path/version as needed) and thesqlservr.exeprocess. - Restart the SQL Server (MSSQLSERVER) service via
services.mscto apply changes cleanly.
Step 4: Adjust Bulk-Insert Batch Configuration
- Reduce the
BATCHSIZEparameter in yourBULK INSERTorbcpcommands to lower memory/disk pressure during large imports. - Ensure
TABLOCKandROWS_PER_BATCHhints are set appropriately to avoid excessive pre-allocation of extents in a single transaction.
Step 5: Restart the SQL Server Service (Temporary Fix)
- As advised in the error message, restart the instance:
net stop MSSQLSERVER && net start MSSQLSERVER. - Monitor the SQL Server Error Log (
ERRORLOGfile in theLOGdirectory) immediately after restart to confirm the exception does not recur during the next bulk operation.
Alternative or Verification Steps
- Re-run the same bulk-insert operation that originally triggered Error 674 and monitor
sys.dm_exec_requestsfor wait types likePREEMPTIVE_OS_WRITEFILEGATHERto confirm disk I/O is no longer stalling. - If the error persists after all steps, restore the affected database from the last known-good backup to a test instance and re-attempt the bulk load to isolate whether the issue is data-specific or environment-specific.