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

Similar Messages

  • Podcast List view not updated with iTunes 11.3.1.2

    Podcast List view not updated with iTunes 11.3.1.2
    Windows 7 Enterprise Service Pack 1 / Intel-i7 2.40 GHz / 8GB RAM / 64-bit
    iTunes 11.3.1.2
    After refreshing my Podcast list, some Podcasts with new episodes do not display the "Unplayed" blue dot.
    If the podcast "folder" is expanded by clicking the triangle, the new episodes are shown with a "Unplayed" blue dot.
    A new episode is shown in the My Podcast view, with the correct number of new episodes.
    The new episodes are displayed in the All Unplayed view.
    I've tried deleting all episodes and downloading new episodes from the iTunes Store.
    I've tried Unsubscribing and deleting the podcast, then Subscribing again from the iTunes Store.
    Neither attempt resolved the issue.
    I've seen this issue for a while, and was disappointed to find no change with the iTunes 11.3.1.2 update.

    it finally worked; got my Rush 24/7 downloaded, and it finally found my iPhone after switching from the USB 4 port Hub to a dedicated USB 2.0 slot on my laptop.

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

  • 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

  • Materialized view log update question

    Hi, I am running into a question regarding mview - not sure if it should behave that way or I didn't use it right.
    I have two base tables, sales and customers (drived from nested materialized view example in oracle doc):
    CREATE TABLE sales
    cust_ID VARCHAR2(32 BYTE) NOT NULL,
    amount_sold NUMBER,
    TEMP VARCHAR2(100 BYTE),
    CONSTRAINT sales_pk PRIMARY KEY (cust_id)
    CREATE TABLE customers
    cust_ID VARCHAR2(32 BYTE) NOT NULL,
    CUST_LAST_NAME VARCHAR2(100 BYTE),
    TEMP VARCHAR2(100 BYTE),
    CONSTRAINT cust_pk PRIMARY KEY (cust_id)
    CREATE MATERIALIZED VIEW LOG ON sales
    WITH ROWID (cust_id, amount_sold);
    CREATE MATERIALIZED VIEW LOG ON customers
    WITH ROWID (cust_id, cust_last_name);
    Then I create a fast refresh materialized view based on them:
    CREATE MATERIALIZED VIEW join_sales_cust
    REFRESH FAST ON DEMAND AS
    SELECT c.cust_id, c.cust_last_name, s.amount_sold, s.rowid srid, c.rowid crid
    FROM sales s, customers c
    WHERE s.cust_id = c.cust_id;
    Since this materialized view only invole cust_id and amount_sold from sales and cust_id and last_name from customers table, I do not want to trigger materialized view log entry if the TEMP column value gets updated. So follow update shouldn't trigger mlog:
    update sales set TEMP='TEMP2' where cust_id=1
    but this update should:
    update sales set amount_sold=3 where cust_id=1
    What I am seeing happenning is any update on the base table will triger mlog entried regardless whether the column is involed in the materialized view or not.
    Can someone please confirm if this is the correct behavior and whether there is a way to accomplish what I wanted to do?
    Thank you!
    Edited by: user3933488 on Jan 8, 2010 12:53 PM

    You created the materialized view logs with some columns, which is not necessary when creating a join MV on top of them. You can happily skip those in your MV log definition. And then it becomes clear that those columns are not involved in the decision whether a MV log needs to be updated or not. Everything that happens to the base table gets recorded. The "WITH ROWID" and "INCLUDING NEW VALUES" and the column list only specify WHAT should be recorded when something changed.
    Regards,
    Rob.

  • Materialized view not being used in the report

    I have had a materialized view (MV) for a particular report. Recently, the report definition has changed little bit, so the existing MV is not being used by the report anymore. I copied the code Discoverer's SQL Inspection and recreated the materialized view. But still it is not working. Obviously, I am missing something at the database level. Does anyone have any idea? The database is 9i and Discoverer is 9.0.2. Thank you!

    The SQL that you see from the Inspect SQL option will provide you with the SQL that Discoverer sends to the database. The database then may do a query rewrite to point to an available materialized view if available. This rewrite won't be seen from the inspect sql option. You need to check at the database level to verify if a query rewrite did in fact take place.
    You may want to check the section titled "Query Rewrite with Materialized Views" from Ch1 - "Introduction to the Optimizer" in the Oracle9i Database Performance Tuning Guide and Reference, Release 2 (9.2), Part Number A96533-02, available at http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/optimops.htm#37287
    Regards
    Abhinav Agarwal
    Oracle Business Intelligence Product Management
    http://www.oracle.com/bi
    http://www.oracle.com/technology/documentation/bi_ee.html
    http://www.oracle.com/technology/software/products/ias/htdocs/101320bi.html
    http://oraclebi.blogspot.com/

  • Material document not updated in inspection lot QALS table

    HI
    The inspection lot created for 04 inspection type  during Goods Receipt.
    The material document is appearing in the inspection lot but found not updated in table entries.  i.e.., QALS -MBLNR
    When i checked other inspection lots it was found updated. How this happened ?
    Any Snote to be applied?
    Thanks

    Hi,
    Check the number ranges for material documents. (with year) for document type WE in OMBT transaction code.
    If same material document number repeats in the same calendar year,then document update will be terminated.
    As, document no. will be already existing in tables, system won't allow to update the same no. again.
    Thanks & Regards,
    Anand.

  • Outlook 2013 Category view not updating after Exchange 2010 SP3 RU3

    After updating to Exchange 2010 SP3 RU3 last night, users who use categories view in Outlook 2013 are complaining that the view does not update. The alert is received in the notification area and the unread message count next to Inbox updates appropriately.
    The view can be force updated by switching between All and Unread, by using Reset View, or closing and opening Outlook.  It seems anything that forces a 'redraw' of the view will update it - except for the actual reception of email.  I easily replicated
    this issue.  For reference:
    Exchange 2010 SP3 RU3
    Windows 7 x64 Ent
    Outlook 2013 (15.0.4551.1004) 32-bit
    I do see that SP3 RU4 has been released, however the only change listed is a security patch.
    Thank you for any ideas.

    Hi, Everyone –
    This has been a known issue for a very long time – we have people at our workplace that are very disappointed since a feature as great as categorizing email (not using tasks) has become broken and has not even been considered to be fixed for
    over half a year.  It was not fixed in the updates for Patch Tuesday this week.
    I would like to confirm that this is an issue with Outlook 2010 and 2013 when running the latest Exchange 2010 and there is NO FIX
    – I have scoured the internet for a solution – all proposed "textbook" solutions do not work and I am positive that the issue can be recreated; however, everyone from Microsoft does not mention trying to recreate the issue at all. 
    The workaround of creating a rule to send new emails to a category could break other pre-existing rules and cause more frustration and wasted time for users/IT before and after the issue is fixed.
    Please fix this issue sooner than later, as the Categories view is completely broken and unusable at this point in time.
    Regards,
    IT Helper

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

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

  • Views, not updatable???

    Have run the script demobld.sql in schema SCOTT/TIGER and created the following view
    SQL> @C:\scripts\demobld.sql
    Building demonstration tables. Please wait.
    Demonstration table build is complete.
    CREATE OR REPLACE VIEW empdept AS
    SELECT emp.empno, emp.ename, emp.job, dept.deptno, dept.dname, dept.loc
    FROM emp, dept
    WHERE emp.deptno = dept.deptno;
    select * from user_updatable_columns where table_name like 'EMPDEPT';
    OWNER     TABLE_NAME COLUMN_NAME UPD INS DEL
    SCOTT EMPDEPT EMPNO NO NO NO
    SCOTT EMPDEPT ENAME NO NO NO
    SCOTT EMPDEPT JOB NO NO NO
    SCOTT EMPDEPT DEPTNO NO NO NO
    SCOTT EMPDEPT DNAME NO NO NO
    SCOTT EMPDEPT LOC NO NO NO
    I don't understand why the view is not updatable for the columns from the base table EMP, they should be. Does anyone know what the problem could be
    Cheers
    Fergus

    Are you sure that you have all the primary keys and foreign keys correctly defined on those two tables?
    SQL> alter table dept drop constraint pk_Dept ;
    Table altered.
    SQL>
    SQL> CREATE OR REPLACE VIEW empdept AS
      2  SELECT emp.empno, emp.ename, emp.job, dept.deptno, dept.dname, dept.loc
      3  FROM emp, dept
      4  WHERE emp.deptno = dept.deptno;
    View created.
    SQL>
    SQL> select * from user_updatable_columns where table_name like 'EMPDEPT';
    OWNER                          TABLE_NAME                     COLUMN_NAME                    UPD INS DEL
    SCOTT                          EMPDEPT                        EMPNO                          NO  NO  NO
    SCOTT                          EMPDEPT                        ENAME                          NO  NO  NO
    SCOTT                          EMPDEPT                        JOB                            NO  NO  NO
    SCOTT                          EMPDEPT                        DEPTNO                         NO  NO  NO
    SCOTT                          EMPDEPT                        DNAME                          NO  NO  NO
    SCOTT                          EMPDEPT                        LOC                            NO  NO  NO
    6 rows selected.
    SQL>

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

Maybe you are looking for