简体   繁体   中英

Migrating SQL Server database from AWS to Azure

I have a large database in an AWS instance running SQL Server 2008 on a Windows Server 2008 R2.

The database is constantly changing and writing information, and its size is about ~100GB

I wish to migrate from our Amazon services to Microsoft Azure.

But I cannot afford any lost of information more them for more than 20-30 minutes

I don't mind using the Azure SQL or running a SQL Server under a VM in Azure Cloud, but I must keep the databases live and updated, there are few main tables that information is being added to them constantly

What would be the best way to do so ?

if you are using an AWS instance and not RDS and you are going to an Azure instance and not "Azure SQL Database" you can use log-shipping or something similar to get the downtime down to a few seconds: http://msdn.microsoft.com/en-us/library/ms187103.aspx

The steps you need to take:

  1. Take full backup on AWS
  2. restore full backup without recovery on Azure
  3. take log backup on AWS
  4. restore log backup without recovery on Azure
  5. repeat 3 and 4 until the time it takes is short enough (you probably want to script this out)
  6. take app offline
  7. take another log backup on AWS
  8. restore that log backup WITH recovery on Azure
  9. repoint App to Azure
  10. bring App online again.

3, 4 and 5 is what log-shipping would automate, but you could just write a powershell script too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM