Microsoft release a new, free tool: Database Compare Utility
Compare same Databases and Tables, one is present on the on-premise sql server and the other one present on the Azure cloud
Want to compare the same databases and tables after the migration from the on-premise SQL server to the Azure SQL database.
Is there any script that can compare all the databases, tables, functions, stored procedures in one go? So that I can make sure all the things are migrated and none of the data is misplaced.
e.g., let say I have 5 rows and 6 columns in a table on on-premise SQL server and after the migration I want to check all the rows and columns are present in the target.
I have large numbers of databases and tables. So, Can't do this manually for each databases and tables, need to automate this so I can save time.
Thanks.
4 answers
Sort by: Most helpful
-
-
Alberto Morillo 32,896 Reputation points MVP
2021-12-03T13:08:36.967+00:00 Allow me to recommend SQLDBDiff, this commercial tool that will simplify the post-migration validation test by comparing data and schema between source and destination databases. It supports SQL Server Version 2005 to 2019, SQL Azure and SQL on Linux. There is free version and a commercial version.
-
Erland Sommarskog 101.9K Reputation points MVP
2021-12-03T23:03:09.68+00:00 In addition to the other suggestions, there is a very good database compare tool in Visual Studio, once you have installed SSDT, SQL Server Data Tools.
-
AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
2021-12-06T07:54:41.7+00:00 Hi NileshPatel-7672,
You can go to SSDT Tools menu ->SQL Server-> new data comparison to compare data (record to record) between SQL Server databases and Azure SQL databases; and new schema comparison to compare schema (field to field).Please refer to Use Schema Compare to Compare Different Database and Compare and Synchronize the Data of Two Databases which might be helpful.
Best Regards,
Amelia
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.