That comparison list reminds me of a proof technique (from when I once studied/taught math). I think you can compare in a ring. That is compare a1 to a2, then a2 to a3, a3 to a4, ... keep going until you compare a7 to a1.
Each step reports any differences. If there are none, everything is good. Only seven comparisons are needed.
Phil | [reply] |
I like BrowserUK's solution.
Alternatively - as these are system tables and are fairly small, I'd extract the data (via perl, isql, bcp) making sure that each table is always sorted in the same way, and then use plain old diff to get an idea of what is incorrect.
If the problem lies in incorrect role definitions then the number of tables that need to be checked is fairly limited, so doing it this way is reasonable, and can be completed fairly quickly.
Michael
| [reply] |