Wednesday, October 23, 2013

SQL On-Premise to SQL Azure Deployment / Migration

I am not a database person or planning to become one Smile.   But as part of my master’s program, I am taking a cloud database class this semester.   In SQL Server 2012, Microsoft has introduced this one-click functionality to move your local (on-premise) database onto SQL Azure.  You will see a new Deploy Database to SQL Azure option from SQL Management Console.   I thought that was a very useful and slick option instead of using a script based mechanisms.

 

image

Clustered Index Requirement

Before you migrate your database, you may need to evaluate your database and table configuration.  There is a Clustered Index requirement for SQL Azure.  According to http://msdn.microsoft.com/en-us/library/windowsazure/ee336245.aspx#cirWindows Azure SQL Database does not support tables without clustered indexes. A table must have a clustered index. If a table is created without a clustered constraint, a clustered index must be created before an insert operation is allowed on the table.”   However, if you have Primary Key, it will automatically create  a Clustered Index.  The Clustered Index requirement is applicable for any database operation in SQL Azure.  Following is an example:

image

In my case, my only option was to create Clustered Index using CREATE CLUSTERED INDEX command. 

0 comments:

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More