Home » SQL & PL/SQL » SQL & PL/SQL » Materialized is getting invalid after refresh (Oracle Database 11g Release 11.2.0.3.0)
Materialized is getting invalid after refresh [message #635741] Wed, 08 April 2015 01:21 Go to next message
saipavan.plsql
Messages: 17
Registered: February 2015
Location: chennai
Junior Member
Hi all,

I have created Materialized view but the problem is
it is getting invalid after 5 min of each refresh and i have tried

alter Materialized view <view_name> compile;

and

EXECUTE IMMEDIATE('alter materialized view SCHEMA.MV_NAME disable query rewrite');

dbms_mview.refresh('<view_name>');

EXECUTE IMMEDIATE('alter materialized view SCHEMA.MV_NAME disable query rewrite');

but of no use can u help me with it.
Re: Materialized is getting invalid after refresh [message #635780 is a reply to message #635741] Wed, 08 April 2015 07:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
How can we reproduce what you report?

You claim to have a problem, yet you do not actually show us what it is.

what is OS name & version?
Re: Materialized is getting invalid after refresh [message #635783 is a reply to message #635780] Wed, 08 April 2015 08:25 Go to previous messageGo to next message
saipavan.plsql
Messages: 17
Registered: February 2015
Location: chennai
Junior Member
i am using Linux , Oracle Database 11g Release 11.2.0.3.0
Re: Materialized is getting invalid after refresh [message #635788 is a reply to message #635783] Wed, 08 April 2015 09:46 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
We need to see how you have created the MV (the SQL) and what the refresh conditions are. As BlackSwan stated, how can we help if you can't see the definition of the MV and it's attributes?

Craig...
Re: Materialized is getting invalid after refresh [message #635809 is a reply to message #635788] Thu, 09 April 2015 04:24 Go to previous message
saipavan.plsql
Messages: 17
Registered: February 2015
Location: chennai
Junior Member
The code goes like this

CREATE MATERIALIZED VIEW code is here

And the refresh query is written in the insert proc after insert statment

dbms_mview.refresh('REPORT_AMORT_AMOUNT_MV');


[EDITED by LF: applied [code] and [spoiler] tags]

[Updated on: Thu, 09 April 2015 04:49] by Moderator

Report message to a moderator

Previous Topic: saving query Output in a single variable
Next Topic: help in writing query
Goto Forum:
  


Current Time: Thu Aug 27 15:37:51 CDT 2026