Q
Problem solve Get help with specific problems with your technologies, process and projects.

How can we check if two tables contain the same content?

We have an environment with several databases. A group of tables is replicated in every database, so they would have to be identical (in design and contents). We would like to know if there is any way (procedure, script, whatever to run at nights) to check if the contents of the tables are the same?

Are you reanalysing periodicaly with dbms_stats? If so you can check metrics like the clustering_factor:

select clustering_factor from dba_indexes where table_name = 'xxx';

Well, there are not many choices other than to query the actual table data, and this will invoke a large-table full-table scan. If you have a numeric column, you can scan the table to find the sum, like this:

select sum(num_col) from tab;

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close