1

Two oracle database like DatabaseA and DatabaseB. Both are mirror database. Each database has 20 tables. DatabaseA is pointing to old approach Spring batch and It is same as production. Spring batch was modified for design problem. New Spring batch application is pointing to DatabaseB.

if I ran the same file both spring batch approaches, Both database should have same entries in table.

I need to compare all the table values are same in both approaches.

Is there any way to compare? Any tool to achieve this.?

vigneshwaran m
  • 351
  • 2
  • 12

1 Answers1

0

20 tables are not much, you can write a procedure for that case. If there are actually two databases, you must first set up a DB link between the databases.

to compare you can use a minus operator

select *
from(
      ( select * from tab1
         minus
        select * from tab2
      )
      union all
      ( select * from tab2
         minus
        select * from tab1
      )
)
hotfix
  • 3,376
  • 20
  • 36
  • I don't have privileges to create Link. Could you provide any other possible way.? – vigneshwaran m Mar 13 '20 at 12:10
  • @vigneshwaranm you can ask a dba to create one, I don't see any security concerns why i should not create one if you need to comlet that task. otherwise you can do a schema export on one database and import the schema under a second user on the other database – hotfix Mar 13 '20 at 12:52