Unable to refresh Materialized view group when an Mview is added
Hi,
I have 8 MVs present in my DB and added them to a MV refresh group. But I am getting the error below when I try to refresh the group.
SQL> exec DBMS_REFRESH.refresh('MVRFRSHGRP_EAIGHD');
begin DBMS_REFRESH.refresh('MVRFRSHGRP_EAIGHD'); end;
ORA-12048: error encountered while refreshing materialized view "MYUAT"."MV_EAI_PJRM_EMP_ALLOC_DTLS"
ORA-12018: following error encountered during code generation for "MYUAT"."MV_EAI_PJRM_EMP_ALLOC_DTLS"
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2563
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2776
ORA-06512: at "SYS.DBMS_IREFRESH", line 685
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 1
SQL> Actually the view MV_EAI_PJRM_EMP_ALLOC_DTLS exists and MVlog$ are present at source site.
When I remove this view from the group, I am able to refresh it successfully.
I destroyed the group, recreated and added all the views and tried. But no luck.
Can some one suggest what could be the problem?
Regards
Deep
Hi,
You didn't leave a version (Again), so I can only guess.
You may be suffering from
Bug 10096159 ORA-12048 error message raised by DBMS_REFRESH.REFRESH is not corrrect
Meaning it could be a different MV that fails to refresh.
Regards
Peter
Edit:
Versions confirmed as being affected (There could be others, mind)
11.2.0.1
11.1.0.7
10.2.0.5
10.2.0.3
Edited by: Peter on Sep 4, 2012 8:45 AM
Similar Messages
-
Ora-23454 when add an objects to the materialized view group
Hi, All,
I tend to create a distributed MV, when add an objects to the materialized view group using:
BEGIN
DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
gname => 'hr_repg',
sname => 'hr',
oname => 'departments_mv1',
type => 'SNAPSHOT',
min_communication => TRUE);
END;
I got the follwoing errors:
ORA-23454: flavor not defined for object group "PUBLIC"."HR_REPG"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 452
ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 468
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 5599
ORA-06512: at "SYS.DBMS_REPCAT_SNA", line 82
ORA-06512: at "SYS.DBMS_REPCAT", line 1332
ORA-06512: at line 2
Does anybody know what is the problem?
Thanks in advance for any advice.
Sharon.NiAre you trying to replicate an existing materialized view called "departments_mv1" ? That is what the implication of the arguments you are supplying.
If it is an MV, you have to supply the DDL (in the DDL_TEXT) as well.
Hemant K Chitale -
How does materialized view work when refresh the view vs create the view?
I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
Could anyone please let me know how would this happen? Thanks,
Code looks like as following
create materialized view MY_MV1
refresh force on demand
start with to_date('20-02-2013 22:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate)+1+22/24
as
( SELECT Nvl(Cr.Sol_Chng_Num, ' ') AS Change_Request_Nbr,
Nvl(Sr.Sr_Num, ' ') AS Service_Request_Nbr,
Nvl(Sr.w_Org_Id, 0) AS Org_Id,
Fcr.rowid,
Cr.rowid,
Bsr.rowid,
Sr.rowid,
SYSDATE
FROM [email protected] Fcr
INNER JOIN [email protected] Cr
ON Fcr.w_Sol_Chng_Id = Cr.w_Sol_Chng_Id
INNER JOIN [email protected] Bsr
ON Fcr.w_Sol_Chng_Id = Bsr.w_Sol_Chng_Id
INNER JOIN [email protected] Sr
ON Sr.w_Srv_Rec_Id = Bsr.w_Srv_Rec_Id
WHERE Sr.Sr_Num !='NS'
);I have tried to use dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) but it still took 141 mins to run... vs 159 mins without atomic_refresh=>false
Edited by: 986006 on Feb 20, 2013 2:15 PMWelcome to the forum!
Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION)
>
I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
>
What Oracle version are you using? The 'atomic_refresh' parameter default was changed to TRUE starting with 10g.
See the PL/SQL Packages and Types doc
>
atomic_refresh
If this parameter is set to true, then the list of materialized views is refreshed in a single transaction. All of the refreshed materialized views are updated to a single point in time. If the refresh fails for any of the materialized views, none of the materialized views are updated.
If this parameter is set to false, then each of the materialized views is refreshed in a separate transaction.
>
What that means is that if the value is TRUE Oracle uses a DELETE to remove the existing rows. If the value is FALSE then Oracle uses TRUNCATE.
If you really are using the FALSE setting you should not be seeing that much of a time difference between creating the MV and a complete refresh so something else must be going on. -
Alternative for OUTER Join for use in fast refresh materialized view
Hi ,
I have two tables as :
CREATE TABLE TEST_SANDY1
COL1 NUMBER
CREATE TABLE TEST_SANDY2
COL1 NUMBER,
COL2 VARCHAR2(10 BYTE)
Data for the tables are :
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
1);
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
2);
INSERT INTO TEST_SANDY1 ( COL1 ) VALUES (
3);
COMMIT;
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
1, 'a');
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
2, 'b');
INSERT INTO TEST_SANDY2 ( COL1, COL2 ) VALUES (
4, 'd');
COMMIT;
Now when I run the following select statement :
select
b.col1
from
test_sandy1 a,
test_sandy2 b
where
b.COL1 = a.COL1(+)
I get :
COL1
1
2
4
I want to build a materialized view to generate the same values but it has to be fast refresh. But since I am using outer join I am unable to create a fast refresh one.
Can someone suggest an alternate select to create fast refresh materialized view.
Thanks,
SandipanThe select statement was not fitting my problem , so I'll change it as :
select
a.col1, nvl(b.col2, 'DEFAULT')
from
test_sandy1 a,
test_sandy2 b
where
b.COL1(+) = a.COL1
I get :
COL1 VAL
1 a
2 b
3 DEFAULT
How do I this ? -
Reg:package code to refresh materialized views
i am new to pl/sql packages and procedures.i want it to execute for running mappings in informatica which takes 0 and gives 1 when executed successfully
create or replace PACKAGE BODY pkg_refresh_mv as
procedure prc_mv (p_mv_name varchar2) is
begin
dbms_mview.refresh (p_mv_name);
end prc_mv;
procedure refresh_all_mv (proc_response IN OUT number) is
begin
dbms_mview.refresh('materialized view','C');
dbms_mview.refresh('materialized view','C');
proc_response := 1;
exception
when others then
proc_response := 0;
end refresh_all_mv ;
end pkg_refresh_mv;
when i execute this code i get the following errors
PLS-00201: identifier 'PKG_REFRESH_MV' must be declared
PLS-00304: cannot compile body of 'PKG_REFRESH_MV' without its specification
what needs to be changed
thankstry this one :
CREATE OR REPLACE PACKAGE pkg_refresh_mv
AS
PROCEDURE prc_mv (p_mv_name VARCHAR2);
PROCEDURE refresh_all_mv (proc_response IN OUT NUMBER);
END pkg_refresh_mv;
CREATE OR REPLACE PACKAGE BODY pkg_refresh_mv
AS
PROCEDURE prc_mv (p_mv_name VARCHAR2)
IS
BEGIN
dbms_mview.refresh (p_mv_name);
END prc_mv;
PROCEDURE refresh_all_mv (proc_response IN OUT NUMBER)
IS
BEGIN
dbms_mview.refresh ('materialized view', 'C');
dbms_mview.refresh ('materialized view', 'C');
proc_response := 1;
EXCEPTION
WHEN OTHERS
THEN
proc_response := 0;
END refresh_all_mv;
END pkg_refresh_mv;
/ -
Refresh Materialized View in a package
Refresh Materialized View in a process.
I have a USER2.Materialized view and when I want to refresh it I execute:
execute dbms_mview.refresh('MV_FACT_SALES','C');
But I have the ETL process in a USER1.package
The User1 needs any Materialized View Grant or any privilegie?
How can I refresh the Materialized View in a procedure in the USER1.package?I 'm sorry, but I want to create a procedure under USER2 and when I execute the script to create it I receive the error:
ORA-06550: line 4, column 12:
PLS-00103: Encountered the symbol "DBMS_MVIEW" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "DBMS_MVIEW" to continue.
Te script procedure is:
PROCEDURE REFRESH_MV IS
BEGIN
execute dbms_mview.refresh('MV_FACT_SALES','C');
END;
How can I refresh a Materialized view in a procedure?
Thanks! -
Error While Creating Fast Refresh Materialized view.
Table Scripts:
CREATE TABLE CONTRACT_MASTER
CONTRACT_SEQ NUMBER(10) NOT NULL,
PDN CHAR(5) NOT NULL,
APPID NUMBER(10) NOT NULL,
CONTRACT_LOB_DESC VARCHAR2(20) NOT NULL,
CUSTOMER_NAME VARCHAR2(57) NOT NULL,
CONTRACT_DT DATE NOT NULL,
CONTRACT_RECD_DT DATE NOT NULL,
HELD_OFFERING_DT DATE NOT NULL,
DRAFT_AMT NUMBER(15,2) NOT NULL,
STATUS_DESC VARCHAR2(20) NOT NULL,
GIF_UPLOAD_TM TIMESTAMP NOT NULL
CREATE table CONTRACT_COMMENTS
CONTRACT_COMMENTS_SEQ NUMBER(10) NOT NULL,
APPID NUMBER(10) NOT NULL,
COMMENTS VARCHAR2(1000) NOT NULL,
GIF_UPLOAD_TM TIMESTAMP NOT NULL
Constraints on tables
ALTER TABLE CONTRACT_MASTER ADD
CONSTRAINT XPKCONTRACT_MASTER PRIMARY KEY (CONTRACT_SEQ) USING INDEX ;
ALTER TABLE CONTRACT_COMMENTS ADD
CONSTRAINT XPKCONTRACT_COMMENTS PRIMARY KEY (CONTRACT_COMMENTS_SEQ) USING INDEX ;
alter table CONTRACT_MASTER add CONSTRAINT XUIAPPCONTRACT_MASTER UNIQUE (APPID) USING INDEX;
CREATE INDEX XUIAPPCONTRACT_COMMENTS ON
CONTRACT_COMMENTS(APPID) ;
Materialized View Creation:
CREATE MATERIALIZED VIEW LOG ON CONTRACT_MASTER WITH PRIMARY KEY,ROWID;
CREATE MATERIALIZED VIEW LOG ON CONTRACT_COMMENTS WITH PRIMARY KEY, ROWID;
CREATE MATERIALIZED VIEW MV_CONTRACT_COMMENTS_HELDOFFERING
REFRESH FAST
ENABLE QUERY REWRITE AS
SELECT APPID,COMMENTS FROM CONTRACT_COMMENTS WHERE APPID IN (
SELECT APPID FROM CONTRACT_MASTER WHERE STATUS_DESC = 'Held Offering' )
Errors generated:
ERROR at line 4:
ORA-12015: cannot create a fast refresh materialized view from a complex query
_*Afer That I have changed the query but still it was not created like:*_
CREATE MATERIALIZED VIEW MV_CONT_COMMNTS_HELDOFFERNG
REFRESH FAST
ENABLE QUERY REWRITE AS
SELECT CONTRACT_COMMENTS_SEQ,c.APPID,COMMENTS
FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
WHERE m.APPID = c.APPID and m.STATUS_DESC = 'Held Offering'
*even though error displayed:
SQL> CREATE MATERIALIZED VIEW MV_CONT_COMMNTS_HELDOFFERNG*
2 REFRESH FAST
3 ENABLE QUERY REWRITE AS
4 SELECT CONTRACT_COMMENTS_SEQ,c.APPID,COMMENTS
5 FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
6 WHERE m.APPID = c.APPID and m.STATUS_DESC = 'Held Offering';
FROM CONTRACT_COMMENTS c,CONTRACT_MASTER m
ERROR at line 5:
ORA-12052: cannot fast refresh materialized view GSSIO.MV_CONT_COMMNTS_HELDOFFERNG
*Again I have done "Analyzing Materialized Views for Fast Refresh" as follows:*
1: exec dbms_mview.explain_mview('MV_CONT_COMMNTS_HELDOFFERNG');
2: SELECT capability_name, possible, SUBSTR(msgtxt,1,60) AS msgtxt
FROM mv_capabilities_table
WHERE capability_name like '%FAST%';
Output is :
CAPABILITY_NAME P MSGTXT
REFRESH_FAST N
REFRESH_FAST_AFTER_INSERT N the SELECT list does not have the rowids of all the detail t
REFRESH_FAST_AFTER_ONETAB_DML N see the reason why REFRESH_FAST_AFTER_INSERT is disabled
REFRESH_FAST_AFTER_ANY_DML N see the reason why REFRESH_FAST_AFTER_ONETAB_DML is disabled
REFRESH_FAST_PCT N PCT is not possible on any of the detail tables in the mater
Please suggest what to do to implement fast refresh materialized view for same.Edited by: dba on Sep 20, 2010 12:00 AMIf the two MVs have to be consistent with each other as of a specific time, put them into a Refresh Group and refresh them with DBMS_MVIEW.REFRESH
If an MV is dependent on another, use DBMS_MVIEW.REFRESH_DEPENDENT
See the "Oracle® Database PL/SQL Packages and Types Reference" documentation pages for DBMS_MVIEW.
Hemant K Chitale
http://hemantoracledba.blogspot.com --- this is NOT a documentation site.
Edited by: Hemant K Chitale on Sep 20, 2010 5:19 PM -
ORA-12015: cannot create a fast refresh materialized view from a complex qu
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionI'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh?
CREATE TABLE "DAS_DESC"."AUTHORITY_TEST"
"NAID" NUMBER(20,0) NOT NULL ENABLE,
"AUTH_TYPE" VARCHAR2(40 BYTE),
"XML_DATA" "SYS"."XMLTYPE" ,
"TERM_NAME" VARCHAR2(4000 BYTE)
CREATE TABLE "DAS_DESC"."AUTH_ASSC_TEST"
"NAID" NUMBER(20,0),
"P_NAID" NUMBER(20,0),
"REL_TYPE" VARCHAR2(25 BYTE),
"XML_DATA" "SYS"."XMLTYPE"
CREATE
MATERIALIZED VIEW person_mv
AS
SELECT p.naid
, p.auth_type
, INSERTCHILDXML
p.xml_data -- Parent XML Column
, '//*[contains(local-name(), ''person'')]' --XPATH to Person
, 'nonPreferredHeadingArray' -- Value for new child element
( -- Sub query for injecting new variant person array
SELECT XMLELEMENT
"nonPreferredHeadingArray"
, XMLAGG -- Aggregator for Variant Persons Array
XMLELEMENT
"variantPersonName" -- Wrapper for each entry in array
, extract(a.xml_data,'*/*')
FROM auth_assc_table -- Link table
WHERE a.p_naid = p.naid
) AS XML_DATA
FROM authority p -- Parent table
WHERE p.auth_type = 'Person';The views are created fine and they work perfectly for what we need. The problem is the refresh when we edit the base tables. Ideally, it should take a couple seconds. Right now, it takes a couple minutes. XMLTYPE is one problem and the Complex Query exception is the other. If there is a work-around for fast refresh, please let me know. Greatly appreciated.jjmdb wrote:
I'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh? Besides XMLTYPE column, your MV definition has a subquery which prevents it from being fast refreshable.
I could not find any specific reference in documentation about restriction on XMLTYPE (or CLOB) columns but it seems logical that oracle will not be able to keep track of changes to binary data. What does DBMS_MVIEW.EXPLAIN_MVIEW generate for your MV definition? That should tell you which all conditions (for FAST REFRESH) your MV violates. Since you can not create a MV LOG to include XMLTYPE column, it will not be possible to create a FAST REFRESHABLE MV that includes the XMLTYPE column.
I am afraid there is not much you can do here unless you are prepared to change the way data is stored in your base tables. If you can store data in base tables using standard data types instead of binary/XML storage, you might be able to create a FAST REFRESHABLE MV. -
Refresh materialized view on fast refresh
Hi,
I want to create a fast refresh on a materialized view but i kept getting ORA-12015: cannot create a fast refresh materialized view from a complex query. When I did a complete refresh on the materialzed view, it completed. I have create a materialized view log for the table. In my materialized view script, I have included a user defined function. Does db version 10g have the capability to do a fast refresh?
ThanksWhat is the query you are using for the MV?
The error message says it all... "cannot create a fast refresh materialized view from a complex query"
If your query is complex then you will have to perform complete refreshes.
One way around can be to fast refresh all tables in the query then create a view on them based on the 'complex' query. Admittedly this is only a workaround in certain scenarios.
Check out the documentation...
http://68.142.116.70/docs/cd/B19306_01/server.102/b14226/repmview.htm#sthref422 -
Fast-Refresh Materialized Views
hi
How to auto Refresh Materialized Views. Mean when ever a new row inserted into a table ; It must show automatically..
Or Tells is that , Is it a good decision use Materialized Views for reporting purpose.
Thanks
ManiSmall example for you:
[email protected]> create table dept2 as select * from scott.dept;
Table created.
[email protected]> alter table dept2 add constraint dept2_pk primary key(deptno);
Table altered.
[email protected]> create materialized view log on dept2;
Materialized view log created.
[email protected]> create materialized view dept2_mv
2 refresh fast on commit as
3 select * from dept2 ;
Materialized view created.
[email protected]> select * from dept2_mv;
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
[email protected]> insert into dept2 values(50,'HR','WARSAW');
1 row created.
[email protected]> commit;
Commit complete.
[email protected]> select * from dept2_mv;
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
50 HR WARSAW
Best Regards
Krystian Zieja / mob -
PX Deq Credit: send blkd is getting hang while refreshing materialized view
Hi All,
When we are refreshing materialized view. It is taking more than 2.30 mins. Initially it was taking 1.40 Mins.
We are using parallel and base tables are partitioned. When i checked the tkprof report i see lots of insert query is mostly waiting for PX Deq Credit: send blkd event. When i check the ASH report I don't find any query related to MV was running but still MV refresh was going on
TKPROF: Release 11.2.0.1.0 - Development on Wed Jun 5 16:27:29 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Trace file: CHDFCI_p001_43384918_PARALLEL.trc
Sort options: exeela prsela fchela
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
EXPLAIN PLAN option disabled.
SQL ID: 2x210q5g30m4t
Plan Hash: 2058446196
INSERT /*+ BYPASS_RECURSIVE_CHECK APPEND */ INTO
"APPS"."GL_BAL_MV" SELECT * FROM
GL_BAL_V
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 362.20 9372.04 1158765 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 362.20 9372.04 1158765 0 0 0
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 175 (recursive depth: 1)
Rows Row Source Operation
0 LOAD AS SELECT (cr=0 pr=0 pw=0 time=0 us)
0 PX COORDINATOR (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND QC (RANDOM) :TQ10003 (cr=0 pr=0 pw=0 time=0 us cost=1041298 size=389555904 card=2028937)
78448967 HASH JOIN BUFFERED (cr=0 pr=1158765 pw=1158765 time=276842112 us cost=1041298 size=389555904 card=2028937)
410944 BUFFER SORT (cr=0 pr=0 pw=0 time=492466 us)
410944 PX RECEIVE (cr=0 pr=0 pw=0 time=34526636 us cost=64715 size=147944250 card=1643825)
0 PX SEND HASH :TQ10001 (cr=0 pr=0 pw=0 time=0 us cost=64715 size=147944250 card=1643825)
0 PARTITION RANGE ALL PARTITION: 1 39 (cr=0 pr=0 pw=0 time=0 us cost=64715 size=147944250 card=1643825)
0 TABLE ACCESS FULL GL_CODE_COMBINATIONS PARTITION: 1 39 (cr=0 pr=0 pw=0 time=0 us cost=64715 size=147944250 card=1643825)
78448967 PX RECEIVE (cr=0 pr=0 pw=0 time=2453949696 us cost=976582 size=395060280 card=3873140)
0 PX SEND HASH :TQ10002 (cr=0 pr=0 pw=0 time=0 us cost=976582 size=395060280 card=3873140)
0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us cost=976582 size=395060280 card=3873140)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us cost=32 size=133920 card=2480)
0 PX SEND BROADCAST :TQ10000 (cr=0 pr=0 pw=0 time=0 us cost=32 size=133920 card=2480)
0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us cost=32 size=133920 card=2480)
0 TABLE ACCESS FULL GL_SETS_OF_BOOKS (cr=0 pr=0 pw=0 time=0 us cost=7 size=108 card=6)
0 TABLE ACCESS FULL GL_PERIODS (cr=0 pr=0 pw=0 time=0 us cost=24 size=44640 card=1240)
0 PX BLOCK ITERATOR PARTITION: 1 39 (cr=0 pr=0 pw=0 time=0 us cost=976550 size=30099548160 card=627073920)
0 TABLE ACCESS FULL GL_BALANCES PARTITION: 1 39 (cr=0 pr=0 pw=0 time=0 us cost=976550 size=30099548160 card=627073920)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
PX Deq: Execution Msg 3 0.16 0.17
PX Deq Credit: send blkd 1061004 1.99 5084.61
PX Deq: Table Q Normal 250856 2.00 2306.87
asynch descriptor resize 1 0.00 0.00
Disk file operations I/O 10 0.23 0.26
direct path write temp 3608 1.20 958.39
latch free 26 0.02 0.19
PX qref latch 7647924 0.05 11.85
direct path read temp 578 0.43 35.19
PX Deq Credit: need buffer 4037 0.08 5.84
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
PX Deq: Execution Msg 3 0.47 0.75
PX Deq: Slave Session Stats 1 0.15 0.15
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 362.20 9372.04 1158765 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 362.20 9372.04 1158765 0 0 0
Misses in library cache during parse: 0
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
PX Deq: Execution Msg 3 0.16 0.17
PX Deq Credit: send blkd 1061004 1.99 5084.61
PX Deq: Table Q Normal 250856 2.00 2306.87
asynch descriptor resize 1 0.00 0.00
Disk file operations I/O 10 0.23 0.26
direct path write temp 3608 1.20 958.39
latch free 26 0.02 0.19
PX qref latch 7647924 0.05 11.85
direct path read temp 578 0.43 35.19
PX Deq Credit: need buffer 4037 0.08 5.84
1 user SQL statements in session.
0 internal SQL statements in session.
1 SQL statements in session.
0 statements EXPLAINed in this session.
Trace file: CHDFCI_p001_43384918_PARALLEL.trc
Trace file compatibility: 11.1.0.7
Sort options: exeela prsela fchela
1 session in tracefile.
1 user SQL statements in trace file.
0 internal SQL statements in trace file.
1 SQL statements in trace file.
1 unique SQL statements in trace file.
8986825 lines in trace file.
9372 elapsed seconds in trace file.When i checked the ASH report during this time. I don't see anything running related to MV.
I am using parallel degree 8 for GL_BALANCES.
Please suggest.Hi
After enabling the DML also, same plan is getting generated.
MV refresh is taking same time.
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
PLAN_TABLE_OUTPUT
| 0 | INSERT STATEMENT | | | | 1027K(100)| | | | | | |
| 1 | LOAD AS SELECT | | | | | | | | | | |
| 2 | PX COORDINATOR | | | | | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10003 | 1998K| 365M| 1027K (1)|999:59:59 | | | Q1,03 | P->S | QC (RAND) |
| 4 | HASH JOIN BUFFERED | | 1998K| 365M| 1027K (1)|999:59:59 | | | Q1,03 | PCWP | |
| 5 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
| 6 | PX RECEIVE | | 1642K| 141M| 64715 (0)|999:59:59 | | | Q1,03 | PCWP | |
| 7 | PX SEND HASH | :TQ10001 | 1642K| 141M| 64715 (0)|999:59:59 | | | | S->P | HASH |
| 8 | PARTITION RANGE ALL | | 1642K| 141M| 64715 (0)|999:59:59 | 1 | 39 | | | |
| 9 | TABLE ACCESS FULL | GL_CODE_COMBINATIONS | 1642K| 141M| 64715 (0)|999:59:59 | 1 | 39 | | | |
| 10 | PX RECEIVE | | 3820K| 371M| 963K (1)|999:59:59 | | | Q1,03 | PCWP | |
PLAN_TABLE_OUTPUT
| 11 | PX SEND HASH | :TQ10002 | 3820K| 371M| 963K (1)|999:59:59 | | | Q1,02 | P->P | HASH |
| 12 | HASH JOIN | | 3820K| 371M| 963K (1)|999:59:59 | | | Q1,02 | PCWP | |
| 13 | BUFFER SORT | | | | | | | | Q1,02 | PCWC | |
| 14 | PX RECEIVE | | 2480 | 130K| 32 (4)| 00:40:12 | | | Q1,02 | PCWP | |
| 15 | PX SEND BROADCAST | :TQ10000 | 2480 | 130K| 32 (4)| 00:40:12 | | | | S->P | BROADCAST |
| 16 | HASH JOIN | | 2480 | 130K| 32 (4)| 00:40:12 | | | | | |
| 17 | TABLE ACCESS FULL| GL_SETS_OF_BOOKS | 6 | 108 | 7 (0)| 00:08:48 | | | | | |
| 18 | TABLE ACCESS FULL| GL_PERIODS | 1240 | 44640 | 24 (0)| 00:30:09 | | | | | |
| 19 | PX BLOCK ITERATOR | | 618M| 27G| 963K (1)|999:59:59 | 1 | 39 | Q1,02 | PCWC | |
| 20 | TABLE ACCESS FULL | GL_BALANCES | 618M| 27G| 963K (1)|999:59:59 | 1 | 39 | Q1,02 | PCWP | |
--------------------------------------------------------------------------------------------------------------------------------------------------Please find the completion time for MV refresh.
14:58:47 SQL> alter session enable parallel dml;
Session altered.
Elapsed: 00:00:00.27
14:59:50 SQL> exec dbms_mview.REFRESH ('GL_BAL_MV','C',atomic_refresh=>FALSE);
PL/SQL procedure successfully completed.
Elapsed: 02:30:58.37
Thanks -
How to Refresh materialized view
Hi,
I am using 11G owb. I would like to know if any one can help me know if there is any easy to Refresh materialized view . I will be using this materialized view to source data from my maps. this map will be part of a process flow. i would like to refresh the materialized view before every run of the map in process flow.
Thanks,
Ash.
Edited by: user591315 on Aug 6, 2009 1:26 PMA couple of approaches;
* refresh the MV from a procedure in a pre map process operator (its an operator in a mapping), or
* call the procedure from a process flow activity before the map
Cheers
David -
Hi folks,
I am using a cascaded mapping in my OM. I have a graphical mapping followed by the Java mapping. It is a flat file to IDOC mapping. Everything works fine in Dev but when I transport the same objects to QA, the Operation mapping though it doesn't fail in ESR testing tool, gives the following message and there is no output generated for the same payload which is successfully tested in DEV. Please advise on what could be the possible reasons.
Unable to display tree view; Error when parsing an XML document (Premature end of file.)kalyan,
There seems to be an invalid xml payload which causes this error in ESR not generating the tree view. Please find the similar error screenshot and rectify the payload.
Mutti -
Creation of fast refresh materialized view
Hi,
I am creating fast refreshable materialized view.At that time i am getting error message
ORA-12052: cannot fast refresh materialized view OPS$QDW.EMP_DEPT_MV
I created log's also on that tables(emp,dept)
Please Help me any body.
I am using oracle 8.1.7.4.0
below the scripts i created
CREATE MATERIALIZED VIEW LOG ON emp
tablesspace vijay_test
WITH ROWID
INCLUDING NEW VALUES
CREATE MATERIALIZED VIEW LOG ON DEPT
tablesspace vijay_test
WITH ROWID
INCLUDING NEW VALUES
CREATE MATERIALIZED VIEW emp_dept_mv
TABLESPACE vijay_test
BUILD IMMEDIATE
REFRESH FAST
ENABLE QUERY REWRITE
as
select e.ename,e.empno,e.deptno,d.loc from emp e, dept d
where e.deptno=d.deptnoIt will be possible to create a Materialised view with up to 20 tables, but you have to understand the restrictions on complex Materialised views with regards to fast refresh.
To help your understanding, refer to Materialized View Concepts and Architecture
<br>
Oracle Database FAQs
</br> -
JavaMapping in PI 7.1 Error:Unable to display tree view; Error when parsing
hi,
i get by testing in PI 7.1 (operation mapping) this ERROR:
"Unable to display tree view; Error when parsing an XML document (Content is not allowed in prolog.)"
this is my java-programm-code:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import com.sap.aii.mapping.api.StreamTransformation;
import java.io.*;
import java.util.Map;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
/*IMPORT statement imports the specified classes and its methods into the program */
/Every Java mapping program must implement the interface StreamTransformation and its methods execute() and setParameter() and extend the class DefaultHandler./
public class Mapping extends DefaultHandler implements StreamTransformation {
Below is the declaration for all the variables we are going to use in the
subsequent methods.
private Map map;
private OutputStream out;
private boolean input1 = false;
private boolean input2 = false;
private int number1;
private int number2;
private int addvalue;
private int mulvalue;
private int subvalue;
String lineEnd = System.getProperty("line.separator");
setParamater() method is used to store the mapping object in the variable
"map"
public void setParameter(Map param) {
map = param;
public void execute(InputStream in, OutputStream out)
throws com.sap.aii.mapping.api.StreamTransformationException {
DefaultHandler handler = this;
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser saxParser = factory.newSAXParser();
this.out = out;
saxParser.parse(in, handler);
} catch (Throwable t) {
t.printStackTrace();
As seen above execute() method has two parameters "in" of type
InputStream and "out" of type OutputStream. First we get a new instance
of SAXParserFactory and from this one we create a new Instance of
SAXParser. To the Parse Method of SaxParser, we pass two parameters,
inputstream "in" and the class variable "handler".
Method "write" is a user defined method, which is used to write the
string "s" to the outpurstream "out".
private void write(String s) throws SAXException {
try {
out.write(s.getBytes());
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startDocument() throws SAXException {
write("");
write(lineEnd);
write("");
write(lineEnd);
public void endDocument() throws SAXException {
write("");
try {
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startElement(String namespaceURI, String sName, String qName,
Attributes attrs) throws SAXException {
String eName = sName;
if ("".equals(eName))
eName = qName;
if (eName.equals("NUMBER1"))
input1 = true;
if (eName.equals("NUMBER2"))
input2 = true;
public void endElement(String namespaceURI, String sName, String qName)
throws SAXException {
String eName = sName;
if ("".equals(eName))
eName = qName;
if (eName.equals("NUMBER1"))
input1 = false;
if (eName.equals("NUMBER2"))
input2 = false;
public void characters(char[] chars, int startIndex, int endIndex)
throws SAXException {
String dataString = new String(chars, startIndex, endIndex).trim();
if (input1) {
try {
number1 = Integer.parseInt(dataString);
} catch (NumberFormatException nfe) {
if (input2) {
number2 = Integer.parseInt(dataString);
if (input2 == true) {
addvalue = number1 + number2;
mulvalue = number1 * number2;
subvalue = number1 - number2;
write("" + addvalue + "");
write(lineEnd);
write("" + mulvalue + "");
write(lineEnd);
write("" + subvalue + "");
write(lineEnd);
in developer studio 7.1 i dont get error.
this happens by testing the mapping-programm in ESR.
can somebody help me please?Make sure that the xml created out after the java mapping is a valid xml with only one root node.
Regards,
Prateek
Maybe you are looking for
-
Just updated WD Drive Utilities - now all my WD external disks have vanished from desktop
I have just been using one of my 4TB My Book external disks on a MacBook AIR running 10.10.4All well and good. Only 1 installed at a time using the USB port. But the system told me there is a WD update so I installed it. Immediately after installing
-
Badi or user exit for allocation run (J3AT)
hi friends, we r using the SAP AFS in that i need to put the sales order value check for F status material while saving the allocation run. for that i need the badi or user exit where i will get the values of all the F status mateial before i save th
-
Can you share playlists on iTunes with other computers?
I recently started to share my iTunes library across all my home computers. I have my main libray shared and can view all the music entries. Now I wanted to see if I could share playlists already compiled among these computers.
-
I'm having a problem passing variables from one module to another via an interface. I have an application that calls a module when it enters a specific state, which works fine. The module is loaded through <mx:ModuleLoader id="modMyModule1" url="myMo
-
Is it that Firefox is not compatible with skype it seem to install ok but won't launch.
The website Skype.com came up ok i created my username and password ok as well then went to download that also seem to went smoothly. Now the icon for skype is sitting on my desktop but i cannot seem to get it to launch where i can make calls plus th