开发者

Comparing two Oracle schema, other users

开发者 https://www.devze.com 2023-01-03 10:24 出处:网络
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,

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 ver开发者_JS百科y 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.


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.


Just reviving this question with a correct answer.

If you can get your DBA to grant you proxy through you can do the following without knowing the password of the end schema:

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 proceed and do a Database Diff on both schemas and never knowing the password for ENDSCHEMA.

0

精彩评论

暂无评论...
验证码 换一张
取 消