[英]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.