Error 1530

Severity Level 16

Message Text

Create index with sorted_data was aborted because of row out of order. Primary key of first out of order row is '%S_KEY'

Explanation

This error occurs when you try to create an index using the CREATE INDEX statement's sorted_data option on a column or columns containing data that is not in sorted order. When this error occurs, no index is created.

The sorted_data option speeds creation of an index when the data in the table is already in sorted order. The space required to build a clustered index is less when the sorted_data option is used.

The sorted_data option speeds index creation only for clustered indexes or unique nonclustered indexes. Creating a non-unique nonclustered index with the sorted_data option may succeed, but there is no improvement in performance.

Action

Use either of these strategies:

You can also use the SORTED_DATA_REORG option, which physically reorganizes the data.

For more information about indexes and their options, see the CREATE INDEX statement in the Microsoft SQL Server Transact-SQL Reference.