比较两个Oracle架构,其他用户

发布于 2024-09-04 19:56:11 字数 247 浏览 4 评论 0原文

我的任务是将两个 Oracle 模式与大量表进行比较,以找出模式中的结构差异。到目前为止,我已经使用了Oracle SQL Developer 中的DB Diff 工具,并且效果非常好。问题是,现在我需要比较我无法登录的用户中的表,但我可以通过 SQL Developer 中的其他用户部分看到它。问题是,每当我尝试使用 diff 工具将这些对象与其他模式进行比较时,它都不起作用。有谁知道如何做到这一点?这将为我节省大量的工作。如果需要的话,我有一些基本的 SQL 知识。谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

远昼 2024-09-11 19:56:11

如果您已在其他模式中获得授予权限,请发出

alter session set current_schema = OTHER_SCHEMA_NO_QUOTES_REQUIRED;

运行任何工具。

否则,它是 select * from all_tables whereowner = OTHER_USER;、'select * from all_indexes where ...` 等。

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.

拿命拼未来 2024-09-11 19:56:11

只是用正确的答案来重温这个问题。

如果您可以让 DBA 授予您代理权,您可以在不知道最终模式的密码的情况下执行以下操作:

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};

然后您在 SQL Developer 中创建一个连接,其中:

username: YOURSCHEMA[ENDSCHEMA] 
password: YOURSCHEMA password

然后您可以继续在两个模式上执行数据库比较,而无需知道ENDSCHEMA 的密码。

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.

凉世弥音 2024-09-11 19:56:11

首先,您必须启动

ALTER SESSION SET CURRENT_SCHEMA = SCHEMA;

但在差异工具的第一个屏幕中,您必须选择 DDL 比较选项 - 架构 - “管理”(不是合并)

(我有 Sql开发人员使用意大利语界面,所以我翻译了选项,名称可能有点不同)

它对我有用

FIRST You have to launch

ALTER SESSION SET CURRENT_SCHEMA = SCHEMA;

BUT ALSO IN THE FIRST SCREEN OF DIFFERENCES TOOL YOU HAVE TO CHOOSE FOR DDL COMPARISON OPTIONS - SCHEMA - "MANAGE" (NOT CONSOLIDATE)

(I have Sql Developer with italian interface, so I translated the options, the names could be a little different)

It works for me

银河中√捞星星 2024-09-11 19:56:11

使用 toad for oracle 轻松比较两个或多个模式中的所有内容,如图所示

步骤 1:
来自蟾蜍菜单数据库 => 比较 => 架构

步骤 2:将出现比较窗口,添加要比较的架构(默认连接的架构将是上面的架构),然后单击下一步,
输入图片此处描述

步骤 3:选择要在两个架构中比较的对象,然后运行

​​在此处输入图像描述

Easily compare every things in two or more schemas using toad for oracle as in this pics

Step 1:
From Toad Menu Database => Compare => Schemas

Step 2: compare window will appear to add schemas you want to compare (by default connected schema will be the one above) then click next,
enter image description here

Step 3: select objects you want to compare in both schemas then run

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文