1

Any advice would be appreciated. I'm leading my projects initiative to upgrading our ETL software. This can result in data integrity differences. My testing plan is as follows:

  1. create an identical schema, schema B, with the same table definitions as schema A
  2. run all the ETL jobs to populate schema B using the upgraded ETL version
  3. **compare the two schemas and record differences
  4. determine why those differences occured

**So my question is regarding step 3. What technically do I need to do (commands, queries, etc) to compare every field in every row between the two schemas to confirm that they are identical?

Thank you for your time!

3
  • Are you asking for if the data changed? or if the DDL changed? Commented Apr 8, 2014 at 15:49
  • I'm asking this for if data changes
    – farberjd
    Commented Apr 9, 2014 at 1:00
  • How many tables/rows are there ? If not many you can get the data and compare it in file diff tools like Araxis manually otherwise you can write a small program to compare based on some prior information like which values are same for sure and which can change. Commented Apr 11, 2014 at 5:58

1 Answer 1

0

If you just want to do a quick check, you can always use EXCEPT in you query to identify if rows in 2 tables are identical.

SELECT 'TABLE1-ONLY' AS SRC, T1.*
FROM (
      SELECT * FROM TABLE1
      EXCEPT
      SELECT * FROM TABLE2
      ) AS T1
UNION ALL
SELECT 'TABLE2-ONLY' AS SRC, T2.*
FROM (
      SELECT * FROM TABLE2
      EXCEPT
      SELECT * FROM TABLE1
      ) AS T2
WITH UR;

If you are using Toad, it has data compare features as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.