Materialized view not properly refreshing

Hi,
As materialized view is not refreshing properly. we compare the sum of hashcode materialized view with the sum of hash code of the base view or table the materialized view is defined. If it's found equal then materialized view got refreshed succesfully else not.
But in below example the column value is interchanged in between the row eventhough hashcode is same.
Is there any other way to find the materialized view got refreshed successfully or not.
SQL> create table temp as select object_name, subobject_name from user_objects where rownum<3;
Table created
SQL> select * from temp;
OBJECT_NAME SUBOBJECT_NAME
ATP_BN_I_1
ATP_START_END_DATE_I_2
SQL> create materialized view mv1 as select * from temp;
Materialized view created
SQL> select * from mv1;
OBJECT_NAME SUBOBJECT_NAME
ATP_BN_I_1
ATP_START_END_DATE_I_2
SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
SUM(NVL(ORA_HASH("OBJECT_NAME"
4852176374
SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
SUM(NVL(ORA_HASH("OBJECT_NAME"
4852176374
SQL> UPDATE TEMP SET OBJECT_NAME=SUBOBJECT_NAME,SUBOBJECT_NAME=OBJECT_NAME;
2 rows updated
SQL> COMMIT;
Commit complete
SQL> select * from mv1;
OBJECT_NAME SUBOBJECT_NAME
ATP_BN_I_1
ATP_START_END_DATE_I_2
SQL> select * from temp;
OBJECT_NAME SUBOBJECT_NAME
ATP_BN_I_1
ATP_START_END_DATE_I_2
SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from MV1;
SUM(NVL(ORA_HASH("OBJECT_NAME"
4852176374
SQL> select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp;
select sum(nvl(ora_hash("object_name"||"subobject_name"),0)) from temp
ORA-00904: "subobject_name": invalid identifier
SQL> select sum(nvl(ora_hash("OBJECT_NAME"||"SUBOBJECT_NAME"),0)) from temp;
SUM(NVL(ORA_HASH("OBJECT_NAME"
4852176374
Any help really appreciated.
Thanks in advance.

unique wrote:
Is there any other way to find the materialized view got refreshed successfully or not.You can look at the last_refresh_date and staleness columns of all_mviews: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1105.htm#REFRN20139
Or maybe use the all_mview_refresh_times view: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1104.htm#sthref1068
Regards,
Rob.

Similar Messages

  • Materialized view not fast refreshable

    I need to calculate a moving total in a materialized view - that is, calculate subtotal for rows starting at current row up to the first row.
    I am using a window function, as shown below.
    The problem is, MVs using window functions are not fast refreshable, and I need this MV to be fast refreshable.
    Is there any other way of getting the moving total without using a window function?
    CREATE MATERIALIZED VIEW BIL_BI_OPDTL_MV_11_TST
    --REFRESH FAST ON DEMAND
    AS
    SELECT
    fact.txn_time_id txn_time_id
    , fact.effective_time_id close_time_id
    , prntmv.parent_group_id
    , jgd.parent_group_id sales_group_id
    , fact.lead_id
    , fact.opp_open_status_flag
    , fact.win_loss_indicator
    , fact.forecast_rollup_flag
    ,fact.rev_flag1
    , SUM(fact.rev_flag1) OVER (PARTITION BY
    fact.effective_time_id , prntmv.parent_group_id
    , fact.lead_id, fact.opp_open_status_flag, fact.win_loss_indicator, fact.forecast_rollup_flag
    , to_number(to_char(opty_creation_date,'J'))
    , to_number(to_char(opty_conversion_date,'J'))
    ORDER BY fact.lead_id
    ROWS UNBOUNDED PRECEDING) moving_total
    , to_number(to_char(opty_creation_date,'J')) opty_creation_time_id
    , to_number(to_char(opty_conversion_date,'J')) opty_conversion_time_id
    ,count(*) cnt
    FROM bil.bil_bi_opty_ld_f_tst fact, bil_bi_rs_grp_mv rgmv, bil_bi_rs_grp_mv prntmv,
    jtf.jtf_rs_groups_denorm jgd
    WHERE rgmv.sales_group_id = fact.sales_group_id
    and rgmv.salesrep_id = fact.salesrep_id
    AND fact.sales_group_id = jgd.group_id
    AND prntmv.sales_group_id = jgd.parent_group_id
    AND prntmv.umarker in ('top_groups', 'groups')
    AND jgd.active_flag='Y'
    group by
    fact.txn_time_id,
    fact.effective_time_id
    , prntmv.parent_group_id
    , jgd.parent_group_id
    , fact.lead_id
    , fact.opp_open_status_flag
    , fact.win_loss_indicator
    , fact.forecast_rollup_flag
    , fact.rev_flag1
    , to_number(to_char(opty_creation_date,'J'))
    , to_number(to_char(opty_conversion_date,'J'))

    Please post your question at
    General Database Discussions
    for faster response

  • Materialized View not getting refreshed

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    I am having a situation here..there a materialized view named mv_empdept,the base table of this MV is located on a remote database.Therefore the MV creation scripti contains a DB link.
    Please find the script below.
    Select Deptno,dept_name,empno,ename,DOB,Job
    from [email protected];
    The refresh mode of this MV is set as FAST,and the refresh cycle is scheduled through Oracle Job.
    The job does get triggerd but from the log we found this error.
    The error message is:ORA-12008: error in materialized view refresh path
    ORA-01461: can bind a LONG value only for insert into a LONG column.
    I even checked at the source Db and found that there is no mismatch as far datatype and datalength is concerned.
    Strangely when i do a manual Complete refresh of the same MV the data does gets populated in mv_empdept snapshot.
    Can anybody explain me the why the data is not getting populated in FAST refresh mode.
    Your help is highly appreciated.
    ---Vineet

    Read the following...
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96567/repmview.htm
    and analyze the restrictions of Fast Refresh in your situation.

  • Order by in MATERIALIZED VIEW not work successfully with first column (ID)

    Dears,
    I am trying to create a Materialized View as below:
    CREATE MATERIALIZED VIEW HR.MV_EMP
    PCTFREE 10
    MAXTRANS 255
    TABLESPACE users
    STORAGE (
    INITIAL 65536
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUILD IMMEDIATE
    REFRESH ON DEMAND
    AS
    SELECT *
    FROM employees
    where rownum < 5000 order by employee_id desc ;But while querying the MATERIALIZED VIEW, it did not work successfully as the data did not appear in the accurate order.
    I tried to create the same MATERIALIZED VIEW but order by another column (Column Date), it worked successfully and the data appeared in the accurate order.
    It means that MATERIALIZED VIEW not work successfully with the first column (id).
    Can you please help me in this ?
    Thanks & regards,,

    A few pointers :
    1. As has been pointed out, the ROWNUM has been incorrectly placed. ROWNUM values are assigned as rows are fetched from the source before the ORDER BY. You need to ORDER BY first (in a SubQuery) and then ROWNUM afterwards (outside the SubQuery).
    2. I wonder why you want only the last 5000 EMPLOYEE_IDs. What if Employee_ID 1 is still an active employee (he is the founder, first employee and CEO ?). There could be very many "low" EMPLOYEE_IDs that are still active.
    3. Logically I would expect some filter other than the ROWNUM ... ORDER BY to be used to select candidate rows. Then, an ORDER BY in the CREATE query would be unnecessary.
    4. When querying the Materialized View you must explicitly ORDER BY (irrespective of whether you did or did not do an ORDER BY in the CREATE ...)
    5. How do you expect to refresh the MV ? Will it always be a COMPLETE Refresh ? Remember that your "5000 employees" filter would likely exclude older employees at the next refresh. If you use some other filter, it should be consistent across all refreshs.
    Hemant K Chitale

  • Materialized views  not updating

    I'm having trouble with getting a materialized view with fast refresh to update. I'm working between two schemas and have the global query rewrite privilege for both users. I've run the catrep.sql script to make sure it had been run and find that it has a lot of packages that don't compile, which I guess is expected as I'm not using Advanced Replication. I think the problem is that I can't get the dbms_snapshot package to compile so can't even update the view manually. Is there another script I need to run to make the materialized views work? Some other privilege or variable?
    I've granted permissions on tables, views, materialized views, triggers, and snapshots to both users.
    The log does get entries but never sends them to the views.
    I have a base table and a log on the table in schema 1.
    I have a materialized view in schema 2:
    create materialized view log on schema1.document
    tablespace app_mview
    with primary key
    ( list columns needed);
    create materialized view schema2.doc_mv
    pctfree 0
    tablespace app_mview
    storage (initial 128k next 128k pctincrease 0)
    refresh fast
    start with sysdate
    next sysdate + 1/1440
    as select * from schema1.document
    Does anyone know where my problem might be?
    thanks for any help

    I have temporary parameters, not in itit.ora but echoing the job_queue_processes is 10, job_queue_interval is 60.
    a sho err returns no errors.
    earlier I did not get anything new in dba_errors when trying to compile. Since I've rerun the catrep.sql I'm getting pls-00201 - identifier must be declared for a lot of dbms_snap, sys.dbms_alert, dbms_reputil2 etc. (package, package body, and trigger types) That is why I think there must be another script that should be run that I don't know about.
    I can't do a full refresh because the dbms_snapshot package will not compile. I believe it's possible that both full and fast will work once I get the dbms_snapshot package working.
    thanks for your help
    pat

  • Query against materialized view awful after refresh of Mview

    We have a materialized view defined to refresh complete daily at 5am. YOu can run queries against the MV alone or joining it to other tables. Results come back in 2 or 3 seconds. Once the MView refreshes at 5am - those same queries now take 15 minutes or even more sometimes to complete. WHY IS THIS HAPPENING?? Help anyone?

    okay this is better... sorry...
    this is the GOOD EXPLAIN PLAN:
    PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                                                      
    | Id  | Operation                         |  Name             | Rows  | Bytes | Cost  |                                                                                                                                                                                                
    |   0 | SELECT STATEMENT                  |                   |     1 |   127 |  1665 |                                                                                                                                                                                                
    |   1 |  SORT AGGREGATE                   |                   |     1 |   127 |       |                                                                                                                                                                                                
    |   2 |   NESTED LOOPS                    |                   |     1 |   127 |  1665 |                                                                                                                                                                                                
    |   3 |    NESTED LOOPS                   |                   |     1 |   113 |  1664 |                                                                                                                                                                                                
    |   4 |     NESTED LOOPS                  |                   |     1 |    99 |  1663 |                                                                                                                                                                                                
    |   5 |      NESTED LOOPS                 |                   |     1 |    88 |  1662 |                                                                                                                                                                                                
    |*  6 |       HASH JOIN ANTI              |                   |     1 |    70 |  1661 |                                                                                                                                                                                                
    |*  7 |        TABLE ACCESS BY INDEX ROWID| CONTACT           |  3815 |   201K|  1534 |                                                                                                                                                                                                
    |   8 |         AND-EQUAL                 |                   |       |       |       |                                                                                                                                                                                                
    |*  9 |          INDEX RANGE SCAN         | IDX_CNT__C_STATE  |       |       |       |                                                                                                                                                                                                
    |* 10 |          INDEX RANGE SCAN         | IDX_CNT__STATUS   |       |       |       |                                                                                                                                                                                                
    |  11 |        INDEX FAST FULL SCAN       | PK_RPP            | 69277 |  1082K|   120 |                                                                                                                                                                                                
    |* 12 |       TABLE ACCESS BY INDEX ROWID | REP_PROFILE       |     1 |    18 |     1 |                                                                                                                                                                                                
    |* 13 |        INDEX UNIQUE SCAN          | PK_C19            |     1 |       |       |                                                                                                                                                                                                
    |* 14 |      INDEX UNIQUE SCAN            | PK_B01            |     1 |    11 |       |                                                                                                                                                                                                
    |* 15 |     INDEX UNIQUE SCAN             | PK_B02            |     1 |    14 |       |                                                                                                                                                                                                
    |* 16 |    INDEX UNIQUE SCAN              | PK_RCN            |     1 |    14 |       |                                                                                                                                                                                                
    Predicate Information (identified by operation id):                                                                                                                                                                                                                                    
       6 - access("B"."CONTACT_ID"="RPP"."PARTNERSHIP_ID")                                                                                                                                                                                                                                 
       7 - filter("B"."C_STATE"='GA' AND "B"."C_LAST"<>'Name Unknown' AND                                                                                                                                                                                                                  
                  "B"."STATUS"='Confirmed')                                                                                                                                                                                                                                                
       9 - access("B"."C_STATE"='GA')                                                                                                                                                                                                                                                      
      10 - access("B"."STATUS"='Confirmed')                                                                                                                                                                                                                                                
      12 - filter("C19"."TERR1"='46')                                                                                                                                                                                                                                                      
      13 - access("B"."CONTACT_ID"="C19"."CONTACT_ID")                                                                                                                                                                                                                                     
      14 - access("B"."FIRM_ID"="B01"."FIRM_ID")                                                                                                                                                                                                                                           
      15 - access("B"."OFFICE_ID"="B02"."OFFICE_ID")                                                                                                                                                                                                                                       
      16 - access("B"."CONTACT_ID"="RCN"."CONTACT_ID")                                                                                                                                                                                                                                     
    Note: cpu costing is off                                                                                                                                                                                                                                                               
    38 rows selected.

  • Materialized View Not Refreshing

    Hello,
    I have a materialized view that is not refreshing. I tried to set it to refresh it every 24 hours by specifying the following:
    REFRESH COMPLETE START WITH sysdate+0 NEXT sysdate+1
    The database modified it to be:
    REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT sysdate+1
    I'm not sure why this materialized view is not being refreshed. Here is the full DDL for the view:
    CREATE MATERIALIZED VIEW "MBMMASTER"."CLINIDXINVTRANSDATA"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "FAC_DATA"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT sysdate+1
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS SELECT
    IIT.Group_ZZ as IDXGroupKey
    , IIT.Prov as IDXProviderKey
    , IIT.U_Second_Phys as IDXSecondaryProviderKey
    , IIT.Div as IDXDivisionKey
    , IIT.Loc as IDXLocationKey
    , IIT.Billing_Area as IDXBillingAreaKey
    , IIT.Proc as IDXProcedureKey
    , IIT.Post_pd as IDXPostPeriod
    , Max(CASE
    WHEN SIBP.FacultyPK is Null Then PIBP.FacultyPK
    WHEN EXISTS (
    SELECT *
    FROM FacultyAdmin.FacAdmAppointment APP
    WHERE SIBP.FacultyPK = APP.FacultyPK
    AND APP.AdmApptTypePK = 'APT0001021' /* MidLevel Track */
    AND APP.AdmRankListPK = 'RKL0001141' /* MidLevel Rank */
    AND IIT.SER_DT BETWEEN APP.AdmApptStartDate AND NVL(APP.AdmApptEndDate,IIT.SER_DT)
    ) THEN SIBP.FacultyPK
    ELSE PIBP.FacultyPK
    END) AS FacultyPK
    , SUM(IIT.RVU
    ) as IDXRVU
    , SUM(
    CASE
    WHEN Sign(IIT.RVU) = Sign(IIT.RVU_WORK_COMP) THEN IIT.RVU_WORK_COMP
    ELSE IIT.RVU_WORK_COMP * -1
    END
    ) as IDXWorkRVU
    , SUM(
    CASE
    WHEN Sign(IIT.RVU) = Sign(IIT.RVU_EXPENSE_COMP) THEN IIT.RVU_EXPENSE_COMP
    ELSE IIT.RVU_EXPENSE_COMP * -1
    END
    ) as IDXExpenseRVU
    , SUM(
    CASE
    WHEN Sign(IIT.RVU) = Sign(IIT.RVU_MALPRATICE_COMP) THEN IIT.RVU_MALPRATICE_COMP
    ELSE IIT.RVU_MALPRATICE_COMP * -1
    END
    ) as IDXMalpracticeRVU
    FROM IDXInvTrans@DW IIT
    , FacultyMaster.FacIDXBARProvider PIBP
    , FacultyMaster.FacIDXBARProvider SIBP
    where IIT.Prov = PIBP.IDXBARProviderKey
    AND IIT.U_Second_Phys = SIBP.IDXBARProviderKey(+)
    AND IIT.pay_code_num = 99
    AND IIT.Post_Pd >= 10101
    GROUP BY
    IIT.Group_ZZ
    , IIT.Prov
    , IIT.U_Second_Phys
    , IIT.Div
    , IIT.Loc
    , IIT.Billing_Area
    , IIT.Proc
    , IIT.Post_pd;
    Thanks in advance,
    Chris

    I had quite similar problem/question. And un/fortunately answered it by myself, nobody was interested in help :)
    For the first sight: two "concurrent" statements have been used: ON DEMAND and START WITH. I wonder why database changed good code.
    Look into my topic: How to recreate materialized view and maintain priviledges?
    Look also here: Re: error on "CREATE MATERIALIZED VIEW" for more details.
    HTH, Rev

  • Materialized Views Not Refreshing

    I have created several materialized views and I am having a problem with them never refreshing even though their refresh times are specified in the create statement. Here is the SQL statement for one of them.
    create MATERIALIZED view autonomy_mvw
         nocache
         logging
         noparallel
         build immediate
         refresh complete
         start with to_date(sysdate,'dd-mon-yyyy hh24:mi:ss')
         next sysdate + 18/24
    as
         select c.contract_seq,
              c.contract_number contract,
    cast('' as VARCHAR2(1)) contract_mod,
              cast('' as VARCHAR2(1)) do,
              cast('' as VARCHAR2(1)) do_seq,
              cast('' as VARCHAR2(1)) do_mod_number,
              c.contract_number co_do,
              c.contract_name title,
              c.contract_remarks description,
              c.contract_effective_date award_date,
              to_char(c.contract_performance_end_date) originalpop,
              to_char(cont_perform_end_date(c.contract_seq)) currentpop,
              c.control_group controlgroup,
              c.fiscal_year_execution fy,
    c.quarter,
              nvl(CON_PENDING_ROLLUP_AMOUNT(c.contract_seq),0) pendingamt,
              nvl(CON_OBLIGATED_ROLLUP_AMOUNT(c.contract_seq),0) originalamt,
              cont_majcoms_comma(c.contract_seq) majcom,
    cont_installations_desc_comma(c.contract_seq) installation,
              case pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') when ', ' then 'Not Assigned'
              else pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') end     pm,
              case pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') when ', ' then 'Not Assigned'
              else pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'')     end cm,
              case pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') when ', ' then 'Not Assigned'
              else pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') end BCO,
              con.contractor_name contractor,
              c.contract_status status,
              cast('' as VARCHAR2(1)) active_status,
              nvl(c.prg_name,'Non Program') prg_name,
              c.funds_type fund_type,
              c.contract_instr_num
         from contract c,
              contractor con,
              cg_level cgl,
              poc_user_info pocPM,
              poc_user_info pocCM,
              poc_user_info pocBCO
         where c.contractor_number = con.contractor_number
         and c.control_group = cgl.control_group(+)
         and c.pm_seq = pocPM.poc_user_seq(+)
         and c.cm_seq = pocCM.poc_user_seq(+)
         and c.bco_seq = pocBCO.poc_user_seq(+)
         and c.contract_instr_num <> 'D'
         and c.contract_status in ('AC', 'NEW')     
         union
         select c.contract_seq,
              c.contract_number contract,
              cmod.contract_mod_num contract_mod,
              cast('' as VARCHAR2(1)) do,
              cast('' as VARCHAR2(1)) do_seq,
              cast('' as VARCHAR2(1)) do_mod_number,
              c.contract_number||'/'||cmod.contract_mod_num co_do,
              c.contract_name title,
              c.contract_remarks description,
              c.contract_effective_date award_date,
              to_char(c.contract_performance_end_date) originalpop,
              to_char(cont_perform_end_date(c.contract_seq)) currentpop,
              c.control_group controlgroup,
              cmod.fiscal_year_execution fy,
    cmod.quarter,
              nvl(cmod.contract_mod_committed_amt,0) pendingamt,
              nvl(cmod.afcee_oblig_contract_mod_amt, 0) originalamt,
              cont_majcoms_comma(c.contract_seq) majcom,
              cont_installations_desc_comma(c.contract_seq) installation,
              case pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') when ', ' then 'Not Assigned'
              else pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') end pm,
              case pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') when ', ' then 'Not Assigned'
              else pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') end cm,
              case pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') when ', ' then 'Not Assigned'
              else pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') end BCO,
              con.contractor_name contractor,
              c.contract_status status,
              cast('' as VARCHAR2(1)) active_status,
              nvl(c.prg_name,'Non Program') prg_name,
              c.funds_type fund_type,
              c.contract_instr_num
         from contract c,
              contract_modification cmod,
              contractor con,
              cg_level cgl,
              poc_user_info pocPM,
              poc_user_info pocCM,
              poc_user_info pocBCO
         where c.contract_seq = cmod.contract_seq
         and c.contractor_number = con.contractor_number
         and c.control_group = cgl.control_group(+)
         and c.pm_seq = pocPM.poc_user_seq(+)
         and c.cm_seq = pocCM.poc_user_seq(+)
         and c.bco_seq = pocBCO.poc_user_seq(+)
         and c.contract_instr_num <> 'D'
         and c.contract_status in ('AC', 'NEW')
         union
         select c.contract_seq,
              c.contract_number contract,
              cast('' as VARCHAR2(1)) contract_mod,
              do.do_number do,
              to_char(do.do_seq) do_seq,
              cast('' as VARCHAR2(1)) do_mod,
              c.contract_number||'-'||do.do_number co_do,
              do.do_title title,
              do.do_description description,
              do.afcee_obligated_do_date award_date,
              to_char(do.do_end_date) originalpop,
         to_char(do_mod_end_date(do.do_seq)) currentpop,
              do.control_group controlgroup,
              do.fiscal_year_execution fy,
    do.quarter,
              nvl(DO_PENDING_ROLLUP_AMOUNT(do.do_seq),0) pendingamt,
              nvl(DO_OBLIGATED_ROLLUP_AMOUNT(do.do_seq),0) originalamt,
    do_majcoms_comma(do.do_seq, null) majcom,
    do_installations_desc_comma(do.do_seq, null) installation,
              case pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') when ', ' then 'Not Assigned'
              else pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') end pm,
              case pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') when ', ' then 'Not Assigned'
              else pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') end cm,
              case pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') when ', ' then 'Not Assigned'
              else pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') end BCO,
              con.contractor_name contractor,
              do.do_status status,
              do.do_actv_status active_status,
              nvl(c.prg_name,'Non Program') prg_name,
              do_fundtypes_comma(do.do_seq,null) fund_type,
              c.contract_instr_num
         from delivery_order do,
              contract c,
              contractor con,
              cg_level cgl,
              poc_user_info pocPM,
              poc_user_info pocCM,
              poc_user_info pocBCO
         where do.contract_seq = c.contract_seq
         and c.contractor_number = con.contractor_number
         and do.control_group = cgl.control_group(+)
         and do.pm_seq = pocPM.poc_user_seq(+)
         and do.cm_seq = pocCM.poc_user_seq(+)
         and do.bco_seq = pocBCO.poc_user_seq(+)
         and do.do_status in ('CURR')
         and do.do_actv_status in ('RESV','ANTC','FORE','COMM','OBLG','FIN_INV')
         union
         select c.contract_seq,
              c.contract_number contract,
              ''contract_mod,
              do.do_number do,
              to_char(do.do_seq) do_seq,
              domod.do_mod_number do_mod,
              c.contract_number||'-'||do.do_number||'-'||domod.do_mod_number co_do,
              do.do_title title,
              domod.do_mod_description description,
              domod.afcee_obligated_do_mod_date award_date,
              to_char(do.do_end_date) originalpop,
    to_char(do_mod_end_date(do.do_seq)) currentpop,
              domod.control_group controlgroup,
              domod.fiscal_year_execution fy,
    domod.quarter,
              (nvl(domod.do_mod_committed_amount,0) + nvl(domod.reserved_amount,0)+ nvl(domod.anticipated_amount,0)
                   + nvl(domod.forecasted_amount,0)) pendingamt,
              (nvl(domod.afcee_obligated_do_mod_amount, 0)) originalamt,
    do_majcoms_comma(do.do_seq, domod.do_mod_number) majcom,
    do_installations_desc_comma(do.do_seq, domod.do_mod_number) installation,
              case pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') when ', ' then 'Not Assigned'
              else pocPM.last_name || ', ' || pocPM.first_name || nvl2(pocPM.mi,' '||pocPM.mi,'') end pm,
              case pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') when ', ' then 'Not Assigned'
              else pocCM.last_name || ', ' || pocCM.first_name || nvl2(pocCM.mi,' '||pocCM.mi,'') end cm,
              case pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') when ', ' then 'Not Assigned'
              else pocBCO.last_name || ', ' || pocBCO.first_name || nvl2(pocBCO.mi,' '||pocBCO.mi,'') end BCO,
              con.contractor_name contractor,
              do.do_status status,
              do.do_actv_status active_status,
              nvl(c.prg_name,'Non Program') prg_name,
              do_fundtypes_comma(do.do_seq,domod.do_mod_number) fund_type,
              c.contract_instr_num
         from delivery_order do,
              delivery_order_modification domod,
              contract c,
              contractor con,
              cg_level cgl,
              poc_user_info pocPM,
              poc_user_info pocCM,
              poc_user_info pocBCO
         where do.do_seq = domod.do_seq
         and do.contract_seq = c.contract_seq
         and c.contractor_number = con.contractor_number
         and do.control_group = cgl.control_group(+)
         and do.pm_seq = pocPM.poc_user_seq(+)
         and do.cm_seq = pocCM.poc_user_seq(+)
         and do.bco_seq = pocBCO.poc_user_seq(+)
         and domod.do_mod_status in ('CURR')
         and domod.do_mod_actv_status in ('RESV','ANTC','FORE','COMM','OBLG','DEOBLG','FIN_INV');
    As you can see, I cannot use the On Commit refresh method because I violate several of the requirements in order to use the On Commit refresh method. I do not have a materialized view logs.
    I did the following select from all_mviews:
    1 select
    2 MVIEW_NAME,
    3 UPDATABLE,
    4 UPDATE_LOG,
    5 REWRITE_ENABLED,
    6 REWRITE_CAPABILITY,
    7 REFRESH_MODE,
    8 REFRESH_METHOD,
    9 BUILD_MODE,
    10 LAST_REFRESH_TYPE,
    11 LAST_REFRESH_DATE,
    12 STALENESS
    13 from all_mviews
    14* where mview_name = 'AUTONOMY_MVW'
    MVIEW_NAME U UPDATE_LOG R REWRITE_C REFRES REFRESH_ BUILD_MOD LAST_REF LAST_REFR STALENESS
    AUTONOMY_MVW N N NONE DEMAND COMPLETE IMMEDIATE COMPLETE 17-NOV-05 STALE
    I then called the dbms_mview package to force a REFRESH on this view and then re-ran the above sql
    MVIEW_NAME U UPDATE_LOG R REWRITE_C REFRES REFRESH_ BUILD_MOD LAST_REF LAST_REFR STALENESS
    AUTONOMY_MVW N N NONE DEMAND COMPLETE IMMEDIATE COMPLETE 04-MAY-06 STALE
    I noticed that while it was refreshed it shows as stale.
    How do I get this materialized view (and my other ones) to refresh in a regular manner?
    Thanks
    Richard Anderson

    Here is what I got when I ran the sql you provided. BTW, I increased the substr size for the "Command" to 70 so I could see the whole thing. I have 6 materialized views in this instance but one of them has a compile_state of "ERROR" and so it doesn't show in the job queue. All the others show up.
    Job User Schem Last Date Next Date B Failed Command
    9 MXT MXT 04.05.2006 16:55 04.05.2006 17:55 N 0 dbms_refresh.refresh('"MXT"."PMR_CON_DO_REPORT_MVW"');
    51 MXT MXT 04.05.2006 16:55 04.05.2006 17:55 N 0 dbms_refresh.refresh('"MXT"."MIEN_FY_MV"');
    4 MXT MXT 04.05.2006 16:55 04.05.2006 17:55 N 0 dbms_refresh.refresh('"MXT"."PMR_ALL_STATUS_AMT_REPORT_MVW"');
    7 MXT MXT 04.05.2006 16:55 04.05.2006 17:55 N 0 dbms_refresh.refresh('"MXT"."PMR_AMOUNT_REPORT_MVW"');
    31 MXT MXT 04.05.2006 16:58 04.05.2006 17:28 N 0 dbms_refresh.refresh('"MXT"."PMR_TEST_MVW"');
    Rick Anderson
    PS, this list was run on my DEV server so it doesn't have the AUTONOMY_MVW at all but both my DEV and PROD instances are having the same issues.
    I downloaded Oracle SQL Developer and used it to look at the materialized views and they have a details tab which contained the following:
    "Name"     "Value"
    "OWNER"     "MXT"
    "MVIEW_NAME"     "PMR_AMOUNT_REPORT_MVW"
    "CONTAINER_NAME"     "PMR_AMOUNT_REPORT_MVW"
    "QUERY_LEN"     "31020"
    "UPDATABLE"     "N"
    "UPDATE_LOG"     ""
    "MASTER_ROLLBACK_SEG"     ""
    "MASTER_LINK"     ""
    "REWRITE_ENABLED"     "N"
    "REWRITE_CAPABILITY"     "NONE"
    "REFRESH_MODE"     "DEMAND"
    "REFRESH_METHOD"     "COMPLETE"
    "BUILD_MODE"     "IMMEDIATE"
    "FAST_REFRESHABLE"     "NO"
    "LAST_REFRESH_TYPE"     "COMPLETE"
    "LAST_REFRESH_DATE"     "04-MAY-06"
    "STALENESS"     "UNKNOWN"
    "AFTER_FAST_REFRESH"     "NA"
    "UNKNOWN_PREBUILT"     "N"
    "UNKNOWN_PLSQL_FUNC"     "Y"
    "UNKNOWN_EXTERNAL_TABLE"     "N"
    "UNKNOWN_CONSIDER_FRESH"     "N"
    "UNKNOWN_IMPORT"     "N"
    "COMPILE_STATE"     "VALID"
    "USE_NO_INDEX"     "N"
    Message was edited by:
    RichardAnderson

  • How to get a materialized view get to refresh itself after the job is "broken"

    we created a materialized view sometime ago with the following statement:
    create materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
    refresh complete on demand
    start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
    as
    select  sxv_emp_cert_all.*
    from    sxv_employee_certification_all sxv_emp_cert_all;
    this week we found out it had not been refresh for about a month
    In dba_jobs the column broken was 'Y', next_date time something like 01-01-4000 and failures 16
    when I ran it manually by executing
    BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
    I found that one of the columns was too small (probably a columns of one of the underlying tables had been extended since the creation of the materialized view)
    After fixing this I ussied yesterday (on 29-8-2013) the statement :
    alter materialized view SXV_PUB_EMPLOYEE_CERT_ALL_M
    refresh complete on demand
    start with to_date('30-08-2009 04:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate) + (28/24)
    after this the table dba_jobs showed me 30-08-2013 04:00:00 as next date
    I was expecting it to run this night at 04:00, but it didn't
    the last_date column value was still from about a month ago, the column broken still shows 'Y'
    and the next date 30-08-2013 04:00:00 (while it should been set to 31-08-2013 01:00:00
    Rrunning
    BEGIN DBMS_MVIEW.REFRESH('SXV_PUB_EMPLOYEE_CERT_ALL_M', 'C'); END;
    gave no errors this time
    and in User_Mview_Analysis the last_refresh_date column showed the date/time I had executed it
    Any idea how to get the job "unbroken" again so that the view refreshes itself every night?
    the database is Oracle Database 10g Release 10.2.0.4.0
    regards,
    Remco

    thanx for all your helpful and correct answers . but eventually I found it myself
    exec dbms_job.broken(<jobnumber>, false);

  • Issue with materialized view and fast refresh between Oracle 10g and 11g

    Hi all,
    I've hit a problem when trying to create a fast-refreshable materialized view.
    I've got two databases, one 10.2.0.10, another 11.2.0.1.0, running on 32-bit Windows. Both are enterprise edition, and I'm trying to pull data from the 10g one into the 11g one. I can happily query across the database link from 11g to 10g, and can use complete refresh with no problem except the time it takes.
    On the 10g side, I've got tables with primary keys and m.v. logs created, the logs being of this form ...
    CREATE MATERIALIZED VIEW LOG ON table WITH PRIMARY KEY INCLUDING NEW VALUES
    On the 11g side, when I try to create an m.v. against that ...
    CREATE MATERIALIZED VIEW mv_table REFRESH FAST WITH PRIMARY KEY AS SELECT col1, col2 FROM table@dblink;
    ... I get an ORA-12028 error (materialized view type is not supported by master site).
    After running the EXPLAIN_MVIEW procedure it shows this;
    REFRESH_FAST_AFTER_INSERT not supported for this type mv by Oracle version at master site
    A colleague has managed to build a fast-refresh m.v. from the same source database, but pulling to a different one than I'm using; his target is also 10g, like the (common) source, so I've no idea why I'm getting the 'not supported' message whilst he isn't.
    I've been able, on previous projects, to do exactly what I'm trying to achieve but on those someone with more knowledge than me has configured the database!
    I'm now stumped. I'm also no DBA but despite that it's been left to me to install the new 11g database on the 32-bit Windows server from scratch, so there are probably a couple of things I'm missing. It's probably something really obvious but I don't really know where to look now.
    If anyone can give me any pointers at all, I'd be really grateful. This question is also duplicated in the Replication forum but hasn't had any replies as yet, so I'm reproducing it here in hope!
    Thanks in advance,
    Steve

    Hi Steve,
    You should have a look at metalink, Doc ID 1059547.1
    If that does not help, there may be something else in Mater note ID 1353040.1
    Best regards
    Peter

  • Update sequence wrong in Materialized view when using refresh group

    Hi,
    I made a trigger (for each row) on a materialized view(replication data from a master table in in a different database), which is refreshed by a refresh group (exec dbms_refresh.refresh('"...). However, the update order/sequence is important and must be handled (by the trigger) in the same order how the updates where done in the master table. Unfortunately the updates in the materialized view are NOT in the same order. The trigger is fired in a wrong order.
    I am using database version 10.2.0
    Does anybody reconize this problem, Is there a solution for this problem ( with keeping the refresh group mechanisme)?
    Thanks
    Regards
    Jurn

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

  • Materialized view - parameter and refresh

    Hi,
    We are creating a Materialized view that has 2 rows for a CCID, one for this year and one for previous year with balances in 12 buckets.
    We have 2 questions:
    1. Can a materialized view be created with a parameter? or it can only take hard coded values?
    2. Can we refresh a part of materialized view, lets say we want to refresh the balances only for this year?
    Thanks

    user12182208 wrote:
    Hi,
    We are creating a Materialized view that has 2 rows for a CCID, one for this year and one for previous year with balances in 12 buckets.
    We have 2 questions:
    1. Can a materialized view be created with a parameter? or it can only take hard coded values? Typically, you want a materialized view to contain a complete set of aggregate data ... so, no, parameters don't really make sense (also, the results are pre-computed unlike a regular VIEW which is just a stored query. With a MV the data is actually computed on creation unless you defer it, and takes up physical storage).
    >
    2. Can we refresh a part of materialized view, lets say we want to refresh the balances only for this year?
    You can (depending on your Oracle Version and complexity of your materialized view) create a materialized view that does fast refreshes. If for some reason it was pertinent for you to achieve what you've asked, you could make 2 MV's and then a view that does a UNION ALL of them (the MV's would not contain overlaps), then you would just refresh the 1 MV, seems odd to me to want to do this though.
    Thanks

  • Materialized View creation with REFRESH FAST

    Hello ,
    Please see below case,
    TABLE A1(partitioned range+list)
    COLUMN C1  -- Primary key
    COLUMN C2  -- NUMBER
    TABLE D1
    COLUMN C1 -- PRIMARY KEY
    created MV log as below
    CREATE MATERIALIzED VIEW LOG ON A1 WITH ROWID,PRIMARY KEY INCLUDING NEW VALUES;
    CREATE MATERIALIzED VIEW LOG ON D1 WITH ROWID,PRIMARY KEY INCLUDING NEW VALUES;
    Trying to create MV like below:
    CREATE MATERILIZED VIEW mv1test
                                    REFRESH FAST ON COMMIT
    AS
    Select
    FROM A1,
                            D1
                    WHERE A1.C1 = D1.CI
    AND A1.C2 IS NOT NULL;
    It gives below error message:
    ORA-12052: cannot fast refresh materialized view schema.mv1test
    12052. 00000 -  "cannot fast refresh materialized view %s.%s"
    *Cause:    Either ROWIDs of certain tables were missing in the definition or
               the inner table of an outer join did not have UNIQUE constraints on
               join columns.
    *Action:   Specify the FORCE or COMPLETE option. If this error is got
               during creation, the materialized view definition may have be
               changed. Refer to the documentation on materialized views.
    However ,as discussed in earlier thread i checked all general restrictions of the 'Refresh fast' approach for join.
    Restrictions on Fast Refresh on Materialized Views with Joins Only
    Defining queries for materialized views with joins only and no aggregates have the following restrictions on fast refresh:
    1) They cannot have GROUPBY clauses or aggregates.
    2) Rowids of all the tables in the FROM list must appear in the SELECT list of the query.
    3)Materialized view logs must exist with rowids for all the base tables in the FROM list of the query.
    4)You cannot create a fast refreshable materialized view from multiple tables with simple joins that include an object type column in the SELECTstatement.
    As per above restrictions ,
    1) Group by clause is not present
    2)i do not understand 2nd point , i have added a1.rowid  and d1.rowid in  select statement of MV, but got same error.
    3) observed same as 2nd point.
    4)we have CLOB column in select list. Tried removing this column but got same error.
    Please do let me know any workaround on this.
    Thanks in advanced ..
    PM

    Basic Materialized Views show how to analyse MVs using dbms_mview. I'm not sure about creating MVs on partitioned tables, that partition maintenance might cause problems

  • Job with materialized view not working anymore

    I'm on windows 2008 server with 10.2.0.4
    I have a job that was running at every hour in the database that was refreshing some materialized view (refresh group) the sql query on that MV goes by dblink to another database.
    Le atrget database had crashed last thursday since then the job on my first database do not execute.
    I tried to start the job in TOAD but it does nothing.... Le last refresh date still on thurday.
    Here are my script :
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'dbms_refresh.refresh(''"EREGROUPEMENT_TEMP"."VM_CANTOR_CREDENTIALS"'');'
    ,next_date => to_date('20-09-2010 13:17:21','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'sysdate + 60/(60*24) '
    ,no_parse => FALSE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    DECLARE
    SnapArray SYS.DBMS_UTILITY.UNCL_ARRAY;
    JobNo Number;
    BEGIN
    SnapArray(1) := 'EREGROUPEMENT_TEMP.VM_CANTOR_CREDENTIALS';
    SnapArray(2) := 'EREGROUPEMENT_TEMP.VM_CANTOR_CV';
    SnapArray(3) := 'EREGROUPEMENT_TEMP.VM_CANTOR_DIS_CV';
    SnapArray(4) := 'EREGROUPEMENT_TEMP.VM_CANTOR_FINANCEMENT';
    SnapArray(5) := 'EREGROUPEMENT_TEMP.VM_CANTOR_FORM_ETUD_STAG';
    SnapArray(6) := 'EREGROUPEMENT_TEMP.VM_CANTOR_MOTS_CLES';
    SnapArray(7) := 'EREGROUPEMENT_TEMP.VM_CANTOR_OBR_CV';
    SnapArray(8) := 'EREGROUPEMENT_TEMP.VM_CANTOR_ORGANISME';
    SnapArray(9) := 'EREGROUPEMENT_TEMP.VM_CANTOR_SCHA_CV';
    SnapArray(10) := NULL;
    SYS.DBMS_REFRESH.MAKE (
    name => 'EREGROUPEMENT_TEMP.VM_CANTOR_CREDENTIALS'
    ,tab => SnapArray
    ,next_date => TO_DATE('01/01/4000 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    ,interval => 'SYSDATE + 60/(60*24)'
    ,implicit_destroy => TRUE
    ,lax => TRUE
    ,job => 0
    ,rollback_seg => NULL
    ,push_deferred_rpc => TRUE
    ,refresh_after_errors => FALSE
    ,purge_option => 1
    ,parallelism => 0
    ,heap_size => 0
    select job
    into JobNo
    from all_refresh
    where rowner = 'EREGROUPEMENT_TEMP'
    and rname = 'VM_CANTOR_CREDENTIALS';
    SYS.DBMS_JOB.BROKEN(JobNo,TRUE);
    Commit;
    END;
    Info on the MV :
    Last Refresh 2010-09-16 17:39:25
    Next Refresh SYSDATE + 60/(60*24)
    Refresh Type FORCE
    Refresh Mode Refresh Mode
    Start With 2010-09-16 18:39:25
    Do I have to refresh COMPLETE all the VIEWS MANUALLY and the recreate the refresh group or something wrong?

    RUN Procedure
    This procedure runs job JOB now. It runs it even if it is broken.
    Running the job recomputes next_date. See view user_jobs.
    Syntax
    DBMS_JOB.RUN (
    job IN BINARY_INTEGER,
    force IN BOOLEAN DEFAULT FALSE);
    Parameters
    It only change the next_date but it won't run.
    It tell me next date is in an hour but after an hour nothing has changed
    Edited by: Jpmill on 20 sept. 2010 11:32

  • Materialized View Not Picked Up

    Hopefully I'm doing something wrong, because so far
    Materialized Views are useless. What's happening
    is that the MV is only picked up by a select
    statement when the select is identical to the MV
    query - this means that we'd have to create a
    separate MV for each possible query.
    Here's an example:
    create materialized view
    FACT_DIM04_LVL02
    enable query rewrite
    as
    select
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    analyze table FACT_DIM04_LVL02 compute statistics ;
    So far so good. Now let's do an EXPLAIN using the exact
    same DDL used to create the MV:
    explain plan
    set STATEMENT_ID = 'FACT04'
    for
    select
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    This gives:
    Query Plan
    SELECT STATEMENT Cost = 602
    TABLE ACCESS FULL FACT_DIM04_LVL02
    Great. However, now let's add one tiny little additional
    where clause to the query:
    explain plan
    set STATEMENT_ID = 'FACT04'
    for
    select /*+ REWRITE */
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    and (1 = 1)
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    Notice that I added the simplest predicate possible
    (1 = 1), AND I've added a hint telling the optimizer
    to use the new MV. However, Oracle does not recognize
    the MV; instead it goes back to the base tables:
    Query Plan
    SELECT STATEMENT Cost = 4130
    SORT GROUP BY
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID DIM04
    INDEX RANGE SCAN DIM04_LVL02
    TABLE ACCESS FULL FACT_DIM04_LVL02
    In other words, this MV only seems to work if you're using
    the EXACT query that was used to create the MV, which
    makes it almost useless.
    I notice that in DBA_MVIEWS, there's a field called
    REWRITE_CAPABILITY, and this has a value of TEXTMATCH:
    SQLlist
    1 select mview_name, rewrite_enabled, rewrite_capability
    2* from dba_mviews
    SQL/
    MVIEW_NAME R REWRITE_C
    FACT_DIM04_LVL02 Y TEXTMATCH
    TEST01 Y GENERAL
    Here's what the manual says about this:
    TEXTMATCH: The defining query of the materialized view
    contained restrictions on the use of query rewrite.
    Yes, I'm using CBO and have set QUERY REWRITE to true.
    Also, should it matter, we're on 8.17, Sun Solaris 2.7
    Any ideas out there? TIA.

    What is the value of the job_queue_processes initialization parameter?
    Check dba|all|user_jobs to see if a refresh is actually scheduled and not marked broken.
    If a job is present, what is the value of the next_date column?

Maybe you are looking for

  • Configuring Reciever mail adapter

    Hi all I am trying to cofigure Receiver Mail adapter and my scenario would be RFC to mail .what are the settings need to be configured for a mail adapter ? i am using 7.0 version and SP16 can anybody send me some documentation or blogs about the rece

  • Problem with ECC6.0 version.

    Experts,               I find that in a standard program RSSTATDA there is a field RSYSTEM which is declared of type long_inst which is CHAR of 39 size.                    But the same field is declared in 4.7 & lower versions of type short_inst whic

  • CS3 swatch panel corrupted

    So, my swatch panel is totally garbled. Any new swatches come in as black. The Pantone selector appears in front of any sliders. It's basically impossible to modify or create swatches. Have tried all the usual things I know how to do on a mac, permis

  • Flash Player exception errors

    I continually receive the following error when using my Firefox browser. All my software is current, I run Win 7Pro with 16Gb RAM

  • Can I make a transplant of iTunes in MacOSX into Bootcamp?

    Hey all, Can I copy 'all' files from my MacOSX into my Bootcamp WinXP? I work in WinXP mode, play in MacOSX mode. I would like to play my music in WinXP as well but my iPhone cannot play in another iTunes variant, so I need to migrate a copy to WinXP