How do I confirm all the data moved from Source to target for different tables

5 pts.
Tags:
Data migration
SQL
SQL migration
How do I confirm all the data moved from Source to target for different tables. I am not able to phrase this question. Bottom line I want to make sure all the data was transferred to target database. That is my test to validate. Thanks

Software/Hardware used:
SQL

Answer Wiki

Thanks. We'll let you know when a new response is added.

With SQL. use the
Select COUNT(*)
option for each of the tables in both the source and target system.
That will tell you if your record count is correct.
*
If you want to get to the record level, you can do a EXCEPTION JOIN

—————– kccrosser

I commonly check two tables using either EXCEPT (SQL Server) or MINUS (Oracle):

select * from <table1>
except
select * from <table2>

This will return all rows in table1 that are not in table 2. Obviously, running it in reverse verifies there are no extra rows in table 2:

select * from <table2>
except
select * from <table1>

In Oracle, the “MINUS” term has the same effect.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following