Databases Reference
In-Depth Information
Hands-on exercise 9.4 - migrating a table
on an on-premise SQL Server 2012 to the
Windows Azure SQL database
It is assumed that you have created a SQL Azure Server instance, but have not
created a table. It is also assumed that you are using data from your sample on
the on-premise SQL Server 2012:
1.
Access SSMS and connect to the SQL Server 2012 instance.
2.
Click on Tools | SQL Server Object Explorer | Scripting .
3.
Under General scripting options , change the option for Script for database
engine type from default to SQL Azure Database .
4.
Right-click on the table you want to take to Windows Azure and then click
on Tasks .
5.
Click on Generate Scripts... in the drop-down list.
6.
In the Generate and Publish Scripts dialog box, read the introduction and
choose Objects from the database you want.
7.
In the Set Scripting Options page, click on the Advanced button after
choosing a location for the script to be saved.
8.
In the Advanced Scripting Options page, change the option Schema only
for Types of data to script to Schema and data . Make sure you read the
other options on the Set scripting Options page.
9.
Click on Next or Finish .
The generated script file will be saved to the location of your choice in the previous
screen. You can upload this file to the Windows Azure SQL database service (see
the screenshot in step 1 of the Creating a table for the report section). Run the query
in the portal (see the screenshot in step 1 of the Creating a table for the report section),
and you will recreate the database (table) with data. You can now use this data to
create reports.
This completes the hands-on to transfer sample table (database) to SQL
Azure database.
 
Search WWH ::




Custom Search