Comparison of data in two different databases

Hello Experts,
Currently I am in the process of comparing a large number of tables between two databases. The source db is Sybase and the destination to which it was migrated to is SQL Server. One simple but a tedious way is to save the output as text files and compare it with each other using file comparison, which really is not efficient when the rows are several hundred thousands. Hence, would like to know if there is an easy way out.

Thanks in Advance!
sukhoi35Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
There is no efficient way, as long as you are unable to find restrictions what to check for. E.g. if you can use a primary key, checking existence is easy. Or if there is a modification timestamp, you can compare that.
Other than that, you would have to compare complete rows.

If you manage to have a Sybase connection from MSSQL, you can use a linked server definition and the compare in SQL directly.
If you can't do that, but can connect to both DBs from a PC, you would have to write up e.g. a PowerShell script performing a sophisticated row-by-row compare.
You can also re-import those tables into a second DB in MSSQL, and the check with SQL.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> One simple but a tedious way is to save the output as text files and compare it with each other using file comparison, which really is not efficient when the rows are several hundred thousands.

Yes, this will work provided you do some manual work in the middle.
There are few third party tools which can do this with certain limitations(I would say prerequisites) like Schema and Table structure to be similar to work like the below ones..

http://www.dbbalance.com/database_comparison.htm
sukhoi35Author Commented:
Thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.