views:

141

answers:

2

Hello! I have been tasked with comparing two oracle schema with a large number of tables to find the structural differences in the schema. Up until know I have used the DB Diff tool in Oracle SQL Developer, and it has worked very well. The issue is that now I need to compare tables in a user that I cannot log into , but I can see it through the other users section in SQL developer. The issue is that whenever I try to use the diff tool to compare those objects to the other schema it does not work. Does anyone have any idea how to do this? It would save me a very large amount of work. I have some basic SQL knowledge if that is whats needed. Thanks.

+2  A: 

If you have been GRANTed permissions in that other schema, issue an

alter session set current_schema = OTHER_SCHEMA_NO_QUOTES_REQUIRED;

the run whatever tool.

Otherwise, it's select * from all_tables where owner = OTHER_USER;, 'select * from all_indexes where ...` etc.

tpdi
I tried doing an alter session, but while it appeared successful, the DB diff yielded the same results, I guess I will just have just do a bunch of where owner = queries and manually diff the results. thanks.
Igman
+3  A: 

Schema Compare for Oracle from Red Gate Software allows you to compare and synchronize the schemas of Oracle databases. It currently supports 9i, 10g and 11g

You can download a free 14-day trial from http://www.red-gate.com/products/Schema_Compare_for_Oracle/index.htm

Tom Harris, Red Gate Software

Tom Harris