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!

Creating a MV with REFRESH ON COMMIT

DavidNilsMay 12 2006 — edited May 12 2006
Hi,

I can't seem to get the following Materialized View to compile:

REATE MATERIALIZED VIEW MV_MyMatView
REFRESH ON COMMIT
AS
SELECT COL_ValidFrom, COL_AnotherCol
FROM MyTable

I get error ORA-12054. Originally I had a MAX()-thing in my select and when I searched the web I found this article ( http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10736/basicmv.htm#i1007028 ) And it looked to be the solution. However I did everything it said and I still could not compile (same error). So I tried to remove the MAX() but i STILL could not compile. Any Ideas on what to do?

The MV-Log was created like this:
CREATE MATERIALIZED VIEW LOG ON MYSCHEMA.MyTable
WITH PRIMARY KEY, ROWID
INCLUDING NEW VALUES

Could it be an issue that both my referenced columns are part of the Primary Key? I am the owner of the table. I also tried this: GRANT ON COMMIT REFRESH TO "MYSCHEMA"; but it was not recognized.

Basically i cant create ANY materialized view with REFRESH ON COMMIT. Why, oh why?

Thanks!

Message was edited by:
DavidNils
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2006
Added on May 12 2006
3 comments
278 views