SQL SERVER – Generate Database Script for SQL Azure

When talking about SQL Azure the common complaint I hear is that the script generated from stand-along SQL Server database is not compatible with SQL Azure. This was true for some time for sure, but not any more. If you have SQL Server 2008 R2 installed you can follow the guideline below to generate a script which is compatible with SQL Azure.

SQL SERVER - Generate Database Script for SQL Azure azurescript1

SQL SERVER - Generate Database Script for SQL Azure azurescript2

SQL SERVER - Generate Database Script for SQL Azure azurescript3

SQL SERVER - Generate Database Script for SQL Azure azurescript4

As above images are very clear I will not write more about them. SQL Azure does not support filegroups. Let us generate script for any table created on PRIMARY filegroup for stand-alone SQL Server and compare it with the script generated for SQL Azure.

SQL SERVER - Generate Database Script for SQL Azure azurescript5

You can clearly see that there is no filegroup in the code generated for SQL Azure. Give it a try and please your comment here about what do you think about the same.

Azure services are made up of networks, drives, servers, etc. all hosted by Microsoft to provide scalable, on-demand services. This architecture comes with many positive attributes, but there are trade-offs when compared to an on premise solution.

Azure has an advantage in cost, deployment time, reduction in administrative and management overhead and Azure can be used to easily scale up or down depending on the needed workload. However, as stated, the underlying infrastructure is hosted. As an administrator, you do not have the same level of control over the individual components and there is less opportunity for deeper performance tuning operations as there are four on premise servers. Azure hardware is commodity hardware meant for scaling out and handling many applications.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Azure, SQL Scripts, SQL Server
Previous Post
SQLAuthority News – Training and Consultancy and Travel – Story of Last 30 Days
Next Post
SQL SERVER – Subquery or Join – Various Options – SQL Server Engine knows the Best

Related Posts

Leave a Reply