FÖRSÄLJNING: 1-800-867-1389
EN
Det här innehållet finns inte tillgängligt på ditt språk men här finns den engelska versionen,

How to: Use SQL Server Data Tools to Migrate a Database to Azure SQL Database

Updated: October 16, 2014

The SQL Server Data Tools (SSDT) is used for offline development of databases for SQL Server and Microsoft Azure SQL Database. SSDT is a good choice for managing database development work in database migration projects.

Before You Begin

Databases being migrated to Azure SQL Database may require schema changes to address dependencies on features not supported by Azure SQL Database. SSDT database projects are a good tool for managing the database development, test, and deployment work. SSDT supports integration of the database project into a Visual Studio solution that also includes the application projects when application changes are required as part of the migration.

Recommendations

Complex migration projects that require many schema changes usually have to incorporate several tasks, such as:

  • Import the schema into a database project in SSDT.

  • Set the project target to Azure SQL Database perform a build to do the first analysis of objects not supported by Azure SQL Database. The build will display a list of errors for objects not supported on Azure SQL Database. Leave the target set to Azure SQL Database so that SSDT will validate syntax against the Azure SQL Database requirements as database schema changes are made.

  • Run a database development task to make all required schema changes, working through the list of build errors and resolving each reported issue. Once a build of that project reports that no unsupported objects remain, perform a test deployment to Azure SQL Database to ensure that the objects remaining in the database are supported by Azure SQL Database.

  • Run a concurrent application development task to make all code changes driven by the schema changes. Generate traces of the Transact-SQL statements generated by the applications, and use the Azure SQL Database Migration Wizard to scan for syntax not supported on Azure SQL Database. Also run a concurrent development task to build the processes for transferring data from the source database to the new version.

  • Build a deployment package for the database schema.

  • Perform integrated database and application testing. Deploy the database to a test Azure SQL Database service. Import a representative set of data as a test of the data transfer processes. Do a fairly comprehensive functional test of the application against the test database to ensure that Transact-SQL statements generated by the applications work on Azure SQL Database.

  • Perform an integrated production deployment of the database schema, applications, and run the data transfer process.

For more information about running a Azure SQL Database project, see Manage an Azure SQL Database Migration Project.

For more information about doing database development using SSDT, see SQL Server Data Tools (SSDT).

For more information about using SSDT to migrate a database to Azure SQL Database, see Migrating a Database to Azure SQL Database using SSDT.

Limitations and Restrictions

The current version of SSDT does not detect all schema issues when the project target property is set to Azure SQL Database. After SSDT reports no Azure SQL Database schema issues, verify that by deploying the database to a test Azure SQL Database service.

[Top]

Prerequisites

For information about installing SSDT, see Install SQL Server Data Tools

[Top]

Use SSDT with DAC Packages

When using SSDT to manage the database changes required by a migration, you can use DAC packages as the mechanism for transferring the schema changes.

  1. Use SQL Server Management Studio or a PowerShell script to extract a DAC package from the source database.

  2. Create a database project in SSDT, and import the DAC package.

  3. Set the target property of the SSDT database project to Azure SQL Database.

  4. Make all changes required to ensure that all database objects are supported by Azure SQL Database.

  5. Set the project build property to DAC package.

  6. Build the project to generate a DAC package.

  7. Use SQL Server Management Studio or a PowerShell script to deploy the DAC package to the Azure SQL Database service.

For more information about extracting and deploying DAC packages, see How to: Use a DAC Package to Migrate a Database to Azure SQL Database.

[Top]

Use SSDT with Direct Connections

You can connect directly to the source database to import the schema. After completing the work to ensure that all objects are supported on Azure SQL Database, you can connect to the destination Azure SQL Database service to publish a database containing the new schema.

  1. Create a database project in SSDT.

  2. Connect directly to the source database and import the schema to the SSDT project.

  3. Set the target property of the SSDT database project to Azure SQL Database.

  4. Make all changes required to ensure that all database objects are supported by Azure SQL Database.

  5. To deploy the new schema, connect to the destination Azure SQL Database service and perform a publish operation.

For more information about extracting and deploying DAC packages, see How to: Use a DAC Package to Migrate a Database to Azure SQL Database.

[Top]

See Also

Var detta till hjälp?
(1500 tecken kvar)
Tack för dina kommentarer

Gruppinnehåll

Lägg till
Visa:
© 2014 Microsoft