Question

Check last refresh date of Oracle Materialized Views

  • 11 July 2018
  • 2 replies
  • 237 views

Hello everyone

Is it possible to get FME to check the last refresh date of a materialized view in Oracle, so we could then get it to send out notification if any haven't been refreshed in a certain period?


2 replies

Userlevel 4

Try something like the following in an SQLExecutor or SQLCreator:

SELECT 
  OWNER, 
  MVIEW_NAME, 
  to_char(last_refresh_date, 'yyyymmddhh24miss') LAST_REFRESH_DATE
FROM all_mviews
WHERE owner = 'MY_OWNER_NAME'
AND mview_name = 'MY_MATERIALIZED_VIEW_NAME'

Expose the attributes

  • OWNER
  • MVIEW_NAME
  • LAST_REFRESH_DATE

The output attribute "LAST_REFRESH_DATE" will contain a timestamp formatted for use in FME with e.g. the DateTimeConverter etc.

Excellent thanks @david_r - will have a look at this, see what we can do.

Reply