oracle 如何获取oracle中所有物化视图的列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12705306/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:31:27  来源:igfitidea点击:

How to get list of all materialized views in oracle

oracle

提问by Software Sainath

How to get list of all Materialized Views.?

如何获取所有物化视图的列表。?

回答by diederikh

Try this:

尝试这个:

SELECT *
FROM  all_snapshots;

Instead of all_snapshotsyou can also use the all_mviewsview.

all_snapshots您也可以使用all_mviews视图代替。

回答by Petr Pribyl

select * from all_mviews;

or

或者

select * from dba_mviews;

回答by Hongtao

I never use all_snapshots before.

我以前从未使用过 all_snapshots。

Here is another way to do:

这是另一种方法:

select * from all_objects where OBJECT_TYPE='MATERIALIZED VIEW';

回答by miracle173

Actually ALL_MVIEWS and ALL_SNAPHOTS displays only the views the user has granted access on. To see all views in a database you must query DBA_MVIEWS or DBA_SNAPHOTS. You need special privileges or roles to query this view like the system privilege SELECT ANY DICTIONARY or the role SELECT_CATALOG_ROLE. A similar statement holds for other ALL_ and DBA_ views.

实际上 ALL_MVIEWS 和 ALL_SNAPHOTS 仅显示用户已授予访问权限的视图。要查看数据库中的所有视图,您必须查询 DBA_MVIEWS 或 DBA_SNAPHOTS。您需要特殊权限或角色来查询此视图,例如系统权限 SELECT ANY DICTIONARY 或角色 SELECT_CATALOG_ROLE。类似的声明适用于其他 ALL_ 和 DBA_ 视图。