2
Vote

Bug in schema creation script for Adventure Works for Azure SQL Database Federations

description

I'm getting the following error message:
Msg 1902, Level 16, State 3, Line 2159
Cannot create more than one clustered index on table 'Production.BillOfMaterials'. Drop the existing clustered index 'PK_BillOfMaterials_BillOfMaterialsID' before creating another.

comments

gsacavdm wrote Jan 23 at 10:19 PM

I don't know how this was missed or why it isn't fixed but to fix it, just open AdventureWorks2012ForSqlAzure_Schema(_Fed).sql and replace line:

CONSTRAINT [PK_BillOfMaterials_BillOfMaterialsID] PRIMARY KEY CLUSTERED

With

CONSTRAINT [PK_BillOfMaterials_BillOfMaterialsID] PRIMARY KEY NONCLUSTERED