Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

SQL Server Error 1712: Online Index Fix Explained

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

SQL Server error 1712 ("Online index operations can only be performed...") appears when you try to rebuild or create an index with the option on an edition of SQL Server that does not support online index operations. The fix is simple: either drop the clause and run the operation offline, or run it on an edition that supports online rebuilds (Enterprise, Developer, or Evaluation editions). Below is how to confirm the cause and get the index operation working again.

What You'll Need

  • Access to SQL Server with a login that has permission to alter indexes on the target database (typically db_owner, db_ddladmin, or ALTER permission on the table)
  • SQL Server Management Studio (SSMS) or another query tool connected to the instance
  • The exact error message and the statement or maintenance plan/job that produced it
  • Permission to schedule downtime if you must run the rebuild offline on a production system

Step-by-Step

  1. Read the full error message. Error 1712 is typically followed by text such as "Online index operations can only be performed in Enterprise edition of SQL Server." This tells you the statement used on a non-Enterprise edition. (Note: online index operations are also supported in Developer and Evaluation editions; the message wording can vary slightly by SQL Server version.)
  2. Confirm your edition. Run SELECT @@VERSION; or SELECT SERVERPROPERTY('Edition'); in a query window. If it returns Standard, Express, Web, or Workgroup, online index operations are not available on that instance.
  3. Find the source of the clause. Common sources are: a hand-written ALTER INDEX or CREATE INDEX statement, an index maintenance job or script, a maintenance plan, or a tool-generated rebuild script. Search your agent jobs and scripts for "ONLINE = ON" or "ONLINE = 1".
  4. Remove the ONLINE option. Edit the statement so it no longer requests an online operation. For example, change ALTER INDEX IX_MyIndex ON dbo.MyTable REBUILD WITH (ONLINE = ON); to ALTER INDEX IX_MyIndex ON dbo.MyTable REBUILD;
  5. Check for other ONLINE-only options. Some options such as RESUMABLE = ON also require an online operation and are Enterprise-only. Remove those too if present.
  6. Run the statement offline during a maintenance window. An offline rebuild takes a shared table lock, so the table cannot be read or modified during the rebuild (except with the newer WAIT_AT_LOW_PRIORITY style options, which apply to online operations). On large tables this can take a while, so schedule it accordingly.
  7. Verify the rebuild succeeded. Run SELECT name, avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats (DB_ID(), OBJECT_ID('dbo.MyTable'), NULL, NULL, 'LIMITED'); and confirm fragmentation has dropped for the rebuilt index.
  8. Fix the maintenance job permanently. If the error came from a scheduled job or maintenance script, update that job's definition so it does not use or configure the script/tool to detect the edition and choose the appropriate mode automatically.

Common Mistakes

  • Retrying the exact same statement hoping the error is transient. Error 1712 is an edition limitation, not a timing or locking issue, so it will fail every time until the statement changes.
  • Confusing it with a blocking or deadlock problem. Because the message mentions "online index operations", people sometimes chase lock timeouts or blocked sessions. Check the error number first.
  • Rebuilding a large production table offline during business hours without warning, causing application downtime for the duration of the rebuild.
  • Only fixing the immediate query but leaving the agent job or maintenance plan unchanged, so the error reappears on the next scheduled run.
  • Upgrading expectations instead of the edition: installing a service pack or cumulative update will not add online operations to Standard edition.

Tips

  • If zero-downtime index maintenance is a hard requirement, online rebuilds require Enterprise edition (or Developer/Evaluation for non-production use). Weigh that against scheduling offline rebuilds in maintenance windows.
  • Consider whether a REORGANIZE is enough. ALTER INDEX ... REORGANIZE; works on all editions, is always online, and is often sufficient for moderate fragmentation, though it is slower than a rebuild for heavily fragmented indexes.
  • Small indexes (often cited as under about a thousand pages) rarely benefit from rebuilding at all; check fragmentation before rebuilding everything.
  • Script out your index maintenance statements and store them in source control so an edition change or server migration does not silently reintroduce unsupported options.

Troubleshooting

  • The error still appears after removing> The failing statement is probably coming from somewhere else, such as a job step, a maintenance solution script, or a third-party tool. Query sys.sql_modules and agent job steps, or capture the failing statement with SQL Server Profiler or Extended Events, to locate it.
  • You believe you are on Enterprise edition but still get the error. Re-check with SERVERPROPERTY('Edition'), and make sure you are connected to the correct instance. Also confirm you are not connected to a different server through an alias or connection string.
  • The offline rebuild fails with a lock timeout. Long-running queries can block the exclusive lock an offline rebuild needs. Run the rebuild when the table is quiet, or identify and address the blocking session using sys.dm_exec_requests and blocking-related dynamic management views.
  • The rebuild fails for another reason, such as insufficient disk space or the transaction log filling. Check available disk space for the database and its log, and verify the recovery model and log backup schedule before retrying.
  • The error occurs inside a maintenance plan you cannot easily edit. In SSMS, open the maintenance plan, open the Rebuild Index task, and clear the "Keep index online while rebuilding" option (wording may vary slightly by SSMS version), then save and rerun the plan.

Frequently Asked Questions

What causes SQL Server error 1712?

An index CREATE or REBUILD statement used the option on a SQL Server edition that does not support online index operations, such as Standard, Express, Web, or Workgroup.

Which SQL Server editions support online index operations?

Enterprise edition supports them in production; Developer and Evaluation editions also include the feature but are not licensed for production use. All other editions require offline index rebuilds.

Can I enable online index operations on Standard edition?

No. It is an edition feature and cannot be enabled by configuration, trace flags, or updates. Your options are offline rebuilds, REORGANIZE (which is always online), or moving to Enterprise edition.

What is the difference between an online and offline index rebuild?

An online rebuild keeps the underlying table available for reads and writes during the operation. An offline rebuild locks the table for the duration, blocking user access until the rebuild finishes.

Is REORGANIZE a good alternative on Standard edition?

Often, yes. REORGANIZE works on every edition, runs online, and reduces fragmentation, though it is slower than a rebuild for severely fragmented indexes and does not fully reset the index statistics with a full scan.

Will removing affect my applications?

Only if the rebuilt table is actively used during the rebuild. Offline rebuilds take a lock on the table, so run them in a maintenance window or use REORGANIZE when the table must stay available.