Path: text.usenetserver.com!out03b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail
From: Sashi <smalladi@gmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Error updating materialized view
Date: Mon, 7 Jul 2008 09:30:47 -0700 (PDT)
Organization: http://groups.google.com
Lines: 43
Message-ID: <cb554833-8349-4c58-8523-3771d466d451@m3g2000hsc.googlegroups.com>
References: <c0ce9e28-0eb4-437e-ae18-2b6dccffc891@m3g2000hsc.googlegroups.com>
NNTP-Posting-Host: 192.193.216.155
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1215448247 9076 127.0.0.1 (7 Jul 2008 16:30:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 7 Jul 2008 16:30:47 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m3g2000hsc.googlegroups.com; posting-host=192.193.216.155; 
 posting-account=Q1WAhQoAAACWOos8MRDldkPJBDEdnT0X
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.15) 
 Gecko/20080623 Firefox/2.0.0.15,gzip(gfe),gzip(gfe)
Xref: usenetserver.com comp.databases.oracle.misc:253157
X-Received-Date: Mon, 07 Jul 2008 12:30:48 EDT (text.usenetserver.com)

On Jul 7, 10:11 am, Sashi <small...@gmail.com> wrote:
> Hi all,
> I'm trying to update a materialized view:
> EXECUTE DBMS_MVIEW.REFRESH('NED_PRODUCT_CARD_MV', 'C');
>
> This commands hangs for a very long time (no idea if it'll ever
> complete). Hm, reminds me of the halting problem.
>
> When I terminate it with a Ctrl-C, I get the error message:
> ERROR at line 1:
> ORA-12008: error in materialized view refresh path
> ORA-01013: user requested cancel of current operation
> ORA-06512: at "SYS.DBMS_SNAPSHOT", line 820
> ORA-06512: at "SYS.DBMS_SNAPSHOT", line 877
> ORA-06512: at "SYS.DBMS_SNAPSHOT", line 858
> ORA-06512: at line 1
>
> My version:
> $  sqlplus -version
>
> SQL*Plus: Release 9.2.0.6.0 - Production
>
> We update this MV regularly (every few weeks) and this is the first
> time that I'm seeing this.
>
> Any pointers are appreciated.
>
> Thanks,
> Sashi

To answer my own question, this is quite another problem:
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01476: divisor is equal to zero
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 820
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 877
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 858
ORA-06512: at line 1

I don't know why it hanged for so long on earlier tries before
reporting this issue.
Updated the fields to take care of the divide by zero and then it
worked fine.
