Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I'm getting "cannot set the ON COMMIT refresh attribute for the materialized view" when I try to cre

2750813Sep 12 2014 — edited Sep 12 2014

Experts,

I'm trying to create a FAST refreshable ON COMMIT MV (xyz) using a table (circuit) and fast refreshable on-commit MV (abc) but getting an Error:

SQL Error: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view

12054. 00000 -  "cannot set the ON COMMIT refresh attribute for the materialized view"

*Cause:    The materialized view did not satisfy conditions for refresh at

           commit time.

*Action:   Specify only valid options.

1] MV abc
===============MV abc defined as below==================

CREATE MATERIALIZED view abc_MV

BUILD immediate

REFRESH FAST ON COMMIT using trusted constraints

WITH ROWID AS SELECT n.*,

          n.rowid noderowid

     from node n

where n.nodetype in ( 1610000069,1610007267);


-- Above works OK and MV log on table node gets created successfully

=====================================================

2] Table Circuit

======================================================

CREATE MATERIALIZED VIEW LOG ON Cramer.Circuit WITH SEQUENCE,ROWID( ) -- all columns ofcircut table in brackets

INCLUDING NEW VALUES;

-- Above works OK and MV log on table circuit gets created successfully

======================================================



3] Trying to create MV xyz

======================================================

CREATE MATERIALIZED VIEW LOG ON cramer.abc_MV WITH SEQUENCE,ROWID ( ) -- all columns of abc_MV in brackets

INCLUDING NEW VALUES;

-- Above works OK and MV log on MV abc gets created successfully

-- Problematic Step below

CREATE MATERIALIZED VIEW xyz_MV

BUILD IMMEDIATE

REFRESH FAST ON COMMIT using trusted constraints

AS

SELECT c.*,c.rowid circuit_rowid ,n.rowid tr_rowid

from circuit c, abc_mv n

where circuit2startnode=n.nodeid

and c.rpplanId = n.rpplanId;
==========================================================

Any clues to how to resolve this and make fast refreshable ON Commit MV xyz

Thanks in advance.

This post has been answered by 2750813 on Sep 12 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2014
Added on Sep 12 2014
7 comments
1,844 views