Very long materialized view refresh when using self-referencing table
hi,
I have the following query, that takes 15 sec. to execute. When building a materialized view for it, the refreshing process doesn't stop for hours. The result of the query are about 500 rows and the tables contain not more than some 1000 rows, so it's a really simple query.
SELECT a.A,
b.B,
c.C
FROM (SELECT *
FROM (SELECT a
FROM TableA)) a,
(SELECT b
FROM TableA
WHERE type = 3) b,
(SELECT c
FROM TableA) c
WHERE TRIM (a.x) = TRIM (b.y) AND b.z = c.w;I think it has something to do with the fact, that the same table is used 3 times in the query. When I look in the trace I see that the following statement is executed:
INSERT /*+ BYPASS_RECURSIVE_CHECK */
INTO DM.Test_MV
SELECT ...What is the + BYPASS_RECURSIVE_CHECK / hint doing? Can I deactivate it somehow?
And why is there any difference between the query execution and the query execution when refreshing the mat view?
Thanks for your help!
5 digit version no? lots of bugs with mviews out there.
theres a specific note (not a bug) on support 1115148.1 that references that hint though, so try dropping and recreating the view before refreshing.
Similar Messages
-
Materialized view refresh using connected user db links
I have a general question. I have a materialized view that more or less joins tables from 2 databases.
For example I have a table X in database A, and a table Y in database B. I create the materialized view in the schema owning table X in database A. Tables A & B from both database are in the same schema with a synchronized password. My materialized view is created to join tables A & B using connected user DB links, and everything works when I create the view, however, it appears that the refresh is failing. I suspect this is because of the connected user link and there is no "logged" in user when the refresh occurs.
Does anyone know if it is possible to create a materialized view between 2 tables in different databases to refresh using a connected user DB link?
Thanks.sybrandb
Why does it not make sense to have materialized views accross databases?
If a materialized view is essentially a remote copy, then wouldn't that imply accross databases? The only thing I did was to take it a step further and join it with a local table in the owning database.
About not being right about not having a connected user., that may be right, but I have a thought/question..... I equated this as using connected user links in jobs scheduled via dbms_job or dbms_scheduler, as when this runs there is no user connected to the database to provide remote credentials for the link... Essentially this seems to be like a cron job that fires on some schedule (whether a user is connected or not), it would seem to me that it might need to have credentials defined in order to be able to connect to the remote database.
Thanks -
Materialized view refresh is very slow in production
Hi,
I am using Oracle 10.2.0.4.0 version and facing problem in Materialized view refresh in production.
There is a set of Materialized views (15 Mviews) are refreshed through refresh group in production every week or adhoc basis. And for refreshing it is taking 5hrs. I have refreshed the same set of Materialized views multiple times in development environment through refresh group but it got refreshed within 3min. The structure of materialized base tables, type of materialized view refresh, materialized definition and volume of base tables are same between development and production. The production disk space also larger than development. But I am not sure why in production the refresh is very slow compare to development. As this is very critical can some one help on this?
Thanks is advance.
- Gopinath.Is it fast refresh Mviews? If yes, then check size of materialized view logs. Also check is any other mviews registered on those tables and not refreshing.
select log_owner, master, log_table, REFRESH_method, version,
owner, name as ragistered_snapshot, snapshot_site, current_snapshots last_refresh_time, sl.snapshot_id
from dba_snapshot_logs sl,
dba_registered_snapshots rs
where sl.snapshot_id = rs.snapshot_id (+)
order by 1,2,3
; -
Hi experts pls help me with this materialized view refresh time!!!
Hi Expeerts ,
Please clarify my doubt about this materialized view code
[\n]
CREATE MATERIALIZED VIEW SCHEMANAME.products_mv
REFRESH WITH ROWID
AS SELECT * from VIEW_TABLE@DATAOPPB;
[n]
Here i am creating a materialized view named products_mv of the view_table present in the remote server.Can anyone tell me when will my table product_mv will get refreshed if i follow this code.As what i read from the books is that the refresh period is implicit and is carried out by the database implicitly.so can u tell me suppose i insert 2 new records into my view_table when will this record get updated into my product_mv table.
I cant use primary key approach so this is the approach i am following .Kindly help me in understanding when will refresh of records occur in the materialized view product_mv...Pls help
regards
debashisHi Justin ,
Yes, my database can reasonably schedule other jobs too .Its not an issue.
Actually what i meant "fine in all aspects" is that will the matrerialized view will get refreshed w.r.t the documetum_v table present in my remote server.This is all i need to refresh my materialized view .
I queries the DBA_JOBS table .I could see the following result i have pasted below:-
[\n]
NLS_ENV
MISC_ENV INSTANCE
dbms_refresh.refresh('"WORKFLOW"."PRODUCTS_MV2"');
JOB LOG_USER PRIV_USER
SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE
NEXT_SEC TOTAL_TIME B
INTERVAL
FAILURES
WHAT
[n]
here WORKFLOW"."PRODUCTS_MV2 is the materialized view i have created.So can u tell me that whether we can predict our refresh part is functioning fine from this data.If so how?
Actually i am asking u in details as i dont have much exposure to materialized view .I am using it for the very first time.
Regds
debashis -
Need help on tuning materialized view refresh
Hi All,
I am working on materialized view refresh tuning.Initially it was complete refresh and used to take more than 90 mins to complete.
I changed it to fast refresh now it is completing fast. Now i have partitioned the base tables gl_balances and gl_code_combinations of column code_combination_id and created a local index on column code_combination_id then i am trying to partition the materialized on the same column to take advantage of partition change tracking.
Size of gl_balances base tables is 40Gb and all others tables sizes are small. In where clause there all the 4 tables are mapped. If i will create the partition only on code_combination_id will i the materialized will become the candidate for partition change tracking. As i know it will be applicable for PCT. I need expert advice on this.
While doing a fast refresh. the refresh takes less time. when there is a change in gl_balances , gl_code_combinations or gl_periods it completes in 20-30 mins. When there is a change in gl_set_of_books tables. It creates a problem here.DEL query takes more than 48 hours to complete.
CREATE MATERIALIZED VIEW apps.BAL_PART
REFRESH FAST ON DEMAND
ENABLE QUERY REWRITE as
SELECT GL.GL_CODE_COMBINATIONS21.ROWID C1,GL.GL_BALANCES21.ROWID C2, GL.GL_SETS_OF_BOOKS.ROWID C3,
GL.GL_PERIOD.ROWID C4,
"GL"."GL_BALANCES21"."ACTUAL_FLAG" ,
"GL"."GL_BALANCES21"."CURRENCY_CODE" ,
"GL"."GL_BALANCES21"."PERIOD_NUM" ,
"GL"."GL_BALANCES21"."PERIOD_YEAR" ,
"GL"."GL_BALANCES21"."SET_OF_BOOKS_ID" "SOB_ID",
"GL"."GL_CODE_COMBINATIONS21"."CODE_COMBINATION_ID" "CCID",
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT1" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT10" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT11" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT12" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT13" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT14" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT2" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT3" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT4" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT5" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT6" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT7" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT8" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT9" ,
"GL"."GL_PERIODS"."PERIOD_NAME" ,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal_Cr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal_Cr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) Open_Bal_Dr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Close_Bal_Dr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) -
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal,
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Period_Cr,
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Period_Dr
FROM GL.GL_CODE_COMBINATIONS21,
GL.GL_BALANCES21,
GL.GL_SETS_OF_BOOKS,
GL.GL_PERIODS
WHERE GL.GL_BALANCES21.CODE_COMBINATION_ID =GL.GL_CODE_COMBINATIONS21.CODE_COMBINATION_ID
AND GL.GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID = GL.GL_BALANCES21.SET_OF_BOOKS_ID
AND GL.GL_PERIODS.PERIOD_NUM = GL.GL_BALANCES21.PERIOD_NUM
AND GL.GL_PERIODS.PERIOD_YEAR = GL.GL_BALANCES21.PERIOD_YEAR
AND GL.GL_PERIODS.PERIOD_TYPE = GL.GL_BALANCES21.PERIOD_TYPE
AND GL.GL_PERIODS.PERIOD_NAME = GL.GL_BALANCES21.PERIOD_NAME
AND GL.GL_PERIODS.PERIOD_SET_NAME = GL.GL_SETS_OF_BOOKS.PERIOD_SET_NAME
and gl.GL_CODE_COMBINATIONS21.summary_flag != 'Y'TRACE 1046 del statement
DELETE FROM "APPS"."apps.BAL_PART" SNA$
WHERE "C3" IN (SELECT /*+ NO_MERGE */ * FROM (SELECT
CHARTOROWID("MAS$"."M_ROW$$") RID$ FROM "GL"."MLOG$_GL_SETS_OF_BOOKS"
"MAS$" WHERE "MAS$".SNAPTIME$$ > :B_ST1 ) AS OF SNAPSHOT(:B_SCN) MAS$)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 17759.00 171782.99 159422121 1267371 2564144739 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 17759.00 171782.99 159422121 1267371 2564144739 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 175 (APPS) (recursive depth: 1)
Rows Row Source Operation
0 DELETE apps.BAL_PART (cr=0 pr=0 pw=0 time=0 us)
193128740 NESTED LOOPS (cr=592437 pr=592422 pw=0 time=945244160 us cost=339302 size=168 card=1)
3 SORT UNIQUE (cr=7 pr=0 pw=0 time=15832 us cost=2 size=138 card=1)
24 TABLE ACCESS FULL MLOG$_GL_SETS_OF_BOOKS (cr=7 pr=0 pw=0 time=19 us cost=2 size=138 card=1)
193128740 INDEX RANGE SCAN C3BOOKS (cr=592430 pr=592422 pw=0 time=789499200 us cost=339299 size=3318314250 card=110610475)(object id 2114736)
error during execute of EXPLAIN PLAN statement
ORA-08187: snapshot expression not allowed here
parse error offset: 314
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 159520897 2.12 144415.96
latch: cache buffers chains 134 0.06 0.68
latch: undo global data 33 0.02 0.15
latch: object queue header operation 521 0.02 0.53
log file switch (private strand flush incomplete)
532 0.31 28.26
resmgr:cpu quantum 155 1.40 13.49
resmgr:internal state change 25 0.11 2.21
latch free 10 0.00 0.00
latch: cache buffers lru chain 4 0.00 0.00
rdbms ipc reply 489 0.02 0.54
reliable message 587 0.00 0.56
latch: row cache objects 3 0.00 0.00
********************************************************************************GL_SETS_OF_BOOKS has only 6 rows. I know there is complete refresh as a option which will again take more than 90 mins.
I want to do the fast refresh. Tables rows details below.
SQL> select count(*) from gl.gl_code_combinations21;
COUNT(*)
3075255
SQL> select count(*) from gl.GL_PERIODS;
COUNT(*)
1160
SQL> select count(*) from gl.gl_balances21;
COUNT(*)
477613527
SQL> select count(*) from gl.gl_sets_of_books;
COUNT(*)
6gl_sets_of_books has less rows. Whenever there is a change then it mapped to huge rows hence during materialized view has delete huge number of rows.
select count(*) from apps.BAL_PART group by C3;
C3 is the rowid which is present in create materialized statement.
COUNT(*)
292927011
210215
69330
184406971
Is there any way to improve the plan. As i created a partition on code_combination_id and local index on code_combination_id which will not help in set_of_books_id case. I dont PCT will help here or not. Is it possible to use PCT refresh by equipartitioning only one column in where clause.
Please assist me in improving refresh of materialized view using fast refresh.
Thanks and Regards,
Edited by: user646034 on Feb 23, 2013 11:13 PM
Edited by: user646034 on Feb 23, 2013 11:19 PM
Edited by: user646034 on Feb 23, 2013 11:46 PM
Edited by: user646034 on Feb 25, 2013 11:46 AMHi
The below explain without index and with index.
/* MV_REFRESH (DEL) */ DELETE FROM "APPS"."BAL_PART
" SNA$ WHERE "C3" IN (SELECT /*+ NO_MERGE */ * FROM (SELECT
CHARTOROWID("MAS$"."M_ROW$$") RID$ FROM
"GL"."MLOG$_GL_SETS_OF_BOOKS" "MAS$" WHERE "MAS$".SNAPTIME$$ > :B_ST1
) AS OF SNAPSHOT(:B_SCN) MAS$)
Plan hash value: 2704021294
| Id | Operation | Name | E-Rows |E-Bytes| Cost (%CPU)| E-Time |
| 0 | DELETE STATEMENT | | | | 339K(100)| |
| 1 | DELETE | BAL_PART | | | | |
| 2 | NESTED LOOPS | | 1 | 168 | 339K (1)|999:59:59 |
| 3 | SORT UNIQUE | | 1 | 138 | 2 (0)| 00:02:31 |
| 4 | TABLE ACCESS FULL| MLOG$_GL_SETS_OF_BOOKS | 1 | 138 | 2 (0)| 00:02:31 |
| 5 | INDEX RANGE SCAN | C3BOOKS | 110M| 3164M| 339K (0)|999:59:59 |
If i will not use the C3 index then the query will use the belolw plan, I guess this will also take same time or more time.
| 0 | DELETE STATEMENT | | | | 9743K(100)| |
| 1 | DELETE | BAL_PART | | | |   -
ORA-12008: error in materialized view refresh path... Bug?
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> drop materialized view log on test_tbl;
Materialized view log dropped.
SQL> drop materialized view mv_test_tbl;
Materialized view dropped.
SQL> drop table test_tbl;
Table dropped.
SQL> create table test_tbl(
2 test_id number(10) primary key,
3 test_name varchar2(10) not null)
4 ;
Table created.
SQL> insert into test_tbl values (1,'bob');
1 row created.
SQL> insert into test_tbl values (2,'joe');
1 row created.
SQL> insert into test_tbl values (3,'john');
1 row created.
SQL> commit;
Commit complete.
SQL> create materialized view log on test_tbl
2 with primary key , rowid, sequence
3 (
4 test_name
5 )
6 including new values;
Materialized view log created.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 as
4 select test_id,
5 test_name
6 from test_tbl;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
Commit complete.Ok, so that's all good. Now if I create the materialized view log with the COMMIT SCN option:
SQL> drop materialized view log on test_tbl;
Materialized view log dropped.
SQL> drop materialized view mv_test_tbl;
Materialized view dropped.
SQL> create materialized view log on test_tbl
2 with primary key , rowid, sequence
3 (
4 test_name
5 ),
6 commit scn
7 including new values;
Materialized view log created.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 as
4 select test_id,
5 test_name
6 from test_tbl;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
commit
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01006: bind variable does not exist
SQL>Committing an update that updates no rows against a master table for a single table fast refreshable materialized view results in the error above when the materialized view log on the master table is created with the COMMIT SCN option. I'm guessing that this isn't how things are supposed to work. Or am I missing something here? Anyone else encountered this before?
Cheers.
Edited by: Stain on Jan 25, 2013 1:27 PMQuery Rewrite is an option for a Materialized View, not a Materialized View Log. Also, query rewrite is used as an optimization technique which "transforms a SQL statement expressed in terms of tables or views into a statement accessing one or more materialized views that are defined on the detail tables". I don't think it plays any role in the refresh path.
Regardless, it made no difference.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 ENABLE QUERY REWRITE
4 as
5 select test_id,
6 test_name
7 from test_tbl
8 ;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
commit
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01006: bind variable does not exist
SQL>Edited by: Stain on Jan 25, 2013 2:06 PM -
ORA-12008: error in materialized view refresh path ;;; PLZ HELP ME
Hi all,
I 'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0; I got these errors when I tried to refresh my materialized view ;
ORA-12008: error in materialized view refresh path
ORA-01555: snapshot too old: rollback segment number 5 with name "_SYSSMU5$"
too small
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
I don't understand what mean these errors and why i got them?
Someone can help me please ?
Thanks
regards,thank you Justin,
I found in my alertDB.log this line ;
Mon Aug 20 03:00:54 2007
ORA-01555 caused by SQL statement below (SQL ID: 64a7sdbbvknta, Query Duration=1021 sec, SCN: 0x0004.4a145344):
Mon Aug 20 03:00:54 2007
INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "MANAGEMENT"."MVIEW_COMPUTERS"("ID","WINVERSION","ANTIVIRUS","GUID","INSTALLDT","CONNECTION_TYPE","GROUPID
","QUOVACOUNTRY") SELECT "C"."ID","C"."WINVERSION","C"."ANTIVIRUS","C"."GUID","C"."INSTALLDT","C"."CONNECTIONTYPE","C"."GROUPID","C"."QUOVACOUNTRY"
FROM "MANAGEMENT"."COMPUTERS" "C"
So i execute this query to found the TUNED_UNDORETENTION value ;
SELECT *
FROM V$UNDOSTAT v
WHERE v.MAXQUERYID = '64a7sdbbvknta'
and i have this result :
BEGIN_TIME 20070820 02:53:42
END_TIME 20070820 03:03:42
UNDOTSN 1
UNDOBLKS 51242
TXNCOUNT 5012
MAXQUERYLEN 1060
MAXQUERYID 64a7sdbbvknta
MAXCONCURRENCY 21
UNXPSTEALCNT 0
UNXPBLKRELCNT 0
UNXPBLKREUCNT 0
EXPSTEALCNT 14
EXPBLKRELCNT 51392
EXPBLKREUCNT 0
SSOLDERRCNT 1
NOSPACEERRCNT 0
ACTIVEBLKS 606920
UNEXPIREDBLKS 19896
EXPIREDBLKS 612728
TUNED_UNDORETENTION 1841
I don't know exactly which value i should set my parameter?
Message was edited by:
HAGGAR -
Error in materialized view refresh path
I have a procedure that manuall refreshes a materialized view. It almost always gets the following errors:
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-08103: object no longer exists
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
ORA-06512: at "MGT2.ITV_026_SP", line 35
ORA-06512: at line 1
When I run the same refresh of the materialized view directly from SQL*Plus, it never gets the error. It takes only about 5 minutes. OEM says the undo tablespace can support retention of 753 minutes if I'm understanding the graph.
Thanks for your help..I will take a wild guess:
MGT2.VW_PRINT_026
Is a materialized view too.
This error means that while doing a refresh to VW_MAT_026 it
source mv, the VW_PRINT_026 wasn't exists, i.e. has been in the refresh process.
You didn't get it in Sql*Plus because you are doing it step by step.
The solution - make sure that VW_PRINT_026 completed it refresh before doing
The VW_MAT_026 refresh, e.g.
not tested-
begin
dbms_snapshot.refresh('VW_PRINT_026');
dbms_snapshot.refresh('VW_MAT_026');
end;Another option - the VW_PRINT_026 is a table created "on the fly"
And in some scenario - the table isn't exists yet...
If this is the case you should check if the object exist before doing the
VW_MAT_026 refresh, e.g.
not tested-
declare
ll_exists number;
begin
select 1 into ll_exists from all_objects where owner ='MGT2' and
object_name ='VW_PRINT_026';
dbms_snapshot.refresh('VW_MAT_026');
when others then raise;
end;Amiel -
Materialized view refresh error
Hi,
I get the error in the package I run.
04/29/2011 BM_CARLSON 64x Failed: ORA-12008: error in materialized view refresh path
ORA-04052: error
Should I drop the mview and recreate it.
Since the package refreshes a lot of mview's how will I know that a particular mview is causing problem.
Thanks,
InduHi,
What is the Oracle database version? ORA - 04052 means error occurred when looking up remote object. SO check the db links and the objects on the remote database.
>
Error: ORA 4052
Text: error occurred when looking up remote object %s%s%s%s%s
Cause: An error has occurred when trying to look up a remote object.
Action: Fix the error. Make sure the remote database system has run KGLR.SQL to create necessary
views used for querying/looking up objects stored in the database.
>
Anand -
Materialized view refresh problem
Hi,
I have a materialized view which refreshes every 12 hour. Very often (not always) the refresh fails with the following error in the alert log.
What could be the reason behind this and how to rectify this?
Errors in file /d1/oracle/proddb/9.2.0/admin/PROD_d1/bdump/prod_j000_844222.trc:
ORA-12012: error on auto execute of job 624
ORA-12008: error in materialized view refresh path
ORA-08103: object no longer exists
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
ORA-06512: at "SYS.DBMS_IREFRESH", line 683
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 1
Regards,
AnandImportant error descriptions are as follows. Follow actions here.
ORA-12008 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.
ORA-08103 object no longer exists
Cause: The object has been deleted by another user since the operation began.
Action: Remove references to the object.
-aijaz -
Materialized View refresh causes COMPILATION_ERROR status
On 10gR2, when I create a particular materialized view, it is successful with compile state Valid and staleness Fresh. However, after a DBMS_SNAPSHOT.refresh (which did not throw any exceptions), the compile state and staleness are now COMPILATION_ERROR. (Dropping and recreating the materialized view, with the same source code as before, returns the state to Valid and staleness to Fresh.)
Note that there are other materialized views refreshed at about the same time that do not show COMPILATION_ERROR - but the materialized view in question does appear to be the only one with NOLOGGING. Is this a known bug of some sort?Correction: actually, NOLOGGING is not enabled (I was looking at a different script...)
However, I did notice that when the materialized view is refreshed from a valid state, it remains valid; the compilation_error state occurs only when the materialized view is in a needs_refresh state.
(I hesitate to include the query that builds the materialized view as it is over 200 lines; is such a long source considered bad form to include in a post?)
-- Don -
ORA-12008: error in materialized view refresh path with ORA-01652
I have a temp tablespace with 2 tempfiles of 2GB each (total 4GB) but still refresh of materialized view is failing with following error:
5646690 - BIS Materialized View Refresh Program
ORA-12008: error in materialized view refresh path
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP1
I checked and temp ts is completly filled
SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
TABLESPACE_NAME BYTES_USED BYTES_FREE
TEMP1 2147483648 0
TEMP1 2147483648 0
My question is how do I find out how much space I need for temp tablespace. what 's the best practise to size temp tablespace when running refresh. refresh is done by client who is submitting a request thru ebiz apps so I 'd like to size it correctly without having to keep guessing.
Thanks so much in advance for any helpHello,
Temp tablespace size depends how much sort by , order by operation your application performing. You can create new temp tablespace and drop old one with bigger file size
CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '\mypath_to_temp\TEMP02' SIZE 256M REUSE AUTOEXTEND ON NEXT 256M MAXSIZE 8192M EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;
Drop tablespace temp including contents; -- Make sure you delete on temp data files.Here is link for your reading purpose
http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_3.shtml
Regards
Edited by: OrionNet on Mar 6, 2009 6:15 PM -
Materialized View, ORA-12008: error in materialized view refresh path
I want to refresh a materialized view, but I get an ORA-12008 error.
Does anybody have an idea? I do not find any errors in my refresh statement.
CREATE MATERIALIZED VIEW scott.dummy_mv
TABLESPACE test
BUILD IMMEDIATE
USING INDEX TABLESPACE idx_test
REFRESH
START WITH sysdate
NEXT ROUND(SYSDATE)+5/24
WITH PRIMARY KEY
ENABLE QUERY REWRITE
AS
SELECT KM.ID ID
,KM.USERNAME USERNAME
,KM.ABTID ABTID
FROM my_table KM
scott@orcl>desc dummy_mv
Name Null? Typ
ID NOT NULL NUMBER(4)
USERNAME NOT NULL VARCHAR2(30)
ABTID NOT NULL NUMBER(4)
scott@orcl>
BEGIN
SYS.DBMS_JOB.REMOVE(6579);
COMMIT;
END;
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'dbms_refresh.refresh(''"scott"."dummy_mv"'');'
,next_date => to_date('07.01.2009 05:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'ROUND(SYSDATE)+5/24 '
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
scott@orcl>exec dbms_refresh.refresh('dummy_mv');
BEGIN dbms_refresh.refresh('dummy_mv'); END;
FEHLER in Zeile 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 820
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 877
ORA-06512: in "SYS.DBMS_IREFRESH", Zeile 683
ORA-06512: in "SYS.DBMS_REFRESH", Zeile 195
ORA-06512: in Zeile 1
scott@orcl>crupper wrote:
I get the same error:
scott@orcl>exec dbms_mview.refresh('dummy_mv','c');
BEGIN dbms_mview.refresh('dummy_mv','c'); END;
FEHLER in Zeile 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 820
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 877
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 858
ORA-06512: in Zeile 1
I would first check the "query" information of the DBA_SNAPSHOTS/DBA_MVIEWS dictionary views if it reveals anything obvious.
But it looks more like an internal error while processing the refresh. You can get more information about the error by tracing the session. A "alter session set sql_trace = true;" before running the refresh should be sufficient. Disconnect afterwards and check the generated trace file for errors either using "tkprof" and checking the output or by manually searching for "err=" in the trace file.
Which 4-digit version of Oracle are you using?
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Error on compile the Materialized view refresh
Hello all,
I am getting issue while compile the Materialized view refresh.
ALTER MATERIALIZED VIEW FII_GL_AGRT_SUM_MV COMPILE;--( did successfully)
exec DBMS_MVIEW.REFRESH('APPS.FII_GL_AGRT_SUM_MV','C');
Error:
ORA-12008: error in materialized view refresh path
ORA-01013: user requested cancel of current operation
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2545
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2751
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2720
ORA-06512: at line 1
Please tell me what could be the issue
Thanks and Regards,
MuthuHello all,
I am using R12.1.3.
While execute the below command, its not completing..
exec DBMS_MVIEW.REFRESH('APPS.FII_GL_AGRT_SUM_MV','C');
I found the reason why its not completing. Because its Refresh In Progress.
SQL> select u.name owner,o.name mview_name, s.obj#,lastrefreshdate
*2 from sys.obj$ o, sys.sum$ s, sys.user$ u*
*3 where u.user# = o.owner# and o.obj# = s.obj# and o.type# = 42 AND bitand(s.mflags, 8) = 8;*
OWNER MVIEW_NAME OBJ# LASTREFRE
APPS FII_GL_AGRT_SUM_MV 438268 06-MAR-13
SQL> select decode(bitand(s.mflags,8), 8,'Refresh In Progress','Not being refreshed')
*2 from sys.obj$ o, sys.user$ u, sys.sum$ s*
*3 where o.obj# = s.obj# and o.owner# = u.user# and o.type# = 42*
*4 and o.name='FII_GL_AGRT_SUM_MV';*
DECODE(BITAND(S.MFL
Refresh In Progress
How to stop Refreshing or is there any other solution for this issue?
Please clarify me...
Thanks and Regards,
Muthu -
When i'm refreshing Materialized view through this package DBMS_mview.refresh()
i get the following error
ORA-12008: error in materialized view refresh path
ORA-01013: user requested cancel of current operation
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
ORA-06512: at line 1
Version 10g Rel2
Seek valuable suggestions and advicesHi,
Check any Issues exists with other dependencies will executing your refresh of materialized views.
- Pavan Kumar N
Oracle 9i/10g - OCP
http://oracleinternals.blogspot.com/
Maybe you are looking for
-
How do I mport address book from thunderbird?
my yahoo email was hacked and my address book entries deleted. I have many of these on Thunderbird but do not know how to import directly from Thunderbird. (When I convert the Tbird address to an csv file and then try to import - nothing happens for
-
VGA vs DVI with regards to projectors
I have recently purchased a BENQ MP620 DLP projector to use as a home cinema and for my artwork. It is running off the VGA port of my Mac and produces a very good picture as is. However, is it worth running it off the DVI port; will there be a notice
-
I updated my fire fox on my MAC OS X to 3.6.6 version of firefox, everything went smooth till I open FireFox then the window firefox update opens up and about 1/3 through the process it gets stuck on Checking Compatibility of Add-ons and doesn't go a
-
Im trying to make a double buffered panel. Ive used the Image x = createImage(intx,inty); method of constructing the image, when i get the graphics to write to the image I always get an execption. the code is as follows import java.awt.*; public clas
-
Mixed formats-editing-transcoding and mastering
Hello, My client has a project with that has mixed format and we need to figure out what workflow will be best to edit and master. The final video will be 1-2 hours. It will be shown primarily on the web and, at a later stage, in dvd. There are 2 mai