Troubleshooting Guide: SQL Server Error 10635 – Online Index Operation Failure on LOB Columns
Why This Error Happens
This error occurs because SQL Server’s online index operation (ONLINE = ON) feature has architectural limitations when dealing with Large Object (LOB) data types such as VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX), XML, or legacy types like TEXT, NTEXT, and IMAGE. The database engine cannot maintain row versioning and concurrent read/write access for LOB pointers during an online rebuild, as the row-versioning mechanism used for concurrency does not fully cover the pointer structures for these large data chunks. This is a hard-coded engine restriction rather than a configuration or permissions error, meaning it occurs regardless of server health or user privileges.
Step-by-Step Resolution Guide
Step 1: Identify the Offending Column and Index
- Open SSMS (SQL Server Management Studio) 21 connected to your SQL Server 2025 instance.
- Run the following query to find which index and column is triggering the conflict:
SELECT i.name AS IndexName, c.name AS ColumnName, t.name AS DataType FROM sys.indexes i JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id JOIN sys.types t ON c.user_type_id = t.user_type_id WHERE t.name IN ('text', 'ntext', 'image', 'xml', 'varchar', 'nvarchar', 'varbinary') AND i.object_id = OBJECT_ID('YourTableName'); - Confirm if the data type listed matches a MAX or LOB-based type.
Step 2: Switch the Operation to OFFLINE Mode
- Since LOB columns are not fully supported in online mode, you must modify your T-SQL script to disable the online flag.
- Navigate to your index creation or rebuild script, typically found in your deployment
.sqlfiles or SSMS query window. - Change the syntax from
WITH (ONLINE = ON)toWITH (ONLINE = OFF). - Example command:
ALTER INDEX [YourIndexName] ON [dbo].[YourTableName] REBUILD WITH (ONLINE = OFF, SORT_IN_TEMPDB = ON);
Step 3: Schedule the Maintenance During Low-Traffic Windows
- Since the operation must now run offline, it will acquire a Schema Modification (Sch-M) lock, blocking user access to the table.
- Use SQL Server Agent on Windows Server 2025 to schedule this job during a maintenance window (e.g., 2:00 AM – 4:00 AM).
- Navigate to
SQL Server Agent > Jobs > New Jobin SSMS to automate this specificALTER INDEXscript.
Step 4: Evaluate Data Type Compatibility (Optional Long-Term Fix)
- If frequent online rebuilds are a business requirement, evaluate if the LOB data can be refactored.
- Check if
VARCHAR(MAX)data is actually small enough to fit into a standardVARCHAR(8000)orNVARCHAR(4000), which supports online operations. - Modify the schema using
ALTER TABLE YourTableName ALTER COLUMN YourColumnName VARCHAR(8000);if business logic allows for the data truncation/change.
Alternative or Verification Steps
- Verification: After running the index rebuild with
ONLINE = OFF, check thesys.indexescatalog view to ensure theis_disabledflag is set to0and verify the operation completed without further 10635 errors in the SQL Server Error Log located atC:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\. - Alternative: If downtime is strictly prohibited, consider using the
RESUMABLE = ONoption in conjunction withONLINE = OFFfor very large tables; this allows you to pause and resume the offline index build without restarting the entire process, minimizing the impact of the required lock.