Materializev View Refresh error ?

Pls help me slove this problem :
SQL> EXECUTE DBMS_REFRESH.REFRESH ('ABC_REFG');
BEGIN DBMS_REFRESH.REFRESH ('ABC_REFG'); END;
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-12096: error in materialized view log on "CBA"."TMP_XXX"
ORA-00942: table or view does not exist
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

It's look that you have problem with reading from materialized view log on master site.
Check if mlog for you master table on master site exists.
If you have changed master table you maybe must drop and create mlog on master site.

Similar Messages

  • Materialed View Refresh Error ORA-12008: error in materialized view refresh

    Hi,
    I am trying to refersh the following materialized view with the below command and getting the below error
    begin
    DBMS_MVIEW.REFRESH('GLVW_MIS_ADB');
    end;
    The following error has occurred:
    ORA-12008: error in materialized view refresh path
    ORA-12840: cannot access a remote table after parallel/insert direct load txn
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
    ORA-06512: at line 2
    Please advice on this.
    Thanks & Regards,
    Kartik

    $ oerr ora 12840
    12840, 00000, "cannot access a remote table after parallel/insert direct load txn"
    // *Cause: Within a transaction, an attempt was made to perform distributed
    // access after a PDML or insert direct  statement had been issued.
    // *Action: Commit/rollback the PDML transaction first, and then perform
    // the distributed access, or perform the distributed access before the
    // first PDML statement in the transaction.
    $                                                                   

  • 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,
    Indu

    Hi,
    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

  • 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 help

    Hello,
    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/

  • 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 PM

    Query 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

  • About Refresh Error In Materialized view

    hi
    i have
    Oracle 9.2.0.1 at the windows server 2003
    i have created some materialized view to use in my one web application running on tomcat
    i have scheduling for refresh it using refresh utility available in oracle materialized view snapshot refresh
    but when its try to run state of refresh become unusable and table according to it
    remains empty
    when i try to do it manually it gives error log
    Ora-12008 error in materialized view refresh path
    ora-01114 io error writing block to file 201(block #2621321)
    ora-27069 skgfdisp:attmempt to do i/o beyond the range of file
    osd-04026 invalid parameter passed(OS 2621327)
    ora-01114 io error writing block to file 201(block#2621321)
    ora-27069 skgfdisp:attempt do i/o beyond the range of the file
    osd-04026 invalid parameter passed (OS 2621327)
    ora 06512 at "SYS.DBMS_SNAPSHOt",line 794
    ora 06512 at "SYS.DBMS_SNAPSHOt", line 851
    ora 06512 at "SYS.DBMS_SNAPSHOt", line 832
    ora 06512 at line 2
    even i could not understand this error
    one strange thing in this when i restart my server and try to refresh
    it is going to be refresh
    please help me

    I suspect one of your datafiles has exceeded the 4Gb windows limit. Your tablespace has probably been set to autoextend and this has created the problem. I am not sure what you can do at this point apart from recover from backup. I would open a TAR with Oracle Support as soon as possible to try and resolve this issue.
    Please note: This forum is for OLAP issues only. If you need more information I would try posting on the database forum.
    Keith Laker
    Oracle EMEA Consulting
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • ORA-12008: error in materialized view refresh path in 10g

    Hi, all.
    The database is on 10gr2.
    I am testing materized view refresh.
    However, I got the following errors.
    exec dbms_refresh.refresh('"STGFAB"."MV_OPTION_TEST_HO1"');
    ORA-12008: error in materialized view refresh path
    ORA-01008: not all variables bound
    ORA-02063: preceding line from L8ZFAB
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Thanks in advance.
    Best Regards.

    Subject:      Materialized View Refresh Fails on Second Attempt With ORA-01008 'Not All Variables Bound' Error
         Doc ID:      Note:472261.1      Type:      
    --MM                                                                                                                                                                                                                                                                                                           

  • 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

  • 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,
    Muthu

    Hello 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

  • Error: ORA-12008: error in materialized view refresh path

    Hello Dba' s
    We are on 12.0.6 EBS with 10.2.0.5 DB on Sun solaris SPARC 64 bit.
    We are getting below error while Refreshing Materialized View.
    Start of log messages from FND_FILE
    Error: ORA-12008: error in materialized view refresh path
    ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], [] Occured while Refreshing Materialized View
    End of log messages from FND_FILE
    Not sure how to proceed.We have just upgraded our database from 10.2.0.3 to 10.2.0.5.
    Also we still have our test instance with 10.2.0.3 database ,there refreshing MV completed successfully.
    Also refreshing through TOAD gives below error:-
    BEGIN
    DBMS_SNAPSHOT.REFRESH(
    LIST => 'XXPPL.XXPPL_OPM_TRANSACTIONS_MV'
    ,PUSH_DEFERRED_RPC => TRUE
    ,REFRESH_AFTER_ERRORS => FALSE
    ,PURGE_OPTION => 1
    ,PARALLELISM => 0
    ,ATOMIC_REFRESH => TRUE
    ,NESTED => FALSE);
    END;
    Error at line 2
    ORA-12008: error in materialized view refresh path
    ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
    ORA-06512: at line 2
    Please advice.
    Thanks,
    Edited by: user12209274 on Nov 23, 2010 2:10 AM

    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

  • 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 AM

    Hi
    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                          |       |            |          |                                                                                                                                                                                                                                                                                                                                                                                                     

  • How can I debug dbms_jog error( MV refresh error)  in 10g??

    Hi all.
    The database is 10g.
    I created a job by usning the following query for MV refresh.
    ALTER MATERIALIZED VIEW MV_OPTION_TEST_HO1
    REFRESH FAST
    START WITH SYSDATE+30/86400
    NEXT SYSDATE+10/86400;
    I can see the job in the DBA_JOBS dictionary.
    The refresh job is failing, and I would like to know the reason.
    How can I do this??
    Thanks in advance.
    Best Regards.

    Thanks damorgan.
    I have run the refresh job myself.
    But I got the following.
    ORA-12008: error in materialized view refresh path
    ORA-01008: not all variables boundThanks.
    Best Regards.
    10:52:13 SQL> EXEC dbms_refresh.refresh('"STGFAB"."MV_OPTION_TEST_HO3"');
    BEGIN dbms_refresh.refresh('"STGFAB"."MV_OPTION_TEST_HO3"'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-01008: not all variables bound
    ORA-02063: preceding line from L8ZFAB
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Message was edited by:
    user507290
    Message was edited by:
    user507290

  • MVIEW Refresh Error

    I have a materialized view "pro_mview",
    I am trying to refresh the MVIEW by using the following statement.
    EXEC DBMS_MVIEW.REFRESH('pro_mview','C');
    But I am getting the below error.
    Error at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
    ORA-06512: at line 1
    I am able to fetch the data from that materialized view(pro_mview).
    Please help me how to overcome this problem.
    Thanks in advance.

    Hi,
    SQL> execute DBMS_SNAPSHOT.REFRESH_ALL;
    http://www.databasejournal.com/features/oracle/article.php/2200191/Manually-Refreshing-Materialized-Views-and-Creating-Refresh-Groups-in-Oracle.htm
    Regards
    Hitgon

Maybe you are looking for

  • How to place an image on the dashboard in obiee 11.1.1.5  version

    Hi All, I am using obiee 11.1.1.5.I want to place an image on the dashboard.Can anyone help me on how to achieve this. Thanks, Praful

  • Zen micro-music library. songs in alphabetical or

    Weneva i put music on it, its all stored in alphabetical order of the song title and not the artist. how do i change this? this might not be the best thread youve ever read but i need help on it. so please reply

  • SPROXY interface

    Hi  Evrybody, I need information regarding SPROXY OUTBOUND INTERFACE. Like wht is this interface about, y v use proxy, how to create proxy , where shall v do coding  in this scenario, how shall v push data to the other SAP Flavour. IF any pointers pl

  • XI Won't Export to Excel 2003

    We have Crystal Reports XI R1 in our .NET application. We are able to export our reports to Excel version 2002 or earlier but can't export to Excel 2003. Is there a patch or a workaround?

  • Subscript error on export

    I have a report that has a two formulas that splits the name of an individual into two seperate fields.  First Name and Last Name.  Example.. Name = Doe, John M Formula fname = Split((Split({tablename.NAME}, ",")[2]), " ")[1] Formula lname = Split ({