Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table Comparison - Migration project

user9229402Oct 15 2013 — edited Dec 5 2013

Hi All,

I have to compare two databases(table to table). Data comparision. Please suggest best option.

i tried third party tools like DB solo, data examiner - It needs manual work(when table does not have any key).

i tried dbms comparision tool - i am not much aware of it. and it requires sysdba access. so it didnt worked out for me.

Finally, i decided to write a procedure.

My plan,

1. i take all columns using listagg function and use to get all records from both tables. and convert all the data to comma seperated lists.

2. by use of sys ref cursor, i do comma_to_table. then both data matches column by column No discrepancy else column doesnt match i'll display it.

Result:

i need to display discrepancy columns

Issues: the above approach wont work when data contains special characters, huge varchars, null handling,..

Please suggest better approach.. Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2014
Added on Oct 15 2013
12 comments
1,380 views