mtv
mtv

Reputation: 151

Migrate from SQL Server 2008 R2 to Azure SQL v12

I have a set of SQL Server 2008 R2 databases. I need to migrate them to Azure SQL V12. Steps I have completed so far:

  1. Updated the .sqlproj to reflect Microsoft Azure SQL Database V12
  2. Completed all the schema changes in the solution which include added Master key, creating a credential object, adding reference tables (for all the cross referenced tables between databases), And also took care of the scripts/schema related to tempdb tables.
  3. Build the sqlproj projects. SystemDB and ClientDB.
  4. Also completed deploying this updated schema from solution to the Azure SQL database on standard tier databases to validate that the schema is correct for the target.

Now, How do I go about moving the data from my original database tables into the newly created Azure SQL databases?

I have tried to follow document here. Recipe 3. But, My new sqlproj project does not deploy to the copy of databases which is on SQL Server 2008 R2. What am I missing here? Is there an Azure SQL compatible SQL Server version that I need to move my original databases to?

Any help will be greatly appreciated.

Thanks.

Upvotes: 0

Views: 313

Answers (1)

Xiaochen Wu
Xiaochen Wu

Reputation: 171

You can export the database to a .bacpac file, upload it to Azure storage and import it to Azure SQL Database. Here're the detailed steps:

  • Assess the database for compatibility using the latest version of Data Migration Assistant (DMA).
  • Prepare any necessary fixes as Transact-SQL scripts.
  • Make a transactionally consistent copy of the source database being migrated - and ensure no further changes are being made to the source database (or you can manually apply any such changes after the migration completes). There are many methods to quiesce a database, from disabling client connectivity to creating a database snapshot.
  • Deploy the Transact-SQL scripts to apply the fixes to the database copy.
  • Export the database copy to a .BACPAC file on a local drive.
  • Import the .BACPAC file as a new Azure SQL database using any of several BACPAC import tools, with SQLPackage.exe being the recommended tool for best performance.

You can find more details in the online document.

Upvotes: 2

Related Questions