The ocidiff utility is just a peer-to-peer compare utility, it cannot get all of our problem resolved. For some big tables, for example the sales or the bill invoice tables, we may store the data in separate tables, or them in the same table between different databases, or different tables on different databases. When we need to make the table structure changes, we need cheat them all as one. If someone missed one column on some tables, it's not easy to identify them out manually, when you roll out the new application code, it may cause your application run into error, and you have to spend a lot of time checking the application log files to get the root cause.
So a script which can perform table structure compare between multiple tables and multiple databases is required. I wrote a Perl script for this task, I named it "compare any column" utility (download). I also add index compare features into it, the indexes are not compared by name, they are compared by the the column orders, seems more intelligent than the ocidiff utility.
I designed three compare types in this utility.
1, HOST type. Compare structure of different tables in the same database host. For example: "SALES_CHINA", "SALES_US" etc.
2, TABLE type. Compare structure for the same table on different databases host. For example: the "SALES" table on database "CHINA" and database "US" etc.
3, ALL type. Compare structure for different tables on different databases hosts, For example: "SALES_CHINA@CHINA", "SALES@US" etc.
With this utility, we find out a lot of table structure and index structure out of sync problems, and get them fixed before application start to use them.
