Mview is in Compilation_Error State After a Refresh or an Alter Statement (Doc ID 1373290.1)

Last updated on FEBRUARY 02, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.

Symptoms



There is an mview defined with a Database link (dblink) pointing to a remote database where the master table is located.

The mview definition is:

create materialized view ONDB_OWNER.MV_TEST REFRESH FORCE ON DEMAND
WITH ROWID as
SELECT DERIVED_PARAMETER FROM MPLUS_OWNER.TESTTBL@MPL_TEST.WORLD;



The database charactersets are:

MVIEW Database:              UTF8

Remote Master Database:    JA16SJIS is a japanese SINGLE byte character set


MVIEW dictionary views output:
 
Select owner,mview_name, compile_state from dba_mviews;

OWNER                  MVIEW_NAME            COMPILE_STATE
ONDB_OWNER     MV_MEDCO    COMPILATION_ERROR

The MVIEW is only marked as VALID when we create it.  However, after a REFRESH or a COMPILE it is marked as COMPILE_STATE -  COMPILATION_ERROR.



Changes

None, this is a new mview.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms