Database DataWarehousing (MOSC)

MOSC Banner

Inconsistent behavior with materialized views

edited Dec 14, 2011 3:09AM in Database DataWarehousing (MOSC) 3 commentsAnswered

I want to create a demonstration of this error:

ORA-12034: materialized view log on "MY_USER"."T" younger than last refresh

I can demonstrate the ORA-12034 error if I paste the following into SQL*Plus: Release 10.2.0.5.0 in a 10g or 9iR2 database:

DROP TABLE t CASCADE CONSTRAINTS;
DROP MATERIALIZED VIEW t_mv
;
CREATE TABLE t
( id NUMBER PRIMARY KEY );
/* Create a MV log on base table to enable fast refresh */
CREATE MATERIALIZED VIEW LOG ON t WITH PRIMARY KEY;

/* Create fast refreshable MV */
CREATE MATERIALIZED VIEW t_mv
REFRESH FAST ON COMMIT
AS
SELECT
* FROM t;
INSERT INTO t VALUES

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center