|  | Sign in
Expand
2 out of 2 rated this helpful Rate this topic

Migrating Databases to SQL Azure

To migrate an existing SQL Server database to SQL Azure Database, you export the database's schema and then transfer the data from the database to SQL Azure Database.

Migrating Databases to SQL Azure by Generating a Script of an Existing Database

To migrate an existing SQL Server database to SQL Azure you can export the schema as a Transact-SQL script and then execute that script against SQL Azure Database as follows:

  1. Export a script from SQL Server Management Studio and set the appropriate export options. Because SQL Azure Database supports a subset of features found in SQL Server, you may have to make some modifications to the script before you are able to execute it in the cloud.

  2. Execute the script to create the schema in SQL Azure Database.

You can use the Generate and Publish Scripts Wizard to transfer a database from a local computer to SQL Azure Database. The Generate and Publish Scripts Wizard creates Transact-SQL scripts for your local database. The wizard uses them to publish database objects to SQL Azure Database. For more information, see How to: Migrate a Database by Using the Generate Scripts Wizard (SQL Azure Database).

Migrating Databases to SQL Azure Using Microsoft Sync Framework 2.1

Microsoft Sync Framework 2.1 provides synchronization capabilities between on-premise and SQL Azure servers, as well as between two or more SQL Azure databases in the same or different data centers. Using Sync Framework 2.1, you can extend the schema and data within your SQL Server database or SQL Azure database to SQL Azure data centers around the world to provide geo-available data access. For more information, see Synchronizing SQL Azure and Microsoft Sync Framework 2.1 Software Development Kit (SDK).

Migrating Databases to SQL Azure by Using Data-tier Application Export and Import

You can perform a Data-tier Application (DAC) export to migrate both the definition of the objects in a database and the data from the user tables into a DAC export file (BACPAC). You can then copy the BACPAC file into the Windows Azure blob storage service, and perform a DAC import to create a new database containing all of the objects and data. For more information, see How to: Import a Data-tier Application (SQL Azure).

Moving Data into SQL Azure

SQL Azure supports the use of SQL Server Integration Services. SQL Server Integration Services is a convenient way to move data into and out of SQL Azure. Alternatively, you can transfer data to SQL Azure by using the bulk copy utility (bcp.exe).

SQL Server Integration Services

You can transfer data to SQL Azure Database by using SQL Server 2008 Integration Services. In SQL Server 2008 R2 or later, the Import and Export Data Wizard provides support for SQL Azure . You can use this tool to migrate on-premise databases to SQL Azure Database. For more information, see How to: Run the SQL Server Import and Export Wizard in SQL Server Books Online.

Migrating Databases to SQL Azure by SQL Azure Migration Wizard

The SQL Azure Migration Wizard walks you through the selection of your SQL objects, creates SQL scripts suitable for SQL Azure, and allows you to migrate data between on-premise SQL Server 2005 or 2008 and SQL Azure servers, as well as between two or more SQL Azure databases in the same or different data centers. For more information, see SQL Azure Migration Wizard on Codeplex.

WarningWarning
The SQL Azure Migration Wizard tool is built by the community and not supported.

The bcp Utility

The bcp utility can be used to import large numbers of new rows into SQL Server tables or to export data out of tables into data files. For more information, see bcp Utility in SQL Server Books Online.

See Also

Did you find this helpful?
(1500 characters remaining)