Unable to create index with the migration wizard

Dec 3, 2009 at 2:00 AM

I used the management studio to generate a script. It contains a index creation like:

CREATE NONCLUSTERED INDEX [index123] ON [dbo].[table123]
(
 [column123] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

After running the migration wizard, that part becomes:

CREATE NONCLUSTERED INDEX [index123] ON [dbo].[table123]
(
 [column123] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

The resultant script cannot be run on SQL Azure, I got this error: 'Filegroup reference and partitioning scheme' is not supported in this version of SQL Server.

Did I make any mistake?

Coordinator
Dec 3, 2009 at 3:14 AM

Hi, no you didn't make a mistake.  It is something that I missed looking for.  Can you do me a favor and pull NotSupportedByAzureFile.config from the downloads and replace yours with it and then run.  Basically, I added this line:

<NotSupported Text="\)\sON\s\[.*\]" ReplaceWith=")" SeverityLevel="0" ReplaceString="true" DisplayWarning="false" DefaultMessage="false" WarningMessage="" />

Under <IndexOptions>. 

That should remove "ON [PRIMARY}" which is what the problem is.  Try it out and let me know if this works.

Thanks for your help!
George

Dec 3, 2009 at 4:12 AM

Yup, that works. Thanks.