473,785 Members | 2,419 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 13647
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
4228
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
4209
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
3065
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
3150
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
3945
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
9647
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
9489
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
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
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...
0
8988
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...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.