DBMS_METADATA GENERATES WRONG SYNTAX FOR MATERIALIZED VIEW CREATION (Doc ID 1077800.1)

Last updated on MAY 03, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.7 to 11.2.0.1 - Release: 11.1 to 11.2
Information in this document applies to any platform.

Symptoms


The script generated by dbms_metadata for a materialized view includes never refresh on demand syntax:

The generated script:
 
CREATE MATERIALIZED VIEW "SCOTT"."MV" ("COL1", "COL2")
ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "TOOLS"
BUILD IMMEDIATE
USING INDEX
NEVER REFRESH ON DEMAND
USING DEFAULT LOCAL ROLLBACK SEGMENT
USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
AS select * from t;    


fails with ORA-00905: missing keyword

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