How to append all tables from one Azure Database to another

azure-sql-databasebulkcopy

I have two Azure databases (on different Azure instances) with the same schema. I need to append all the records from one of the databases to the other. All keys are GUIDs so should not collide.

Many tables have foreign key constraints. I have worked out the dependencies between tables and have the order in which I want the tables to be copied.

What tool allows me to append tables and specify the order in which the tables are copied? Should I use MS Data Migration Assistant? SSIS? Import and Export Wizard? Some other tool?

Best Answer

The easiest way to do it is going to be to SSIS to migrate the data over. The wizards alone should be able to do something this simple. The most efficient way would be to export everything to Azure blob storage and then use BULK INSERT. I'd do it all using Powershell so that you can control error handling better. It's going to be a lot more work though. If it's not that big and it's a one-time thing, I'd go with SSIS.