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

Similar Messages

  • Issue with Materialized View ORA-08103: object no longer exists

    I have a materialized view which gets refreshed(COMPLETE Refresh) every 2 minutes. However there are few scheduled programs which queries this materialized view, some of the queries in the scheduled program take longer to run. When the materialized view refresh time overlaps with this query executing from the program i get this error: ORA-08103: object no longer exists.
    I know that COMPLETE refresh doing TRUNCATE + INSERT is causing the issue, could someone suggest a workaround for this. But i need to do a COMPLETE refresh.

    Why would a TRUNCATE cause an "object no longer exists" ?
    Which job encounters this error ? The MV Refresh job or the programs that are querying the MV ? How does it resolve ? Automatically -- meaning that the next refresh/query does not raise the error ?

  • Problems with materialized view and fk between two db

    Hi,
    i have two databases db1 and db2 and from db1 is a table(DM_MESSDATEN) which contains a foreign key to a table(DM_FAUNA) in db2.
    Now I want to write my done steps to get more clearification and hopefully someone can point out my wrong steps.
    1st
    i create the tables inside db1 without a foreign key to the table in db2.
    2nd
    i create a database link inside db1 to db2
    create public database link DATENBANK2 connect to phantomas identified by bachelor06 using 'DMDB2';
    3rd
    now and here i stuck want to create a materialized view inside db1
    create materialized view DATAMART_MVW AS
    select * from DM_MESSDATEN, DM_FAUNA@DATENBANK2
    where DM_MESSDATEN.FAUNA_ID=DM_FAUNA.FAUNA_ID;
    or should the view be created inside of db2?
    4th
    and then i want to reactivate the foreign key inside the table of db1- but can't because of
    problems in step 3 :(
    So it would be nice if someone could help me
    thanks a lot
    thomas

    I think you haven't been clear in your statement of your problem:
    now and here i stuck want to create a materialized view inside db1Why are you stuck? If you want to enforce a froeign key locally using data from a remote database then you need to build a materialized view on your local table tablespace that sucks data across from the remote database. You can then create a foreign key on your local table using the local MV.
    If the remote table is updated frequently and you want the local MV kept in sync then you will need to put soem further replication in place. For instance you may need to create a materilaized view log on the remote database.
    Cheers, APC

  • Enabling materialized view for fast refresh method

    In AWM when i select refresh method as FAST and enable the materialized view, am getting the below error:
    "Refresh method fast requires materialized view logs and a previously run complete refresh of the cube mv". i need this Fast refresh of a cube materialized view, so that it performs an incremental refresh and re-aggregation of only changed rows in the source table.
    can anyone help me on this??

    If you want the cube to hold data even after it has been deleted from the relational table, then you should disable the MV on the cube.
    Synchronization with the source table is determined by the default "cube script".
    <li>CLEAR, LOAD, SOLVE : This will synchronize your cube with the source table. It is a requirement for MVs.
    <li>LOAD, SOLVE: This will allow your cube to contain data even after it has been removed from the source table. It sounds like you want this.
    Cube builds can be "incremental" in one of two ways.
    (1) You can have an "incremental LOAD" if the source table contains only the changed rows or if you use MV "FAST" or "PCT" refresh. Since you can't use MVs, you would need a source table with only the changed rows.
    (2) You will have an "incremental SOLVE" (a.k.a. "incremental aggregation") if there is no "CLEAR VALUES" or "CLEAR AGGREGATES" step and various other conditions hold.
    To force a "complete LOAD" with an "incremental SOLVE" you should have all rows in your source table and run the following build script.
    LOAD, SOLVE You could also run "CLEAR LEAVES, LOAD, SOLVE" to synchronize the cube with the table.
    To force an "incremental LOAD" with a "complete SOLVE" you make the source table contains only the changed rows and the run the following:
    CLEAR AGGREGATES, LOAD, SOLVEor
    LOAD, CLEAR AGGREGATES, SOLVEFinally, if you want both LOAD and SOLVE to be incremental you make the source table contains only the changed rows and the run the following:
    LOAD, SOLVE

  • 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

  • Refresh materialized view on fast refresh

    Hi,
    I want to create a fast refresh on a materialized view but i kept getting ORA-12015: cannot create a fast refresh materialized view from a complex query. When I did a complete refresh on the materialzed view, it completed. I have create a materialized view log for the table. In my materialized view script, I have included a user defined function. Does db version 10g have the capability to do a fast refresh?
    Thanks

    What is the query you are using for the MV?
    The error message says it all... "cannot create a fast refresh materialized view from a complex query"
    If your query is complex then you will have to perform complete refreshes.
    One way around can be to fast refresh all tables in the query then create a view on them based on the 'complex' query. Admittedly this is only a workaround in certain scenarios.
    Check out the documentation...
    http://68.142.116.70/docs/cd/B19306_01/server.102/b14226/repmview.htm#sthref422

  • Adobe Reader 9.1.3 Issues with browser viewing and printing

    I have several users reporting issues after upgrading to Adobe Reader 9.1.3
    Issue #1:  User tries to open a PDF on a bank website using Adobe 9.1.3 but receives an error stating file could not be found.  Adobe 9 was uninstalled and Adobe 6 re-installed.  The file on the bank website was then viewable without issue.
    Issue #2:  Different user successfully opens pdf on a different bank website, but is unable to print while viewing in browser using Adobe 9.1.3.  User had to save file to desktop and reopen locally to print from Adobe 9.1.3.   Uninstalling 9.1.3 and re-installing Adobe 6 allowed them to print from the browser successfully.
    Issue #3:  turning off "View in Browser" causes the error "File cannot be found" when trying to view a PDF on a website.  This appears to be happening on sites external to our network, but not on internal sites.  Turning on "View in Browser" corrects the problem.
    Any assistance that can be provided would be greatly appreciated!

    To clarify my previous post, I had already seen http://forums.adobe.com/message/1770581 .  I mentioned in my post that I get the message "Preview not supported" when I click the Preview button from the print dialog in Adobe Reader, and thus concluded that the "Preview" workaround discussed in that thread wasn't helping me.
    However, re-reading that post, they were talking about using the Mac "Preview" application to print the pdf file.  Like every other application (other than Reader) I have tried, the Mac's Preview application prints just fine, and is another workaround.
    The only program that doesn't print for me is Adobe Reader.
    BTW, I also have an Intel chip in my MacBook Pro.
    Re-installing Leopard, as suggested by one post in that thread, is not a reasonable option for this problem.
    In fact, since Preview allows me to view and print .pdf's , my solution is probably just going to be not to use Adobe Reader.  In fact, had I not been new to the Mac, I would have known that I didn't need Adobe Reader at all.
    However, I'm glad this happened, in the sense that I use CS3 on the PC, and had considered moving to CS4 on the Mac.  However, since Adobe apparently hasn't figured out how to get printing to work on a Mac from their flagship product (!), I will be sure to do a lot of testing of CS4 before considering buying the upgrade.

  • Materialized View and Refresh Fast

    Hi,
    Below is a sample query for generating a MV. Since I am new to Oracle,
    Experts please help me.
    create materialized view user1.mv_empdept refresh fast
    as select * from user1.employee e
    where exists(select * from user2.department d where d.deptId=e.deptid);
    Is it possible to have a MV with objects from different schema of the same
    database for Refresh Fast?
    I ran into "insufficient privileges" error eventhough both user1 and user2 have sysdba privileges.
    Thanks,
    Jagan

    Hi Ajiaz,
    User user1 has select privileges on Department table.
    if we omit "refresh fast" in the query, I am able to create the MV
    create materialized view user1.mv_empdept refresh fast
    as select * from user1.employee e
    where exists(select * from user2.department d where d.deptId=e.deptid);
    Regards,
    Jagan Kumar K

  • Materialized view issue with spatial index and UNION all.

    Hi guys,
    I'm trying to build the following materialized view:
    create materialized VIEW MV_ElectricalStuffs
      refresh fast
      AS
      SELECT jb.ROWID,
        jb.FID,
        JB.NAME_NUMBER
      FROM EL_BUS_BAR jb
      UNION ALL
      SELECT INC.ROWID,
        INC.FID,
        NULL,
        INC.NAME_NUMBER
      FROM EL_INTERNAL_CELL INC;
    I have this error showing up:
    ORA-12015: cannot create a fast refresh materialized view from a complex query
    This is because the table EL_INTERNAL_CELL has a SDO_GEOMETRY column that has a spatial index, whose ddl is
    CREATE INDEX EL_INTERNAL_CELL_S ON EL_INTERNAL_CELL (GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS('SDO_INDX_DIMS=2 TABLESPACE=USERS LAYER_GTYPE=COLLECTION');
    When I remove the spatial index from EL_INTERNAL_CELL column GEOM, Oracle is very happy and creates the view.
    Is there a mean however to keep the spatial index in the materialized view?

    I've managed to drop the spatial index prior to create the materialized view and it is ok. After the materialized view creation, I've recreated the spatial index on the table and all ran smooth. Hope nothing will go bad in the future because of this trick on spatial index..

  • Problem with MATERIALIZED VIEW (snapshot)

    Hi,
    I've any problem with creating MATERIALIZED VIEW (snapshot)
    My table is ROOMS:
    SQL> DESC ROOMS
    Name Null? Type
    LS_ID VARCHAR2(32)
    BL_ID NOT NULL VARCHAR2(32) PRIMARY KEY1
    FL_ID NOT NULL VARCHAR2(4) PRIMARY KEY2
    RM_ID NOT NULL VARCHAR2(8) PRIMARY KEY3
    SITE_ID VARCHAR2(32)
    SQL> SELECT COUNT(*)
    2 FROM ROOMS;
    COUNT(*)
    203973
    SQL> SELECT COUNT (TOT)
    2 FROM (SELECT COUNT(*) TOT, LS_ID, SITE_ID
    3 FROM ROOMS
    4 GROUP BY LS_ID, SITE_ID);
    COUNT(TOT)
    11673
    I'd like to create one MATERIALIZED VIEW that refresh every 30 seconds when I insert, update or delete on ROOMS table.
    I tried this:
    CREATE MATERIALIZED VIEW ROOMS_SNAP
    BUILD IMMEDIATE
    REFRESH complete
    START WITH to_date(sysdate,'dd/mm/yyyy hh24:mi:ss')
    NEXT sysdate + 30/86400
    disable QUERY REWRITE
    AS
    SELECT LS_ID, SITE_ID
    FROM ROOMS
    GROUP BY LS_ID, SITE_ID
    but when I insert, update or delete one record on ROOMS table, ROOMS_SNAP not refresh.
    What I wrong?
    How Can I write MATERIALIZED VIEW to maintain synchronization
    between ROOMS_SNAP AND LS_ID, SITE_ID by ROOMS?
    Thanks

    Try this way:
    SQL> SHOW PARAMETER JOB
    NAME                                 TYPE        VALUE
    job_queue_processes                  integer     0
    SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=20 SCOPE=MEMORY;
    SQL> create materialized view log on emp tablespace jam_ts
      2  with rowid, primary key;
    Materialized view log created.
    SQL> create materialized view emp_mat
      2  tablespace jam_ts
      3  refresh fast start with sysdate
      4  next sysdate + interval '15' second as
      5  select * from emp where deptno=30;
    Materialized view created.
    SQL> update  emp
      2  set     ename=lower(ename)
      3  where   deptno=30;
    6 rows updated.
    SQL> commit;
    Commit complete.
    ---"After 15 seconds it will be refreshed automatically...."
    SQL> select * from emp_mat;
      EMPNO ENAME      JOB           MGR HIREDATE      SAL    COMM  DEPTNO
       7499 allen      SALESMAN     7698 20-FEB-81    1600     300      30
       7521 ward       SALESMAN     7698 22-FEB-81    1250     500      30
       7654 martin     SALESMAN     7698 28-SEP-81    1250    1400      30
       7698 blake      MANAGER      7839 01-MAY-81    2850              30
       7844 turner     SALESMAN     7698 08-SEP-81    1500       0      30
       7900 james      CLERK        7698 03-DEC-81     950              30
    6 rows selected.Message was edited by:
    Jameel

  • How does materialized view work when refresh the view vs create the view?

    I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
    When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
    I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
    Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
    Could anyone please let me know how would this happen? Thanks,
    Code looks like as following
    create materialized view MY_MV1
    refresh force on demand
    start with to_date('20-02-2013 22:00:00', 'dd-mm-yyyy hh24:mi:ss') next trunc(sysdate)+1+22/24
    as
    ( SELECT Nvl(Cr.Sol_Chng_Num, ' ') AS Change_Request_Nbr,
           Nvl(Sr.Sr_Num, ' ') AS Service_Request_Nbr,
           Nvl(Sr.w_Org_Id, 0) AS Org_Id,
           Fcr.rowid,
           Cr.rowid,
           Bsr.rowid,
           Sr.rowid,
           SYSDATE
      FROM [email protected] Fcr
    INNER JOIN [email protected] Cr
        ON Fcr.w_Sol_Chng_Id = Cr.w_Sol_Chng_Id
    INNER JOIN [email protected] Bsr
        ON Fcr.w_Sol_Chng_Id = Bsr.w_Sol_Chng_Id
    INNER JOIN [email protected] Sr
        ON Sr.w_Srv_Rec_Id = Bsr.w_Srv_Rec_Id
    WHERE Sr.Sr_Num !='NS'
    );I have tried to use dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) but it still took 141 mins to run... vs 159 mins without atomic_refresh=>false
    Edited by: 986006 on Feb 20, 2013 2:15 PM

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION)
    >
    I am using a materialized view, and I cant set it to fast refresh because some of the tables are from remote database which does not have materialized view log.
    When I create the materialized view, it took like 20 30 seconds. however when I was trying to refresh it. It took more than 2 3 hours. and total number of records are only around 460,000.
    I understand that when the view refreshes, it would take extra step like purge the table however I am not sure why it made so much difference in execution time perspective...
    Does the dbms_mview.refresh('MY_MATVIEW', 'C', atomic_refresh=>false) do the same exact insert as when I created the view?
    >
    What Oracle version are you using? The 'atomic_refresh' parameter default was changed to TRUE starting with 10g.
    See the PL/SQL Packages and Types doc
    >
    atomic_refresh
    If this parameter is set to true, then the list of materialized views is refreshed in a single transaction. All of the refreshed materialized views are updated to a single point in time. If the refresh fails for any of the materialized views, none of the materialized views are updated.
    If this parameter is set to false, then each of the materialized views is refreshed in a separate transaction.
    >
    What that means is that if the value is TRUE Oracle uses a DELETE to remove the existing rows. If the value is FALSE then Oracle uses TRUNCATE.
    If you really are using the FALSE setting you should not be seeing that much of a time difference between creating the MV and a complete refresh so something else must be going on.

  • Materialized View and AND/OR

    I am really in need of some help as I am having trouble refreshing this materialized view. Basically the code below if triggered by executing the SQL manually will pull the correct records which is somewhere in the 970 unique record range.
    Having known that the SQL worked we created a materialized view that would refresh every day at 3 AM so that we could send this file to an external vendor. However the materialized view that references this SQL when it refreshes pulls in some 100,000 unique records incorrectly.
    After testing over and over I have identified that the refresh seems to be bypassing the "AND/OR" statment that I have setup to look at:
    (AND ((CURRENT_DATE - msp_loan_d.next_payment_due_date) >= 58 AND msp_property_d.property_alpha_state_code <> 'NC'
    OR ((CURRENT_DATE - msp_loan_d.next_payment_due_date) >= 45 AND msp_property_d.property_alpha_state_code = 'NC')).
    Any ideas on this one and maybe I need to rewrite the SQL? Not sure why the materialized view would interpret the SQL any differently.
    SELECT DISTINCT msp_loan_d.loan_number, TRUNC (CURRENT_DATE - msp_loan_d.next_payment_due_date ,0) AS DPD,
    TO_DATE (msp_user_defined_d.user_07_position_field_1a, 'MMDDYY') AS Demand_Date,
    MSP_BORROWER_D.MORTGAGOR_EXPANDED_FIRST_NAME,
    MSP_BORROWER_D.MORTGAGOR_EXPANDED_MIDDLE_NAME, MSP_BORROWER_D.MORTGAGOR_EXPANDED_LAST_NAME,
    MSP_BORROWER_D.CO_MRTGR_EXPANDED_FIRST_NAME, MSP_BORROWER_D.CO_MRTGR_EXPANDED_MIDDLE_NAME,
    MSP_BORROWER_D.CO_MRTGR_EXPANDED_LAST_NAME,
    MSP_BORROWER_D.BILLING_ADDRESS_LINE_4, MSP_BORROWER_D.BILLING_CITY_NAME,
    MSP_BORROWER_D.BILLING_STATE, MSP_BORROWER_D.BILLING_ZIP_CODE, MSP_PROPERTY_D.PROPERTY_STREET_ADDRESS, MSP_PROPERTY_D.CITY_NAME,
    MSP_PROPERTY_D.PROPERTY_ALPHA_STATE_CODE, MSP_PROPERTY_D.PROPERTY_ZIP_CODE, msp_loan_d.next_payment_due_date,
    CO.ADL_CO_BORR_UNFORMATTED_NAME_1 AS "ADDITIONAL COBORROWER",
    CO.ADL_CO_BORR_STREET, CO.ADL_CO_BORR_CITY, CO.ADL_CO_BORR_STATE, CO.ADL_CO_BORR_ZIP_CODE,
    MSP_LOAN_D.Investor_ID, msp_loan_d.first_principal_balance, msp_loan_d.last_full_payment_date, MSP_ORIGINAL_LOAN_D.ORIGINAL_MORTGAGE_AMOUNT,
    MSP_LOAN_D.TOTAL_MONTHLY_PAYMENT, MSP_DELINQUENCY_D.DELINQUENT_PAYMENT_COUNT, MSP_DELINQUENCY_D.DELINQUENT_PAYMENT_BALANCE,
    MSP_LOAN_D.ACCRUED_LATE_CHARGE_AMOUNT, MSP_LOAN_D.NSF_FEE_BALANCE, MSP_CORPORATE_ACCOUNTING_D.RECOVER_CORP_ADVANCE_BALANCE,
    MSP_LOAN_D.SUSPENSE_BALANCE, MSP_ORIGINAL_LOAN_D.NOTE_DATE As "ORIGINATION DATE", MSP_LOAN_D.LOAN_TERM AS "LOAN TERM",
    add_months(msp_loan_d.next_payment_due_date,-1) AS "DUE DATE OF LAST PAYMENT", MSP_USER_DEFINED_D.USER_20_POSITION_FIELD_2A AS "ORIGINATOR",
    NJCLERK.payee_address_line_1, NJCLERK.payee_address_line_2, NJCLERK.payee_address_line_3,
    NJCLERK.payee_address_line_4, NJCLERK.payee_address_zip_code
    FROM me589mgr.msp_loan_d@infodb,
    me589mgr.msp_property_d@infodb,
    me589mgr.msp_user_defined_d@infodb,
    me589mgr.msp_borrower_d@infodb,
    ME589MGR.MSP_ORIGINAL_LOAN_D@infodb,
    ME589MGR.MSP_DELINQUENCY_D@infodb,
    ME589MGR.MSP_CORPORATE_ACCOUNTING_D@infodb,
    (SELECT DISTINCT LOAN_NUMBER, Hi_TYPE, LO_TYPE
    FROM ME589MGR.MSP_LOAN_D@infodb
    WHERE HI_TYPE = 3
    AND LO_TYPE = 8) UNSECURED,
    (SELECT DISTINCT msp_bankruptcy_d.loan_number
    From ME589MGR.MSP_BANKRUPTCY_D@infodb
    Where BKR_STATUS_CODE = 'A') BKLOAN,
    (SELECT DISTINCT MSP_ADDITIONAL_CO_BORROWER_D.LOAN_NUMBER,
    ADL_CO_BORR_UNFORMATTED_NAME_1, ADL_CO_BORR_STREET, ADL_CO_BORR_CITY,
    ADL_CO_BORR_STATE, ADL_CO_BORR_ZIP_CODE
    FROM ME589MGR.MSP_ADDITIONAL_CO_BORROWER_D@infodb
    WHERE ADL_CO_BORR_THIRD_PARTY_FLAG = 'N'
    AND ADL_CO_BORR_SEQUENCE = '1') CO,
    (SELECT
    msp_tax_d.loan_number,
    msp_payee_d.payee_address_line_1, msp_payee_d.payee_address_line_2,
    msp_payee_d.payee_address_line_3, msp_payee_d.payee_address_line_4,
    msp_payee_d.payee_address_zip_code,
    ROW_NUMBER() OVER (PARTITION BY msp_tax_d.loan_number ORDER BY msp_tax_d.tax_key_sequence_number DESC) AS ROW_ORDER
    FROM me589mgr.msp_tax_d@infodb,
    me589mgr.msp_payee_d@infodb,
    me589mgr.msp_property_d@infodb
    WHERE msp_tax_d.tax_key_sequence_number = 1
    AND msp_tax_d.tax_payee_code = msp_payee_d.payee_id
    AND msp_property_d.property_alpha_state_code = 'NJ'
    AND msp_tax_d.loan_number = msp_property_d.loan_number) NJCLERK
    WHERE ( msp_loan_d.loan_number = UNSECURED.LOAN_NUMBER (+)
    AND UNSECURED.LOAN_NUMBER IS NULL
    AND msp_loan_d.loan_number = BKLOAN.LOAN_NUMBER (+)
    AND BKLOAN.LOAN_NUMBER IS NULL
    AND msp_loan_d.loan_number = MSP_ORIGINAL_LOAN_D.LOAN_NUMBER (+)
    AND msp_loan_d.loan_number = MSP_DELINQUENCY_D.LOAN_NUMBER (+)
    AND msp_loan_d.loan_number = MSP_CORPORATE_ACCOUNTING_D.LOAN_NUMBER (+)
    AND msp_loan_d.loan_number = msp_user_defined_d.loan_number (+)
    AND msp_loan_d.loan_number = msp_property_d.loan_number (+)
    AND msp_loan_d.loan_number = msp_borrower_d.loan_number (+)
    AND msp_loan_d.loan_number = CO.LOAN_NUMBER (+))
    AND ((CURRENT_DATE - msp_loan_d.next_payment_due_date) >= 58 AND msp_property_d.property_alpha_state_code <> 'NC'
    OR ((CURRENT_DATE - msp_loan_d.next_payment_due_date) >= 45 AND msp_property_d.property_alpha_state_code = 'NC'))
    AND (msp_loan_d.first_principal_balance > 0
    AND msp_loan_d.man_code NOT IN ('U' , 'D', 'Y' ,'B', 'F', 'L', 'G', 'I','M', 'O', 'R', 'X', 'Y', 'W', 'T', 'Q', 'Z')
    AND msp_property_d.property_alpha_state_code NOT IN ('WA','NM','MA','MD','NY','PA')
    AND msp_loan_d.loan_number = NJCLERK.LOAN_NUMBER (+)
    AND msp_loan_d.PROCESS_STOP_CODE NOT IN ('1', '2', '8', 'A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'R', '9', 'K', 'O', 'U', 'V', 'X'))
    AND (msp_loan_d.last_full_payment_date >= TO_DATE (msp_user_defined_d.user_07_position_field_1a, 'MMDDYY')
    OR (msp_user_defined_d.user_07_position_field_1a IS NULL))

    Hi,
    I don't think AND/OR has anything to do with your problem. The issue seems to be how to write outer joins.
    You have an outer join to msp_user_defined_d:
    AND msp_loan_d.loan_number = msp_user_defined_d.loan_number(+)But here you have an inner join to same table:
    AND (     msp_loan_d.last_full_payment_date >= TO_DATE (msp_user_defined_d.user_07_position_field_1a, 'MMDDYY')
           OR (msp_user_defined_d.user_07_position_field_1a IS NULL)
        )It looks like you need to change this into:
    (If you hit ORA-01719: outer join operator {noformat}(+){noformat} not allowed in operand of OR or IN , you may have to rewrite accordingly)
    AND (     msp_loan_d.last_full_payment_date >= TO_DATE (msp_user_defined_d.user_07_position_field_1a(+), 'MMDDYY')
           OR (msp_user_defined_d.user_07_position_field_1a IS NULL)
        )If true, it makes me wonder. Did you test your query alone, did it produce the correct resultset?
    Regards
    Peter

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

  • Performace issue on MATERIALIZED view

    Hi Gurus,
    Need help to understand perfoamance issue on MATERIALIZED view. I have created mat view on some big table of 76GB. Mat view is of 25 GB.
    I have refreshed mat view before running report. In OEM it ish showng going for full table scan and estimated time is of 2 hrs where full tablescan on base table on which mat view is created is of 20 Mins . I am using fast refresh on demand .
    We are using Oracle 10.2.0.4 on Sun Sprac 64bit 10 platform and version.
    Could you please let me know what could be the reason why mat views are performing poor ?
    Thanks & Regards

    You have MLOG created on your master table, right?
    OK, then check DBA_MVIEWS. Look for LAST_REFRESH_TYPE, If everything is OK, i should be FAST.
    If everything is OK by now, the problem can be the nature of master table. If there is great amount of changes in master table, set periodic job which will do refresh often (since 'often' is fuzzy word, it can be every 5, 10, 30 minutes...). Incremental refresh will perform beter if there is small amount of changes in MLOG table!
    You can check your MLOG table. If it is huge (size in MB) and there is only few records in it, try to realocate the space issuing "ALTER TABLE MLOG$_table_name;"
    Hope something will be helpfull...
    Best regards

  • Issues with Exchange Account and Q10

    Well, I hate to be writing this, but I'm hoping that there might be someone out there that can help get past some first day issues I am experiencing.
    The background: I have a long history with legacy BlackBerry devices, and almost as much history with iOS devices. My most recent phone was an iPhone 4S, and I make extensive use of iCloud to keep my iMacs, iPhone, and iPad connected in real-time. The setup worked. It wasn't perfect, but it worked. However, because I used to have a BlackBerry device (most recent the 9930) and because I don't use the iPhone for more than e-mail, iMessage, and phone calls (generally speaking), I decided to give the newest BlackBerry device a shot. So I bought a Q10.
    At this point I feel compelled to say that the hardware is everything I had hoped it to be. It's solid, has a good weight, and appears to be made very well. I have no complaints with the hardware, including the keyboard (a big selling factor for me), so I won't really get into the hardware as the issues I am experiencing all have to do with the OS. Let me also say that I am very familiar with the iCloud integration issues (missing Contact photos and disabled Calendar sync), so I'm not voicing a complaint over those issues in this thread.
    I have connected my Exchange account. I used to have everything in Exchange before I moved my entire computing world over to Apple, and now I keep Exchange around for e-mail. Therefore, I have no contacts, no tasks, no notes, very limited calendar entries, and a massive amount of e-mail on the Exchange server. However, to test everything out, I have added a single contact record so I can see it show up on the phone and be able to test two-way sync between the Q10 and Exchange. And here is where the first issues crop up. It looks like Exchange connects and then disconnects at random. For example, if I open my Contacts on the phone, I see the one contact (called John Doe). Then, as the phone is sitting there with the screen on, the contact will disappear and I will see a "Start adding contact to your contact list" notice on the screen. Then, after a short period of time, the single contact will return. It is important to note that the entire time this is happening, the All Contacts option is selected in the list so that all available contacts are shown. Additionally, I have SIM card contacts turned off, but if I alter the selection in the view list (All Contacts, Favorites, etc.), the SIM contacts will re-appear when I return to the All Contacts view. At the same time, even though I have turned off SIM Contacts in the settings, the setting has reverted to show SIM Contacts. If I turn off the setting again, SIM Contacts still show up. Possibly related: I can't delete contacts on the SIM card, no matter how many times I try, and it now it seems that I can't get SIM Contacts to go away in the Contacts app.
    Likewise, Exchange seems to connect and disconnect from Calendar. I go to the calendar and move day by day to June 15th. I see an entry that I know is from Exchange (I have no other connected calendars at this time), and it is in blue. I change the calendar color to green and the entry changes color, as expected. However, if I jump back to today and then scroll day by day to get to June 15th again, the calendar entry is missing. After a few seconds, the entry re-appears, but it is, once again, in blue. The setting has reverted itself, and it seems like Exchange is completely disconnecting and automatically reconnecting to the phone like I am setting it up again for the first time. Very odd. As I'm typing this, I just saw something odd. I swiped to wake up the phone, and the active frames screen was the visible screen. The calendar app is still running (since I left it running, minimized, when the phone went to sleep) and the date shown in the active card was Jan 1, not Jun 8. Why? The date (and time) on the phone is correct and is set automatically by the cellular system.
    Nevertheless, looking at BlackBerry Hub, I see only two e-mails in my Inbox from Exchange, even though I have roughly a dozen in my Inbox. The rest are filed in sub-folders. And bam! Just like that... I get the "Add Accounts" screen while looking at the Hub. In other words, as I was typing this, I first saw two Exchange e-mails and then, out of nowhere, the e-mails disappear and I see the "Add Accounts" screen as if no account has been connected.
    So... first question: Is anyone else experiencing this issue? This is very strange, and very frustrating. Second: could this be related to the large amount of e-mails I have stored on Exchange, some of which have large attachments? I selected "Forever" as the sync history length. I have my concerns, however, if this is related to loading historical e-mails onto the phone (in other words, the first sync with Exchange) because there is no reason that I can understand that the phone would blank out as if no account was connected at all. I can understand lag and stuttering while the history is syncing, but not a complete disconnect and reconnect. Considering all of the issues with the one and only contact record disappearing, the calendar entry for Jun 15th disappearing and then reappearing with the wrong calendar color, and e-mail in my Inbox incomplete (two of a dozen e-mails) and ultimately disappearing, I feel like this OS just has some real, significant issues.
    Full disclosure: I do want iCloud to work and am a fan of Apple products, but the lack of full iCloud sync support is not a big enough issue for me to want to send back this phone and/or see it fail so miserably. I will happily move my info from iCloud into Exchange, Google, and/or set up a new Exchange account for personal use (Office 365) because I am not wedded to iCloud per se. But, I won't go through that trouble if I can't even get my first account to work properly. It should also be noted that I do have a basic Google account (non-paid) and I had previously attempted to connect to it. However, I was experiencing the exact same issues with contacts disappearing, e-mail disappearing, etc. So I deleted that account. Truth be told, I deleted the Exchange account as well, and then re-connected to Exchange only to test one account at a time. Unfortunately, even with Exchange only, I am seeing very strange and frustrating behavior as described above.
    Help... please. I want this to work but the frustration I am feeling is growing worse by the hour.
    Model: SQN100-2
    OS Release: 10.1.0.2011
    OS Version: 10.1.0.2038
    Build ID: 525050
    Ian

    To follow-up with this issue:
    I ended up performing a security wipe on my device. The security wipe finished, and I was about to reconnect with Exchange when I decided to visit our host's web site to see if they had any articles covering the issues I was experiencing. While they didn't have anything specific, I did find a step-by-step guide to connecting a BB10 device to Exchange... and right there at the end, it said "Do NOT enable memo sync."
    I contacted support, and the rep told me that OS 10 has an issue with memo sync and it can cause all sorts of unpredictable behavior. Now, whether or not this is accurate I can say this: So far, the device is not disconnecting and reconnecting like it was before. Problem is, is this a result of not enabling memo sync, or is this a result of the security wipe?
    I may have overlooked it, but I don't recall reading anything about that anywhere else. I'm tempted to try re-enabling the memo sync to see if everything blows up again. At least that way I can see for myself if the memo sync is a real issue. Of course, perhaps it's an issue with SherWeb (our host) specifically. Hm...
    Anyway, for those that were interested, and for those that may come along in the future with a similar situation, the strange behavior that I first reported is no longer happening. I just don't know if it was a result of a security wipe or a result of not enabling memo sync with Exchange.
    Ian

Maybe you are looking for