Eksportér (0) Udskriv
Udvid alt
EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.
0 ud af 1 klassificerede dette som nyttigt - Bedøm dette emne

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

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

Author: Shaun Tinline-Jones
Reviewer: Bill Gibson

Before You Begin

Databases being migrated to SQL Database may require schema changes to address dependencies on features not supported by 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 SQL Database perform a build to do the first analysis of objects not supported by SQL Database. The build will display a list of errors for objects not supported on SQL Database. Leave the target set to SQL Database so that SSDT will validate syntax against the 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 SQL Database to ensure that the objects remaining in the database are supported by 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 SQL Database Migration Wizard to scan for syntax not supported on 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 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 SQL Database.

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

For more information about running a SQL Database project, see Planning a Windows 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 SQL Database, see Migrating a Database to Windows 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 SQL Database. After SSDT reports no SQL Database schema issues, verify that by deploying the database to a test 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 SQL Database.

  4. Make all changes required to ensure that all database objects are supported by 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 SQL Database service.

For more information about extracting and deploying DAC packages, see How to: Use a DAC Package to Migrate a Database to Windows 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 SQL Database, you can connect to the destination 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 SQL Database.

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

  5. To deploy the new schema, connect to the destination 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 Windows Azure SQL Database.

[Top]

See Also


Build Date:

2013-04-18
Syntes du, dette var nyttigt?
(1500 tegn tilbage)
Tak for din feedback

Fællesskabsindhold

Tilføj
Vis:
© 2014 Microsoft. Alle rettigheder forbeholdes.