Define what is identical. Is it schema, data or both? If schema, is it only tables or all elements including functions/procedures/views etc.
If you would use jdbc, then start with schema revealing functions and compare and contrast the objects one by one. Then repeat the same for the data inside the tables.
You can take advantage of the OpenSource projects to read the schema details.