Testing SQL Azure
So how do you know whether all the T-SQL syntaxes are working with SQL Azure? For the purpose of this example we will use the TSQL from the AdventureWorks database.
Database
First you need to create a database. You need to be logged in to the Master database to create a database.
CREATE DATABASE AdventureWorks2008
After creating the database, you need to log into the database with the created database credentials.
Schema, UDF and UDT
Schema , UDF and UDTs will be created without any issues. However, if you generate the script from the AdventurkWorks2008 database there will be entries for stored procedure sp_addextendedproperty.
Table & DML Triggers
There are a few limitations in the CREATE TABLE statement when it comes to SQL Azure which are highlighted in the following image.

You will need to remove these tags and columns to create tables in SQL Azure. As you can see in the above image, ROWGUIDCOL, xml and hierarchyid data types are not supported.
Triggers will be created but you shouldn’t use columns with more than two parts.
If you run this statement you will receive following error.
Deprecated feature ‘More than two-part column name’ is not supported in this version of SQL Server.
In the Update statement above, RevisionNumber is referred as [Purchasing].[PurchaseOrderHeader].[RevisionNumber] which will not be supported by SQL Azure.
View
Views don’t have major issues except that the above mention column types are not supported.
Stored Procedures
Store procedures behave same as views.
DDL Triggers
DDL Triggers can be created but with a major limitation – the EVENTDATA() function is not supported in SQL Azure (the EVENTDATA() function used to capture event information).




24. Dec, 2009 







No comments yet... Be the first to leave a reply!