Oracle 视图 DBA_MVIEW_REFRESH_TIMES 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_MVIEW_REFRESH_TIMES用来查询分布式复制环境下物化视图的最新刷新时间。它存储着每次物化视图刷新及刷新时间改变的记录。通过该视图,用户可以判断他所订阅的物化视图的同步时间是否正确,是否与原表保持一致,以免出现延迟或缺少数据的情况。

使用方法:

1.查询物化视图某个具体刷新时间:

SELECT mview_name,last_refresh_type,last_refresh_date
FROM dba_mview_refresh_times
WHERE mview_name=”;

2.查询某个表(或某个库)所有物化视图的最后一次刷新时间:

SELECT mview_name,last_refresh_type,last_refresh_date
FROM dba_mview_refresh_times
WHERE owner=”;

or

SELECT mview_name,last_refresh_type,last_refresh_date
FROM dba_mview_refresh_times
WHERE master IN
(SELECT mview_name from dba_mviews WHERE owner=”);

3.检查某个库所有分布式复制物化视图的刷新是否正常:

SELECT mview_name,last_refresh_type,last_refresh_date
FROM dba_mview_refresh_times
WHERE owner=”
AND last_refresh_date

官方英文解释

DBA_MVIEW_REFRESH_TIMES describes refresh times of all materialized views in the database. Its columns are the same as those in ALL_MVIEW_REFRESH_TIMES.

See Also:

“ALL_MVIEW_REFRESH_TIMES”


数据运维技术 » Oracle 视图 DBA_MVIEW_REFRESH_TIMES 官方解释,作用,如何使用详细说明