Sql-server – deploy data from sql 2016 backup to azure database

azure-sql-databasemigrationsql server

I've got backup data from a SQL 2016 server that i want to move/restore onto an azure database. I'm not seeing an in-house option to do this anywhere, so it looked like the best option was to restore locally, build schema/data scripts for the data, and then run the script on the azure database.

Only problem is that the script that i get back is around 4GB large. it won't load in sql management studio or azure's own 'query editor' page, and if i deploy via sqlcmd it crashes halfway w/out an easy way to figure out where it crashed at and how to resume from that point.

Are there good methods out there to do this? I plan on needing to do this several times, so i'd like to get my methods down. Thank you!

Best Answer

You need a live DB to export to Azure, which would require you to restore it locally. Once that is done, you can create a .BACPAC file on Azure storage and restore it, or set up transactional replication, and there are a few other methods as well.

The .BACPAC migration process looks to be the simplest, even if it isn't that simple. Honestly, this page explains it better than I can. Bruno Terklay is at least a minor demigod over at Microsoft, and this is really well written. All credit to him, not me.