Comparing tables from two different SQL Developer databases
I am using SQL developer to connect to databases, I am currently participating in replication testing:
Here are the links for source and target:
**Source**
Host Name - n****-s**n.o*s.lab
Port - 1521
Service Name - stgdev
**Target**
Host Name - *pr****1.****b.lab
Port - 1522
Service Name - S******
Can anyone tell me how to write a query to compare tables from the above two databases, the databases are identical. Let's say I want to compare the Account table from both of the above databases ... what is a query. Please advise.
source to share
If you have a db link between two databases, you can use the dbms_comparison package to set up a scheduled comparison. in fact, if you will be doing this on multiple tables often, you should probably learn it.
Or you can always run select * from the @source table minus select @ from the @target table and see the differences, but for large datasets this is not very efficient.
Look in the package dbms_comparison docs link
source to share
I work at Red Gate. We have a tool that compares the table data, allows you to view the differences, and create a deployment script that makes the data identical. Since you don't have a database link that you can use between databases, I think our tool will work for you.
You get a fully functional 14-day trial. You can download the tool here http://www.red-gate.com/products/oracle-development/ .
source to share