· Jul 11, 2017

Utility to find differences between databases?

Does anyone know of a utility to compare two databases (i.e., CACHE.DAT files) and find globals/subscripts that are different between them?

If not, I'll write one and share it. smiley

Discussion (6)1
Log in or sign up to continue

Export relevant globals to xml file(1 file per namespace) and compare hash sums. Also there's a lot of tools to display XML diffs if hash sums would differ.

Otherwise it's per global iteration and compare. I'd write some method to calculate global hash maybe (complete iteration and hash of keys and value). So:

  • Get lists of globals in both ns
  • Iterate over lists, and calculate hashes for each global separately
  • Compare lists (iterate over one list and delete each same value from both lists, all that's left is diff)
  • Report if global is in one list and not in the other
  • Report if global hashes differ across lists
  • (Optional) Display detailed compare for globals with different hashes