简体   繁体   English

我们如何在oracle中找到相同数据库实例的两个模式之间的对象差异

[英]How we can find difference in objects between two schemas of same database instance in oracle

is there any query which we can use to find the objects which exist in say schema A, but not exist in schema B? 是否有任何查询可用于查找存在于模式A中但不存在于模式B中的对象?

here both schemas belongs to same database instance 这里两个模式都属于同一个数据库实例

Select object_name from dba_objects where owner = schemaA
Minus
Select object_name from dba_objects where owner = schemaB

A bit more precise query (considering also object type) is 更精确的查询(还考虑对象类型)是

select OBJECT_TYPE, OBJECT_NAME from dba_objects where owner = 'SchemaA'
minus
select OBJECT_TYPE, OBJECT_NAME from dba_objects where owner = 'SchemaB';

If you ignore object type and you have table X in one schema and package X in other - you will see no difference. 如果你忽略的对象类型以及具有表X在一个模式和包X其他-你会看到没有什么区别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们如何在 oracle sql 中使用子查询找到两个表之间的差异 - How can we find difference between two tables using subquery in oracle sql 如何在Oracle中找到两个日期时间之间的差异 - How to find difference between two datetimes in Oracle 如何在oracle中找到两个表之间的区别? - how to find the difference between two tables in oracle? 我可以在 SQL Server 数据库实例和 Oracle 中使用多少个架构(限制)? - How many schemas (Limit) can I use in an instance of a SQL Server database and in Oracle? Oracle SQL - 如何找到两个日期变量之间的差异 - Oracle SQL - How to find the difference between two date variables 所有权链在同一数据库中的两个模式之间不起作用 - Ownership Chaining not working between two schemas in the same database 查找两个日期之间的差异Oracle SQL - Find difference between two dates Oracle SQL 如何找到同一列中两个日期之间的差异? - How to find the difference between two dates in same column? 查找同一表中两个字段之间的差异 - Find the difference between two fields in the same table 如何在Oracle数据库11g中的同一用户下创建新架构? 还是用户只能制作一个架构? - How to create new schemas under same user in oracle database 11g? Or can an user make only one schema?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM