473,797 Members | 3,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Materialized views are not getting refreshed

Hi I have a problem with refreshing of Mviews , I will narrate every
thing step by step:

1.create table a (a number);

2.insert into table a values(&a); (after inserting 2 rows and
commiting)

3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE
NEXT sysdate + 2/1440 as select * from a;

Mview created

4. insert into a values(&a); 9after inserting 2 more rows and
commiting)

5.select * from a;

4 rows selected

6. select * from b;

2 rows selected (BUT HERE IT SHOULD BE 4 ROWS)( EVEN WAITING FOR
10 MIN , NOTHING IS COMING)
WHATS GOING ON..

if i do the same on diffrent server it works, but not here..

then i thought checking some parameters

the parameters i checked with values are :

query_rewrite_e nabled boolean TRUE
query_rewrite_i ntegrity string ENFORCED
i guess both are fine,

now iam not looking to go for fast refreshes and rightnow iam using
" EXEC DBMS_MVIEWS.REF RESH('B')" to refresh it..

Can u please help me out, what Iam doing wrong..

It would be great if u mail me also on my personal mail id

kh************* @rediffmail.com too , Thanks alot in advance,
Prashant Khanna
Jul 19 '05 #1
4 13651
Prashant wrote:
Hi I have a problem with refreshing of Mviews , I will narrate every
thing step by step:

1.create table a (a number);

2.insert into table a values(&a); (after inserting 2 rows and
commiting)

3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE
NEXT sysdate + 2/1440 as select * from a;

Mview created

4. insert into a values(&a); 9after inserting 2 more rows and
commiting)

5.select * from a;

4 rows selected

6. select * from b;

2 rows selected (BUT HERE IT SHOULD BE 4 ROWS)( EVEN WAITING FOR
10 MIN , NOTHING IS COMING)
WHATS GOING ON..

if i do the same on diffrent server it works, but not here..

then i thought checking some parameters

the parameters i checked with values are :

query_rewrite_e nabled boolean TRUE
query_rewrite_i ntegrity string ENFORCED
i guess both are fine,

now iam not looking to go for fast refreshes and rightnow iam using
" EXEC DBMS_MVIEWS.REF RESH('B')" to refresh it..

Can u please help me out, what Iam doing wrong..

It would be great if u mail me also on my personal mail id

kh************* @rediffmail.com too , Thanks alot in advance,
Prashant Khanna


I miss the Generate MV support part....

--
Regards, Frank van Bortel

Jul 19 '05 #2
Hi Frank,
Can u please go in more detail , iam still searching for the solution...than ks!
Frank <fb*****@home.n l> wrote in message news:<bo******* ***@news4.tilbu 1.nb.home.nl>.. .
Prashant wrote:
Hi I have a problem with refreshing of Mviews , I will narrate every
thing step by step:

1.create table a (a number);

2.insert into table a values(&a); (after inserting 2 rows and
commiting)

3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE
NEXT sysdate + 2/1440 as select * from a;

Mview created

4. insert into a values(&a); 9after inserting 2 more rows and
commiting)

5.select * from a;

4 rows selected

6. select * from b;

2 rows selected (BUT HERE IT SHOULD BE 4 ROWS)( EVEN WAITING FOR
10 MIN , NOTHING IS COMING)
WHATS GOING ON..

if i do the same on diffrent server it works, but not here..

then i thought checking some parameters

the parameters i checked with values are :

query_rewrite_e nabled boolean TRUE
query_rewrite_i ntegrity string ENFORCED
i guess both are fine,

now iam not looking to go for fast refreshes and rightnow iam using
" EXEC DBMS_MVIEWS.REF RESH('B')" to refresh it..

Can u please help me out, what Iam doing wrong..

It would be great if u mail me also on my personal mail id

kh************* @rediffmail.com too , Thanks alot in advance,
Prashant Khanna


I miss the Generate MV support part....

Jul 19 '05 #3
Prashant wrote:
Hi Frank,
Can u please go in more detail , iam still searching for the solution...than ks!
Frank <fb*****@home.n l> wrote in message news:<bo******* ***@news4.tilbu 1.nb.home.nl>.. .
Prashant wrote:
Hi I have a problem with refreshing of Mviews , I will narrate every
thing step by step:

1.create table a (a number);

2.insert into table a values(&a); (after inserting 2 rows and
commiting)

3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE
NEXT sysdate + 2/1440 as select * from a;

Mview created

4. insert into a values(&a); 9after inserting 2 more rows and
commiting)

5.select * from a;

4 rows selected

6. select * from b;

2 rows selected (BUT HERE IT SHOULD BE 4 ROWS)( EVEN WAITING FOR
10 MIN , NOTHING IS COMING)
WHATS GOING ON..

if i do the same on diffrent server it works, but not here..

then i thought checking some parameters

the parameters i checked with values are :

query_rewrit e_enabled boolean TRUE
query_rewrit e_integrity string ENFORCED
i guess both are fine,

now iam not looking to go for fast refreshes and rightnow iam using
" EXEC DBMS_MVIEWS.REF RESH('B')" to refresh it..

Can u please help me out, what Iam doing wrong..

It would be great if u mail me also on my personal mail id

kh************* @rediffmail.com too , Thanks alot in advance,
Prashant Khanna


I miss the Generate MV support part....

Forget that remark - you're not using log tables.

Did your scenario, and it works like a charm...
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> create table a(an number);

Table created.

SQL> create materialized view b refresh with rowid
2 start with sysdate next sysdate + 1/1440
3 as (select * from a);
Materialized view created.

SQL> select * from b;
no rows selected

SQL> insert into a values (100);
[Some inserts snipped for brevity]
SQL> alter session set nls_date_format ='YYYY-MM-DD HH24:mi:ss';
Session altered.

SQL> select sysdate from dual;
SYSDATE
-------------------
2003-11-11 21:56:08

SQL> select * from b;
AN
----------
100
101
102

SQL> insert into a values (104);
1 row created.
SQL> commit;
.... Wait a while...
SQL> select * from b;
AN
----------
100
101
102
...nope, not yet
SQL> /

AN
----------
100
101
102
104

SQL> select sysdate from dual;

SYSDATE
-------------------
2003-11-11 21:58:02

Do you have job_queue_proce sses set to a positive integer?

--
Regards, Frank van Bortel

Jul 19 '05 #4
Hey Thanks alot Frank,
It really worked, and for me an addition in my DBA knowledge..:-)
I guess the culprit was job_queue_proce sses as 1st i putted the
nls_date_format and checked it 1ce ..it didn't worked then i putted
the parameter to 3 and it worked ..like a charm...
thanks 1ce again,
Takecare ,
Prashant.
Frank <fb*****@home.n l> wrote in message news:<bo******* ***@news2.tilbu 1.nb.home.nl>.. .
Prashant wrote:
Hi Frank,
Can u please go in more detail , iam still searching for the solution...than ks!
Frank <fb*****@home.n l> wrote in message news:<bo******* ***@news4.tilbu 1.nb.home.nl>.. .
Prashant wrote:

Hi I have a problem with refreshing of Mviews , I will narrate every
thing step by step:

1.create table a (a number);

2.insert into table a values(&a); (after inserting 2 rows and
commiting)

3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE
NEXT sysdate + 2/1440 as select * from a;

Mview created

4. insert into a values(&a); 9after inserting 2 more rows and
commiting)

5.select * from a;

4 rows selected

6. select * from b;

2 rows selected (BUT HERE IT SHOULD BE 4 ROWS)( EVEN WAITING FOR
10 MIN , NOTHING IS COMING)
WHATS GOING ON..

if i do the same on diffrent server it works, but not here..

then i thought checking some parameters

the parameters i checked with values are :

query_rewrit e_enabled boolean TRUE
query_rewrit e_integrity string ENFORCED
i guess both are fine,

now iam not looking to go for fast refreshes and rightnow iam using
" EXEC DBMS_MVIEWS.REF RESH('B')" to refresh it..

Can u please help me out, what Iam doing wrong..

It would be great if u mail me also on my personal mail id

kh************* @rediffmail.com too , Thanks alot in advance,
Prashant Khanna

I miss the Generate MV support part....

Forget that remark - you're not using log tables.

Did your scenario, and it works like a charm...
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> create table a(an number);

Table created.

SQL> create materialized view b refresh with rowid
2 start with sysdate next sysdate + 1/1440
3 as (select * from a);
Materialized view created.

SQL> select * from b;
no rows selected

SQL> insert into a values (100);
[Some inserts snipped for brevity]
SQL> alter session set nls_date_format ='YYYY-MM-DD HH24:mi:ss';
Session altered.

SQL> select sysdate from dual;
SYSDATE
-------------------
2003-11-11 21:56:08

SQL> select * from b;
AN
----------
100
101
102

SQL> insert into a values (104);
1 row created.
SQL> commit;
... Wait a while...
SQL> select * from b;
AN
----------
100
101
102
..nope, not yet
SQL> /

AN
----------
100
101
102
104

SQL> select sysdate from dual;

SYSDATE
-------------------
2003-11-11 21:58:02

Do you have job_queue_proce sses set to a positive integer?

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4229
by: Vincent LIDOU | last post by:
Do not trust values returned by materialized views under SQL Server without frequently checking underlying tables!!! I already posted this message under microsoft.public.sqlserver.server and I'm amazed nobody from Microsoft answered about this problem. By inserting lots of data into our two main tables for about 30 minutes, we can fail our materialized view that performs a count_big on those two tables. Executing (after of course...
6
12299
by: Bruce | last post by:
I want to create a new table based on an existing table, but I don't want the tables to have any enforced relationship. Is this possible without having to do a CREATE TABLE and an INSERT? create table customer_Temp as (select credit_Card_number, personal_id_number from customer) DATA INITIALLY DEFERRED REFRESH deferred; refresh table customer_temp;
7
4210
by: Esteban Kemp | last post by:
PostgreSql support materialized views ??? if not, there is something similar?? Thanks Esteban kemp
4
6867
by: marklawford | last post by:
I'm looking to materialize out a pretty complex query/view to facilitate retrieval of the underlying data for presentation to a screen. Given the table sizes and a few left outer joins the query itself can take minutes to return (and only actually returns a couple of hundred rows). Materialization seemed the most appropriate way to achieve the performance that we require but that's only half the story. We then need to kwwp that...
1
3066
by: rumasinha | last post by:
Hi, I first created a materialized view that was based on the org striped views like po_headers hence the automatic refresh was not happening. After automatic complete refresh, the materialized view was showing null records. Hence I based the materialized view on "_all" tables and then based a view on this materialized view and this view I made org striped. In the materialized view , I was refering to...
4
314
by: Prashant | last post by:
Hi I have a problem with refreshing of Mviews , I will narrate every thing step by step: 1.create table a (a number); 2.insert into table a values(&a); (after inserting 2 rows and commiting) 3. create MATERIALIZED view b REFRESH WITH ROWID START WITH SYSDATE NEXT sysdate + 2/1440 as select * from a;
1
2089
by: Pink Panther | last post by:
Hi All, Sorry this may be a repost as first attempt died on me... I have a set of 50 materialized views that are populated every morning. However 2 of the materialized views contain no records (I know the master does contain records). None of the jobs are broken and all run as scheduled.
3
3152
by: jonceramic | last post by:
Hi All, I need to know the best way to set up a datawarehouse/materialized view for doing statistics/graphs in Access. My crosstabs and unions are getting too complicated to crunch in real time. Should I use a make-table I run after each update? Thanks,
3
3948
by: kewldotnet | last post by:
I have a query thats taking long time to execute. So i have created a Materialized view to refresh it every hour. But when the Materialized view is being refreshed, there is no data in the Materialized view table. I think it truncates the table before every refresh. Is there any way to keep the old data while its being refreshed.?
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.