In the previous post we had examined on getting access to SQL Azure, creating your first database, accessing it with SQL Server Management Studio and then migrating the Northwind database schema to SQL Azure using the SQL Azure Migration Wizard Beta. As explained earlier, the SQL Azure Migration Wizard migrates the schema of your database after tuning it for working with SQL Azure. However, we would still need to migrate the Data to our SQL Azure Server. At the moment, the step I took was to open the instnwnd.sql script in SQL Server Management Studio (SSMO) and copy the Insert statements alone to execute. Note that, you cannot run all the scripts directly onto the SQL Azure portal like I explained earlier due to the limitations / formats supported currently in SQL Azure. To begin with, open “C:SQL Server 2000 Sample Databases” folder (the default location where Northwind and pubs sample database gets installed) and double click on the instnwnd.sql script. It opens up in SSMO. Examine the scripts and navigate to the portion where the INSERT statements begin. I took the portion and put it up as a single insert script. You can download the script from the link below:- Running the scripts from SQL Server Management Studio As explained in my previous post, open SSMO and cancel the initial login prompt. Click on “New Query” and specify the server name as the fully qualified Azure Server name i.e. .ctp.database.windows.net, specify the user name, password. Click on “Options” and specify “Northwind” at “Connect to database” option. Click “Connect”. It should be able to connect provided you have specified the path, username, password etc., correctly and created the “Northwind” database as per the previous post. There will be a small error prompt that comes before opening the Query window, as below. You can ignore that and click “ok” Once you are in the SqlQuery1.sql screen you can check if the database is created and the tables are there by running a bunch of few queries as below:- SELECT * FROM Products SELECT * FROM Orders etc., You will get blank result sets since we haven’t migrated the data yet
See the original post here:
Taking your Northwind Database to SQL Azure and binding it to an ASP.NET Grid View – Part II