SQL Language (MOSC)

MOSC Banner

To Create a Materialized View using database link

edited Oct 18, 2012 11:44PM in SQL Language (MOSC) 6 commentsAnswered
Hello,

             I am trying to create a materialized view using a database link and I would like the materialized view to be updated en 5 minutes of 5.

             The code is:

CREATE MATERIALIZED VIEW MVIEW1
BUILD IMMEDIATE USING INDEX REFRESH complete ON DEMAND
start with sysdate
next sysdate + 5/1440
USING DEFAULT LOCAL ROLLBACK SEGMENT
using enforced constraints
ENABLE QUERY REWRITE AS
SELECT SE.NR1,SE.NR2,SS.NM
FROM ADM.tab1@db2ROB SE,
ADM.tab2@db2ROB SS
WHERE SE.CD_E = ... AND
SE.CD_P = ... AND
SE.CD_SIT = SS.CD_SIT AND
SS.CD_SIT NOT IN (..,..);

When I execute this code, it appears error ORA-01031, but I have grant to create materialized view.

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