Error
Table: [XXX] does not have a clustered index. Clustered indexes are required for inserting data in this version of SQL Server.
Cause
SQL Azure needs at least one clustered index per table in order to maintain the other two replicas that are created out of the box for all databases. You can create a table without the clustered index, but if you try to do any CRUD operation this error will be thrown.
Fix
Create a clustered index for the table. Recommendations:
1) If the table has a column with IsIdentity=true, create a clustered index by that column (normally will be the PK)
2) If the table does not have a column with IsIdentity=true, to ensure the maximum compatibility with current code just create a column RowId with IsIdentity=true and the clustered index on it:
ALTER TABLE [XXX] ADD
RowId int NOT NULL IDENTITY (1, 1) PRIMARY KEY CLUSTERED
GO
Part of the
SQL Azure Compatibility Centre