Home » RDBMS Server » Networking and Gateways » COMPARE DATABASE CONTENT
COMPARE DATABASE CONTENT [message #168636] Fri, 21 April 2006 07:03 Go to next message
kayarsenal
Messages: 3
Registered: April 2006
Location: Prague
Junior Member

Hi All,
I have two databases ARSENAL and SPURS on different servers.
Arsenal contains schemas A,B,C. Schema A contains table 1,2. B contains 3,4 C contains 5,6. I ve just created same objects in database SPURS. And migrated the data from ARSENAL to SPURS.

Please how could I easily compare the contents using shell script?

Getting the data from ARSENAL and comparing with SPURS. Output would be stored in a file(I know diff should do the trick but Ive been battling that since morning).

I would expect something like this:

Schema.Table Records (On ARSENAL)
A.1 4
A.2 3
ON SPURS
A.1 5(Outputs an error - count doesnt match)
A.2 3
Thanks in advance
Re: COMPARE DATABASE CONTENT [message #171335 is a reply to message #168636] Tue, 09 May 2006 07:52 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Create a database link and do:

SELECT * FROM USER_OBJECTS
MINUS 
SELECT * FROM USER_OBJECTS@db_link;


and...

SELECT * FROM USER_OBJECTS@db_link
MINUS 
SELECT * FROM USER_OBJECTS
Previous Topic: MS SQL-Server not working
Next Topic: ArrayDescriptor - ClassCastException
Goto Forum:
  


Current Time: Fri May 03 03:30:21 CDT 2024