DBMS_Snapshot.refresh not working on 11g , materialized view error DBMS_Snapshot.refresh not working on 11g , materialized view error oracle oracle

DBMS_Snapshot.refresh not working on 11g , materialized view error


OK, there may be many reasons for this.

  1. You didn't recreate the MV yet in 11g. You can't refresh an MV to create it.

  2. You didn't recreate a synonym (public or private) to the schema where the MV is located.

  3. You didn't recreate grants to the MV in another schema, so create them.

You might try DBMS_MVIEW instead of DBMS_SNAPSHOT.

exec dbms_mview.refresh('Table1');


The error message suggests that it is looking for "Table1" in a case sensitive manner. Try passing in 'TABLE1' instead.


My case was little different. The DBMS_MVIEW.REFRESH('ABC.XYZ') call happens from a oracle stored procedure (SCHEMA1.PROC1). I was calling the SP as a different user (UserA). I have given all permissions to the user, but to no awail. Apparently, oracle dont seem to care about the permission the user has, it looks for the permissions for the package owner.. this is very odd and contrary to what I ready everywhere.. but it did work

didnt work:

GRANT ALTER ANY MATERIALIZED VIEW TO UserA;

GRANT SELECT ON ABC.MLOG$_XYZ TO UserA;

Worked:

GRANT ALTER ANY MATERIALIZED VIEW TO SCHEMA1;

GRANT SELECT ON ABC.MLOG$_XYZ TO UserA, SCHEMA1;