sqlazureazure-sql-databaseazure-data-sync

SQL Server Merge with two tables from different azure SQL Database from same Azure SQL SERVER


I need to merge with 2 different tables from 2 different azure SQL databases where as these two azure sql database are from same azure sql server.

also for performance imporvement purpose, what I need to do is bulk insert and/or bulk update. also, this will be continous activity. for very first time I have to merge all data which is huge. and then whenever respective topic recivies message, I need to add/update that single record only.

what are the different options to do the same. for both processes.

please help. thanks.


Solution

  • You can use Azure SQL Data Sync to merge those tables located on 2 different databases into a third and new database. You just need to create the table with no records, then use Azure SQL Data Sync with one-way sync from those 2 databases (member databases) to the newly created table on the new database (hub database). On the first sync data will be merged on the new table located on the hub database. Every time a record gets updated, deleted or new record arrive on the member databases then that data change is replicated to the hub database and to the merged table.

    To know more about the free Azure SQL Data Sync please read here.