Home » SQL & PL/SQL » SQL & PL/SQL » Error in materialized view refresh path (Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production)
|
|
Re: Error in materialized view refresh path [message #675424 is a reply to message #675421] |
Thu, 28 March 2019 11:13   |
Solomon Yakobson
Messages: 3305 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
SQL> create table tbl(id number,name varchar2(10),val number);
Table created.
SQL> create materialized view tbl_mv
2 as
3 select * from tbl
4 /
Materialized view created.
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
PL/SQL procedure successfully completed.
SQL> alter table tbl drop column val;
Table altered.
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
BEGIN dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE); END;
*
ERROR at line 1:
ORA-12008: error in materialized view or zonemap refresh path
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2952
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2370
ORA-00947: not enough values
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 85
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 245
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2352
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2908
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3191
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3221
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 15
ORA-06512: at line 1
SQL>
SY.
|
|
|
Re: Error in materialized view refresh path [message #675425 is a reply to message #675424] |
Thu, 28 March 2019 11:28   |
 |
Michel Cadot
Messages: 68758 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Good! I get the exact same lines than OP with your test case and his version (11.2.0.4):
SQL> create table tbl(id number,name varchar2(10),val number);
Table created.
SQL> create materialized view tbl_mv
2 as select * from tbl
3 /
Materialized view created.
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
PL/SQL procedure successfully completed.
SQL> alter table tbl drop column val;
Table altered.
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
BEGIN dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE); END;
*
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2809
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3025
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2994
ORA-06512: at line 1
|
|
|
|
Re: Error in materialized view refresh path [message #675427 is a reply to message #675426] |
Thu, 28 March 2019 15:23   |
 |
Michel Cadot
Messages: 68758 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
It no more exists after the attempt to refresh the view in 11.2:
SQL> create table tbl(id number,name varchar2(10),val number);
Table created.
SQL> create materialized view tbl_mv
2 as select * from tbl
3 /
Materialized view created.
SQL> alter table tbl drop column val;
Table altered.
SQL> select * from dba_dependencies where name in ('TBL','TBL_MV') or referenced_name in ('TBL','TBL_MV');
OWNER NAME TYPE REFERENCED_OWNER
------------------------------ ------------------------------ ------------------ ------------------------------
REFERENCED_NAME REFERENCED_TYPE
---------------------------------------------------------------- ------------------
REFERENCED_LINK_NAME
------------------------------------------------------------------------------------------------------------------------
DEPE
----
MICHEL TBL_MV MATERIALIZED VIEW MICHEL
TBL TABLE
REF
MICHEL TBL_MV MATERIALIZED VIEW MICHEL
TBL_MV TABLE
REF
2 rows selected.
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
BEGIN dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE); END;
*
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2809
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3025
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2994
ORA-06512: at line 1
SQL> select * from dba_dependencies where name in ('TBL','TBL_MV') or referenced_name in ('TBL','TBL_MV');
no rows selected
[Updated on: Thu, 28 March 2019 15:23] Report message to a moderator
|
|
|
|
|
|
Re: Error in materialized view refresh path [message #675443 is a reply to message #675437] |
Fri, 29 March 2019 06:42   |
 |
saipradyumn
Messages: 419 Registered: October 2011 Location: Hyderabad
|
Senior Member |
|
|
Materialized view is working fine.When I pass name of Materialized view to refresh method ts giving the following error:
exec dbms_mview.refresh('MV_XXXX_REC','C',ATOMIC_REFRESH => FALSE)
Error report -
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2809
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3025
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2994
ORA-06512: at line 1
12008. 00000 - "error in materialized view refresh path"
*Cause: Table SNAP$_<mview_name> reads rows from the view
MVIEW$_<mview_name>, which is a view on the master table
(the master may be at a remote site). Any
error in this path will cause this error at refresh time.
For fast refreshes, the table <master_owner>.MLOG$_<master>
is also referenced.
*Action: Examine the other messages on the stack to find the problem.
See if the objects SNAP$_<mview_name>, MVIEW$_<mview_name>,
<mowner>.<master>@<dblink>, <mowner>.MLOG$_<master>@<dblink>
still exist.
Count of the following query is 6
select * from dba_dependencies where name = 'MV_XXXX_REC' and TYPE='MATERIALIZED VIEW';
|
|
|
|
|
|
Re: Error in materialized view refresh path [message #675447 is a reply to message #675443] |
Fri, 29 March 2019 10:48   |
Solomon Yakobson
Messages: 3305 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
saipradyumn wrote on Fri, 29 March 2019 07:42Materialized view is working fine.When I pass name of Materialized view to refresh method ts giving the following error:
Obviously it is working fine. MV is created and has data as it was at last refresh or MV create time. Then some column was dropped in base table. That doesn't affect MV until you try to refresh it. And since MV definition has that dropped column you get not enough values:
SQL> create table tbl(id number,name varchar2(10),val number);
Table created.
SQL> insert into tbl values(1,'ABC',99);
1 row created.
SQL> create materialized view tbl_mv
2 as
3 select * from tbl
4 /
Materialized view created.
SQL> select * from tbl_mv;
ID NAME VAL
---------- ---------- ----------
1 ABC 99
SQL> alter table tbl drop column val;
Table altered.
SQL> select * from tbl_mv;
ID NAME VAL
---------- ---------- ----------
1 ABC 99
SQL> exec dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE)
BEGIN dbms_mview.refresh('TBL_MV','C',ATOMIC_REFRESH => FALSE); END;
*
ERROR at line 1:
ORA-12008: error in materialized view or zonemap refresh path
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2952
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2370
ORA-00947: not enough values
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 85
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 245
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2352
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 2908
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3191
ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line 3221
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 15
ORA-06512: at line 1
SQL> desc tbl
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
NAME VARCHAR2(10)
SQL> desc tbl_mv
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
NAME VARCHAR2(10)
VAL NUMBER
SQL>
As you can see dropping column in base table has no affect on MV. It still has it. That's why we get not enough values.
SY.
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Jun 06 12:19:01 CDT 2025
|