SQL Server Error 1070: Create Index Option No Longer Supported
In this article
SQL Server error 1070 ("CREATE INDEX option is no longer supported") appears when a CREATE INDEX or ALTER INDEX statement includes an old option that the current SQL Server version no longer accepts. The fix is to remove or replace the unsupported option, then rerun the statement. In most cases the culprit is a legacy index option such as SORTED_DATA, SORTED_DATA_REORG, or an old-style FILLFACTOR/ PAD_INDEX combination carried over from SQL Server 6.5 or 7.0 scripts. The current engine ignores or rejects these options, so you must edit the script to use supported syntax.
What You'll Need
- SQL Server Management Studio (SSMS) or another client that can run T-SQL against the database.
- Permission to run CREATE INDEX or ALTER INDEX on the target table (db_ddladmin or higher, or ownership of the table).
- The original CREATE INDEX or ALTER INDEX statement, or the ability to script the index from the object explorer.
- A backup or a tested restore point if you are changing an existing index on a production table.
Step-by-Step
- Capture the exact failing statement. Run the statement in SSMS and read the full error message. Error 1070 usually names the option that is no longer supported. If the message is truncated, check the SQL Server error log or the output window for the complete text. Write down the option name before you change anything.
- Identify the unsupported option. Common legacy options that trigger error 1070 include SORTED_DATA, SORTED_DATA_REORG, and some old FILLFACTOR or PAD_INDEX forms. If the statement was copied from an old migration script, compare it with the current CREATE INDEX syntax in SQL Server Books Online. The option may be on its own line or appended after the column list.
- Remove or replace the option. For SORTED_DATA and SORTED_DATA_REORG, delete the option entirely. SQL Server no longer uses it; the index build will sort the data itself. For FILLFACTOR and PAD_INDEX, keep them only if they are written in the current form (for example, WITH (FILLFACTOR = 80, PAD_INDEX = ON)). If the old form uses a bare number or a comma without the WITH clause, rewrite it to the current syntax.
- Check for other deprecated syntax in the same statement. Error 1070 often appears alongside other old options. Look for things like IGNORE_DUP_KEY without the WITH clause, or index options placed before the column list. Move all options into the WITH clause and use the current keyword names.
- Test the corrected statement on a non-production copy. Run the edited CREATE INDEX or ALTER INDEX against a development or staging database first. Confirm that the index is created and that the query plans using the table still behave as expected. If the index already exists, use ALTER INDEX ... REBUILD with the corrected options instead of CREATE INDEX.
- Apply the fix in production. Run the corrected statement during a maintenance window if the table is large or heavily used. For an existing index, ALTER INDEX ... REBUILD WITH (ONLINE = ON) can reduce blocking if your edition supports online rebuilds. After it completes, verify the index exists and is not disabled by querying sys.indexes for the table.
- Update the source script or migration file. The error will return the next time the old script runs. Edit the original .sql file, deployment script, or ORM migration so the unsupported option is gone. If the script is stored in source control, commit the change and note why the option was removed.
Common Mistakes
- Deleting the whole statement instead of the option. Error 1070 points to one unsupported option. Removing the entire CREATE INDEX statement leaves the table without the intended index. Edit only the offending clause.
- Assuming the option is still valid because it parses. Some old options are accepted by the parser but rejected at execution. Always run the statement, not just parse it.
- Forgetting to update the deployment script. Fixing the statement in SSMS but leaving the old script in source control means the error reappears on the next deployment.
- Rebuilding a large index without checking space. Removing SORTED_DATA means SQL Server sorts the data during the build, which can require significant tempdb and log space. Check free space before rebuilding a large table.
- Using ALTER INDEX with CREATE INDEX syntax. If the index already exists, use ALTER INDEX ... REBUILD. CREATE INDEX fails with a different error if the index name already exists.
Tips
- Script the existing index from SSMS Object Explorer (right-click the index, Script Index as > CREATE To) to see the current supported syntax for your version.
- Search your codebase for SORTED_DATA and SORTED_DATA_REORG to find other scripts that will fail the same way.
- Use SET NOEXEC ON to parse a statement without executing it, then SET NOEXEC OFF. This catches syntax errors before you run the statement against a large table.
- Keep a copy of the original statement and the error message together in your change record so the fix is auditable.
- If you are migrating from an older SQL Server version, run the Upgrade Advisor or the newer Database Experimentation Assistant to flag deprecated syntax before the migration.
Troubleshooting
If the error persists after removing the option, check whether the statement is being generated dynamically. A stored procedure or application may be building the CREATE INDEX text at runtime, so the old option is still present in the code even though your manual test worked. Search for the option name in stored procedures, triggers, and application source code.
If you cannot find the option in the statement, look for a default or a template. Some third-party tools generate index scripts with legacy options. Check the tool's index generation settings and update the template.
If the corrected statement runs but the index is not used, update statistics and check the query plan. The index may need different key columns or included columns. Error 1070 is only about syntax; performance is a separate check.
If you receive a different error after removing the option, such as error 1913 or 1505, the problem is likely a name conflict or a permission issue. Resolve that error before assuming the original fix failed.
Frequently Asked Questions
What does SQL Server error 1070 mean?
It means the CREATE INDEX or ALTER INDEX statement includes an option that the current SQL Server version no longer supports. The statement is rejected until the option is removed or rewritten.
Which options cause error 1070?
Legacy options such as SORTED_DATA and SORTED_DATA_REORG are the most common causes. Old forms of FILLFACTOR and PAD_INDEX can also trigger it if they are not written in the current WITH clause syntax.
Can I just ignore the error and create the index without the option?
Yes. Removing the unsupported option is the correct fix. The index will be built using the current default behavior, which sorts the data automatically.
Does error 1070 affect existing indexes?
No. It only affects statements that try to create or alter an index with the unsupported option. Existing indexes remain in place until you rebuild or drop them.
Will removing SORTED_DATA change the index behavior?
No. SORTED_DATA was a hint that the data was already sorted. SQL Server now sorts the data during the index build regardless, so removing the option does not change the final index structure.
Where can I find the current CREATE INDEX syntax?
Use the official SQL Server documentation for CREATE INDEX and ALTER INDEX. The syntax section lists all supported options for your version.