"Cannot specify partition number in the alter index statement as the index is not partitioned."

May 8, 2012 at 1:41 PM


"Cannot specify partition number in the alter index statement as the index  is not partitioned."

When i queried Sys.partitions table for the table name i could get multiple rows so i had rebuilt below syantax

alter index <Indexname1> on <tablename>
rebuild partition = 1

But recieve the error "Cannot specify partition number in the alter index statement as the index  is not partitioned."

I had removed partition =1 from alter index and rebuild the index but when i check the fragmentaation level on physical _io_stats, i could find the fragmentation level >50.

Need help to defragment the table.

Details: SQL Server 2005
Indexes : two indexes
Query on sys.partitions for table : 2 rows