简体   繁体   中英

How to compare data between two different database of two different providers?

We are planning to do a database Migration from MySql Server to MSSQL server; we have got some external tools and some internal tools to accomplish this. Now we need to have a process to validate the data between the MySql and MSSQL server after the Migration. We did a search and came across tablediff.exe. But it seems it can compare between only MSSQL databases. Not sure if we can use this tools by creating a linked server for MySql database (If so please let me know how to do that). If there is any other tools please suggest me.

Thanks in Advance,

I have achieved this using Linked server option of mssql server. I have created the linked server for my mysql database and used following query to achieve this

(select * from a 
except select * openquery(LINKEDSERVER,'select * from a'))
Union
(select * openquery(LINKEDSERVER,'select * from a')
except 
select * from a)

I'm not sure if this is a right way of doing this. But it did worked for us.

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