PAD_INDEX with Azure to Azure


When migrating from Azure Database to Azure Database, the generated script has an error:
In CREATE TABLE statement is generated with "PAD_INDEX = OFF".
That doesn't work on Azure Databases
I Have analyzed the source with Reflector and found that:
if (so.TargetDatabaseEngineType != DatabaseEngineType.SqlAzureDatabase)
   this.ScriptAlterPropBool("PadIndex", "PAD_INDEX", so, queries, ref optCount, false, false);
At the generation time, the wizard can't know that type of the target, because that is specified AFTER the generation.
I Think he decides because of the Source:
SQL-Server -> target = Azure
Azure -> target = SQL-Server.
==> In Migration mode, Source AND Target schould be specified before Script Generation.
Remove the PAD_INDEX Clauses manually after script generation.
Maybe copy the content to an Editor, replace all PAD_INDEX and copy it back to the wizard.


ghuey wrote Jan 15, 2011 at 2:20 PM

Hi, what version of SQLAzureMW are you using? I looked through the code and I don't have a function ScriptAlterPropBool or anything hard coded with PAD_INDEX. When you ran SQLAzureMW, did you choose Analyze and Migrate SQL Database?


nissenvelten wrote Jan 20, 2011 at 12:59 PM

Ok, you are right: there is no method ScriptAlterPropBool in SQLAzureMW. The code I found was in Microsoft.SqlServer.Management.Smo. The Reflector added that automatically :-)

I tested it again with the differnt options an if I choose Analyze and Migrate ist works.
Originally I have choosen "Migrate without Analyzing" because I already have an Azure Database - so I thougt there is no need to Analyze.

So the Wizard works in the following way:
Targat is SQL Azure -> choose Analyze
Target is SQL Server -> choose without Analyze.

We schould rename that Item or open a new item to improve the usability of the start Screen.


wrote Feb 9, 2011 at 6:51 PM

wrote May 6, 2011 at 9:14 AM

wrote Feb 22, 2013 at 12:00 AM