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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Materialized View, ORA-12008: error in materialized view refresh path

crupperJan 6 2009 — edited Jan 7 2009
I want to refresh a materialized view, but I get an ORA-12008 error.
Does anybody have an idea? I do not find any errors in my refresh statement.
CREATE MATERIALIZED VIEW scott.dummy_mv
  TABLESPACE test
  BUILD IMMEDIATE
  USING INDEX TABLESPACE idx_test
  REFRESH 
     START WITH sysdate 
     NEXT ROUND(SYSDATE)+5/24		
     WITH PRIMARY KEY
  ENABLE QUERY REWRITE
  AS
  SELECT KM.ID ID
          ,KM.USERNAME USERNAME
	  ,KM.ABTID ABTID	
  FROM my_table KM
/

scott@orcl>desc dummy_mv
 Name                                      Null?    Typ
 ----------------------------------------- -------- ----------------------------
 ID                                        NOT NULL NUMBER(4)
 USERNAME                                  NOT NULL VARCHAR2(30)
 ABTID                                     NOT NULL NUMBER(4)

scott@orcl>


BEGIN 
  SYS.DBMS_JOB.REMOVE(6579);
COMMIT;
END;
/

DECLARE
  X NUMBER;
BEGIN
  SYS.DBMS_JOB.SUBMIT
  ( job       => X 
   ,what      => 'dbms_refresh.refresh(''"scott"."dummy_mv"'');'
   ,next_date => to_date('07.01.2009 05:00:00','dd/mm/yyyy hh24:mi:ss')
   ,interval  => 'ROUND(SYSDATE)+5/24              '
   ,no_parse  => FALSE
  );
  SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/

scott@orcl>exec dbms_refresh.refresh('dummy_mv');
BEGIN dbms_refresh.refresh('dummy_mv'); END;

*
FEHLER in Zeile 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 820
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 877
ORA-06512: in "SYS.DBMS_IREFRESH", Zeile 683
ORA-06512: in "SYS.DBMS_REFRESH", Zeile 195
ORA-06512: in Zeile 1

scott@orcl>
This post has been answered by Randolf Geist on Jan 6 2009
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 4 2009
Added on Jan 6 2009
6 comments
4,153 views