The utility shows comparison between the data and objects from two databases to see differences. It acknowledges objects having separate definitions in both the databases and presents them in a separate style format of selection. Variations in the data are seen in standard form of CSV, VERTICAL, GRID or TAB.
Make use of notation db1: db2 and name both the databases to compare or just compare DB1 to compare two databases under similar name.
The comparison might just run against both databases of varied names on a singular server by suggesting only the server1 alternative. Users can also interlink to another serve by stipulating just the server 1 option. However, they can also link to another server by stipulating the server 2 alternative. Under such a condition, db1 is taken from server 1 while db2 is taken from server 2.
All the databases between both the servers can also be compared via the all option. Under such a situation, only the databases in common with similar name between the servers are efficiently compared. So, you do not have to be specified but server 1 and server 2 alternatives are needed. You can skip the comparison of some databases via the –exclude option.
Remember the data shouldn’t be changed during the comparison. You may see errors occur when data is changed during the comparative study.
The objects chosen in the database comprise of views, procedures, events, functions, triggers and tables. You can show the count for every object type via –vv option.
The check is performed via tests. By default, when the first test fails, the utility stops, but with the help of run all tests options to run all the tests together irrespective of their final state.
The tests comprise of:
1. Evaluate database definitions: ensure both the databases are present.
2. Evaluate the existence of objects in the two databases: ensure that both the databases acknowledges the objects
3. Make a comparative study of object definitions: the objects are compared and differences shown.
4. Evaluate table row counts: ensure that the two database tables have similar row numbers.
5. Evaluate table data uniformity: it ensures both the changed rows and the missing rows from each table in the databases. The step is divided into two stages: firstly the complete table is compared between the table, but if it fails, then the program to search rows differences is implemented.
You might wish to use – skip – xxx function to just run few tests. It is helpful when you want to synchronize two databases, to ignore running all the tests again and again in the procedure. Every test shows following results:
• Pass- the test is successful
• Fail- the test failed
• Skip- the test skipped because of a missing point.
• Warn- the test witnessed an unusual error.
• – -the test isn’t right for this object.
With the help of these results, you can find out whether the tests were successful or not and whether you need to conduct them again or not.