Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

SQL Azure – How to connect SQL Management Studio and import Northwind database

Taking my cloud education further … I wanted to explore the SQL Server relational database offering.   The first trick was to create a new “server” from the Azure portal.  After that I opened the web based SQL Azure portal to confirm it was online and healthy.

I was surprised by how easy it was to create a connection.  Simply create a firewall exclusion to your current IP address … and boom … you can open the SQL Azure with SQL Management Studio locally.  Pretty cool! 

Hot

The Azure Management Portal is proving very capable.  It even has a handy popup dialog with connection strings for convenient copy/paste.  Here is the process I used to import sample Northwind data:

  • Open both instances with SQL Management Studio
  • Right click local tables to build “CREATE TABLE” statements.  Copy/paste those from local to Azure and execute.  This creates the schema.  There are some limitations of Azure so you may have to double check your TSQL syntax (http://www.tewari.info/2009/09/10/sql-azure-notes/)
  • Use the SQL Import wizard to migrate data.   For Azure be sure to select “.Net Framework Data Provider for SqlServer”  destination.
  • To resolve red errors, ignore [ntext] or [image] data types during migration.  SQL Azure does NOT support [ntext] or [image] so I just removed those columns.   Not sure of the best way to migrate this type of data yet.  [ntext] should probably cast to VARCHAR(8000) and truncate anything longer.  [image] should probably be saved to the filesystem (JPG/PNG/etc.) and then a URL string pointer to the image file kept in SQL.
  • Click next and finish. Congratulations!   You now now have sample data in SQL Azure.

 

image
image
image
image
image
image
image

 

image
image
image

 

image

 

image

 

image
image

 

image
image
image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲