Materialized view refresh and rollback segment

Hi all,
maybe this is a dumb question but:
We use a few materialized views (partitioned, on prebult tables) in our DB.
The refresh method used is complete.
Every refresh clears old data et the very beginning and leaves the table empty until new data is commited (can take up to 2 hrs). But what is use of specifying the rollback segment than?
I would like to change this behaviour to keep the old data to the very moment of replacing with new one.
Is there a way?
Thanks a lot
Petr

Hi all,
maybe this is a dumb question but:
We use a few materialized views (partitioned, on prebult tables) in our DB.
The refresh method used is complete.
Every refresh clears old data et the very beginning and leaves the table empty until new data is commited (can take up to 2 hrs). But what is use of specifying the rollback segment than?
I would like to change this behaviour to keep the old data to the very moment of replacing with new one.
Is there a way?
Thanks a lot
Petr Oracle will truncate the MV and then effectively insert as select to populate your MV. In doing so
Oracle needs to keep a read consistent view of the select it is executing. Here clearly you might consider specifying a specific rbs.
Have you considered fast refresh or is this not a candidate? At least with fast refresh you won't have to compeletly rebuild the mv each time and it will be considerably faster.
steve

Similar Messages

  • Materialized View Refresh and I_SNAP$ Indexes issue

    At the time of doing REFRESH of the Materialized View, we are getting error like -
    SQL> EXECUTE DBMS_MVIEW.REFRESH('MV_TEST.MY_VIEW,'CF');
    BEGIN DBMS_MVIEW.REFRESH('MV_TEST.MY_VIEW,'CF'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-00001: unique constraint (MV_TEST.I_SNAP$_FIN_RESULT_EXPENSE1) violated
    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
    I tried to drop and recreate the index I_SNAP$_FIN_RESULT_EXPENSE1 but it didn’t helped.
    Later I dropped the index I_SNAP$_FIN_RESULT_EXPENSE1 and refreshed the materialized view and it was successful (obvious). But when I tried to recreate the index, I got the following error –
    SYS_OP_MAP_NONNULL("FIN_MULT"), SYS_OP_MAP_NONNULL("FIN_CD"))
    ERROR at line 8:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    When I look at the value of SYS_OP_MAP_NONNULL('FIN_CD'), it seems to be unique.
    SQL> select SYS_OP_MAP_NONNULL('FIN_CD') from dual;
    SYS_OP_MAP_NONNULL('FIN_CD’)
    46494E5F5650545F4C564C5F335F434400
    My questions are:
    1.     Why are the indexes (I_SNAP$_*) automatically created for?
    2.     What is the purpose of these (I_SNAP$_*) indexes?
    3.     What harm can be there if we drop these (I_SNAP$_*) indexes?
    4.     Why it is complaining about the Duplicate records / Uniqueness?
    5.     How to know where exactly the problem is in this case?
    6.     What is the solution for this problem? How to recreate these indexes successfully?
    Thanks!

    This forum is for the OLAP Option (which supports a cool featured called cube-organized materialized views). If this question if about table-based materialized views you should post it the General Oracle Database forum. Good luck.

  • Materialized view (creating and complete refresh)

    Good day.
    I have a huge query that is used to create a materialized view. The query consist of 9 joins, a lot of aggregations, some subqueries, so we can say it is rather huge. The query itself executes for about 30 seconds and returns about 200 rows. The materialized view creates and refreshes for more than 30 minutes. Can someone please explain me the mechanism of materialized view creation which causes such bad performance.
    We use Oracle Database 9.2.0.4.
    Thank you in advance.

    I've fount the solution. May be it will be useful for someone not regarding that 9.2 database is less used today than 10.2.
    I studied carefully the plan of the query and the plan of insert statement that is used when creating materialized view and found the cause of trouble. Insert statements generates VIEW PUSHED PREDICATE and BITMAP CONVERSION FROM ROWIDS when parsing. Bitmap conversion can be removed by setting environment parameter btree_bitmap_plans to false (a well-known issue), but I decided not ot change the production environment. The pushed predicate can be removed by using hint NO_PUSH_PRED to each subquery used in a materialized view. This step reduced the time of materialized view creation and execution to about a minute.
    Thank everyone who tried to help.

  • 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

  • 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

  • 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.
    $                                                                   

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

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

  • 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

  • Materialized view Refresh

    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 advices

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

  • 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

  • Materialized View Refresh fails

    Hi Colleagues,
    trying to refresh a MV using this:
    SQL> exec DBMS_MVIEW.REFRESH ('HR_ASSIGNMENT_L1_L2_DATA_V_MV', 'C');
    BEGIN DBMS_MVIEW.REFRESH ('HR_ASSIGNMENT_L1_L2_DATA_V_MV', 'C'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-00913: too many values
    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
    thanks

    Hi,
    kindly check the sql and list of columns (number) which mismatches and then carry out the refresh.
    - Pavan Kumar N

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

    Important 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

Maybe you are looking for

  • Executing a stored procedure containing multiple Select statements

    Post Author: Beverly CA Forum: General I am using Crystal  10.0 against a MS SQL 2000 server. I am trying to create a report based on a stored procedure that contains multiple select statements.  The sp requires a single parameter (Claim number) and

  • Creative Cloud problems since Mavericks update

    Hi Has anyone else had problems using Adobe Creative Cloud since upgrading to Mavericks? I have a Mac Pro at work and everything runs smoothly on that but my 2nd license on my home iMac doesn't work properly. Photoshop won't open and constantly freez

  • Excel doc as email attachment

    Hi Experts Hope you guys are doing fine. I have a requirement where i need to send the internal table data as an excel email attachment.I used the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1',but in the email attachment,the data is getting distorted and not co

  • Additional condition for document splitting  for general ledgers

    Hello, I need to add another condition in GL, to split invoice by KBLNR. Is there any program  that will adjust system to do this? I mean to expand FAGL* tables, and enable this condition (KBLNR) to be used in customising document splits of GL in SPR

  • Trying to reopen a secure pdf that requires a PW

    cant remember the password for a secure pdf  file that i received from statefarm insurance .  when they sent me email , it had an attachment , and when i went to open , which was a pdf , it said this is a secure document and i needed a PW . did that