My Oracle Support Banner

MVIEW Refresh Fails with ORA-12018 and ORA-997 (Doc ID 465957.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 27-Aug-2013***


Symptoms

You have created a materialized view using on prebuilt table option:

CREATE MATERIALIZED VIEW TEST 
ON PREBUILT TABLE REFRESH FAST ON demand 
AS
SELECT * FROM TEST@DBLINK ;

Materialized view created.

 

When trying to refresh the materialized view it fails with the following errors, this is true for fast and/or complete refreshes:

exec dbms_mview.refresh ('TEST','F');


exec dbms_mview.refresh ('TEST','C');

ERROR at line 1:
ORA-12018: following error encountered during code generation for "USERX"."TEST"
ORA-00997: illegal use of LONG datatype
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2429
ORA-06512: at line 1

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.