Comparing two Oracle schemas, other users

I was instructed to compare two oracle schemes with a large number of tables to find structural differences in the scheme. Until I know that I used the DB Diff tool in Oracle SQL Developer, it worked very well. The problem is that now I need to compare the tables with a user with whom I cannot log in, but I see this through the section of other users in the SQL developer. The problem is that whenever I try to use the diff tool to compare these objects with another circuit, this does not work. Does anyone know how to do this? This will save me a lot of work. I have basic knowledge of SQL, if that's what I need. Thank.

+3
source share
2 answers

If you got GRANTed permissions in this other scheme, do

alter session set current_schema = OTHER_SCHEMA_NO_QUOTES_REQUIRED;

run any tool.

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

+2
source

Just returning this question with the correct answer.

If you can force your database administrator to provide you with a proxy server, you can do the following without knowing the password of the final scheme:

ALTER USER {use you do not have pw to - lets call it ENDSCHEMA} GRANT CONNECT THROUGH {user you have pw for - lets call it YOURSCHEMA};

Then you create a connection in SQL Developer, where:

username: YOURSCHEMA[ENDSCHEMA] 
password: YOURSCHEMA password

Then you can continue and execute Database Diff on both schemes and never knowing the password for ENDSCHEMA.

0
source

Source: https://habr.com/ru/post/1749311/


All Articles