I'd like to write a program to verify the consistency between various
database replicas in our environment. The rules are as follows:
- I'm given two servers, each with a database
- I don't know the schema of the database
- The databases are large (some tables with 10,000,000+ rows)
What would be the best way to perform a pretty-good-guess analysis of
whether or not these two databases were in sync?
Currently I do the following:
- Give me a list of tables. If the table lists don't match, then call the
databases inconsistent.
- Give me a row count of each table. If the row counts don't match, call
the table inconsistent
What I'd like to do is actually do something with data, but these are large
databases and I don't think it's reasonable to compare each row. What do
you guys suggest?
Michael
database replicas in our environment. The rules are as follows:
- I'm given two servers, each with a database
- I don't know the schema of the database
- The databases are large (some tables with 10,000,000+ rows)
What would be the best way to perform a pretty-good-guess analysis of
whether or not these two databases were in sync?
Currently I do the following:
- Give me a list of tables. If the table lists don't match, then call the
databases inconsistent.
- Give me a row count of each table. If the row counts don't match, call
the table inconsistent
What I'd like to do is actually do something with data, but these are large
databases and I don't think it's reasonable to compare each row. What do
you guys suggest?
Michael
Comment