Oracle refresh throws table exception not found

Simple update script:

BEGIN DBMS_SNAPSHOT.REFRESH( LIST => 'SCHEMA_NAME.TABLE_NAME', PUSH_DEFERRED_RPC => TRUE, REFRESH_AFTER_ERRORS => FALSE, PURGE_OPTION => 1, PARALLELISM => 0, ATOMIC_REFRESH => TRUE, NESTED => FALSE); END; 

Oracle claims that:

 ORA-00942: table or view does not exist ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251 ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457 ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2426 ORA-06512: at line 2 00942. 00000 - "table or view does not exist" 

Question: what am I missing?

Note:

  • Updated MV exists
  • If no schema is specified, the result will be the same
+4
source share
2 answers

This is a common case of a view, depending on some other tables or views (which may depend on other data) that have broken dependencies. In this particular case, the view depended on another view, which depended on the table in which the column was missing. Thanx to Frosty Z for clues.

+1
source

I read elsewhere that doing

 ALTER MATERIALIZED VIEW schema_name.table_name COMPILE; 

can solve this problem.

this did not work for me, and I must completely abandon the materialized view.

0
source

Source: https://habr.com/ru/post/1392011/


All Articles