Materialized view issue ORA-12052

Hi All,
I'm currently trying to create a MV using Fast refresh method.
and I'm getting the following error:
ORA-12052:
cannot fast refresh materialized view string.string
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.
I'm trying to create the Unique constraints required. Could anybody help me with this?. Which are the "inner tables of an outer join"?
I have also created the MVs logs with rowid, but also nothing happend.
I' ve created a Unique constraint that includes all the fields of the ourter joins. Nothing happend either.
Thi is the MV script:
'CREATE MATERIALIZED VIEW MVIEW1
USING INDEX
REFRESH ON DEMAND FAST
WITH rowid
DISABLE QUERY REWRITE AS
SELECT fp.FINAL_AMOUNTFIXED,
fp.FINAL_FPRATE,
fp.updated_rate,
fp.gsd_rate,
fp.nongsd_rate,
fp.AMT_CD,
fp.AMT_CD_ADJ1,
fp.AMT_CD_ADJ2,
fp.AMT_LC,
fp.AMT_LC_ADJ1,
fp.AMT_LC_ADJ2,
fp.ASSIGNMENT_STATUS,
fp.CURRENCY,
fp.DOLLARS,
fp.FORECAST_REVENUE_STATUS,
fp.GUID,
NVL(fp.HOURS,0) HOURS,
fp.ID,
fp.JOB_LEVEL,
fp.PJR_AMT_CD,
fp.PJR_HOURS_VALUE,
fp.PJR_LC,
fp.PJR_RATE,
fp.PJR_RATE_VALUE,
fp.PROJECT_COST_CENTER,
fp.PROJECT_COST_CENTERTXT,
NVL(cust.project_manager,fp.project_manager) project_manager,
NVL(cust.project_name,fp.project_name) project_name,
fp.PROJECT_NUMBER,
fp.PROJECT_ORGANIZATION,
NVL(cust.project_status,fp.project_status) project_status,
NVL(cust.project_type,fp.project_type) project_type,
NVL(fp.RATE,0) Rate,
fp.RATE_ADJ1,
fp.RATE_ADJ2,
fp.RATE_LEVEL,
fp.REPORT_DATE_ID,
fp.REPORT_DESCRIPTION,
fp.RESOURCE_COST_CENTER,
fp.RESOURCE_COST_CENTERTXT,
fp.RESOURCE_COUNTRY,
fp.RESOURCE_NAME,
fp.RESOURCE_ORGANIZATION,
fp.RESOURCE_TYPE,
fp.REVENUECOST_TYPE,
fp.ROLE_END_DATE,
fp.ROLE_NAME,
fp.ROLE_START_DATE,
fp.TAB,
fp.TASK_NUMBER,
fp.TPRATE_TP,
fp.WAR,
fp.WE_DATE_ID,
fp.WEEK,
fp.WORK_TYPE,
fp.PJR_FF_DIFF_MONTH,
fp.PJR_FF_DIFF_QTR,
NVL(fp.PJR_WOW,0) WOW,
fp.PJR_WOW_HRS,
fp.REMOVED_BY_ADJUSTMENT,
fp.PICK_FOR_WRITEBACK,
fp.DRAFT_REV_NUM,
fp.DRAFT_INV_NUM,
NVL(pca.country,fp.PROJECT_COUNTRY) Country,
NVL(cust.customer_id,NVL(fp.CUSTOMER_NUMBER,'TBD')) Customer_ID,
NVL(cust.CUSTOMER_NAME,NVL(fp.CUSTOMER_NAME,'TBD')) Customer_Name ,
fp.ITEM_DATE,
fp.REVENUE_CC,
fp.EXPLANATION,
fp.REPORT,
fp.REPORT_ADJUSTMENT,
fp.REPORT_ADJ1,
fp.REPORT_ADJ2,
fp.JE_DESCRIPTION,
pca.REGION_HQ_TIERLAST_CODE,
pca.MANAGER_FIELD_TIERLAST_CODE,
pca.SPECIALTY_HQ_TIERLAST_CODE,
pca.SECTOR_HQ_TIERLAST_CODE,
rca.REGION_HQ_TIERLAST_CODE,
rca.MANAGER_FIELD_TIERLAST_CODE,
rca.SPECIALTY_HQ_TIERLAST_CODE,
rca.SECTOR_HQ_TIERLAST_CODE,
pca.VERTICALS_SUB_LOB,
pca.MISC_GROUP ,
rca.VERTICALS_SUB_LOB,
rca.MISC_GROUP ,
fp.gl_date,
fp.pjr_wow_rate ,
fp.created_by,
fp.created_on,
NVL(fp.TOTAL_FUNDING,0) TOTAL_FUNDING,
NVL(fp.INCEPTION_TO_BURN,0) INCEPTION_TO_BURN,
NVL(fp.AVAILABLE_FUNDING,0) AVAILABLE_FUNDING,
NVL(fp.FORECAST_AMT,0) FORECAST_AMT,
cust.pop_date,
fp.COMMENTS_WOW_PROJ,
fp.COMMENTS_PAPER_CONFIRM,
rep.LOOKUP_CODE,
rep.NAC_SORTING1,
fp.ACTION_TO_CLOSE,
NVL(fp.NEGATIVE_BACKLOG,0) NEGATIVE_BACKLOG,
fp.SALES_REP,
fp.FORECAST_DATE,
pca.NAC_RES_TYPE_3,
rca.NAC_RES_TYPE_3
FROM FACT_PJR fp,
COSTCENTER_ATTRIBUTES pca ,
COSTCENTER_ATTRIBUTES rca,
wb_customer_lookups cust,
XXAPX_LOOKUPS rep
WHERE fp.revenue_cc = pca.LEAF_CC(+)
AND fp.RESOURCE_COST_CENTER = rca.LEAF_CC(+)
AND fp.project_number = cust.project_number(+)
AND fp.REPORT_ADJ2 = rep.VALUE(+)
AND rep.LOOKUP_TYPE = 'NAC_WB_PHASE2';'
Edited by: 859267 on May 3, 2012 11:51 AM

Please edit your post and surround the code with code tags. See 'Are there any useful formatting options not shown on the sidebar?' in the FAQ.
Also provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).

Similar Messages

  • Create materialized view with ora-12054 error

    Oracle 10g R2 on AIX 5.3L
    I create a script (with help of EM) for a materilaized view
    CREATE MATERIALIZED VIEW "BAANDB"."R2_MV"
    TABLESPACE "USERS" NOLOGGING STORAGE ( INITIAL 128K) USING INDEX TABLESPACE "BAANIDX" STORAGE ( INITIAL 256K)
    REFRESH FORCE ON COMMIT
    ENABLE QUERY REWRITE AS
    SELECT CM.ROWID c_rid, PC.ROWID p_rid, CM."T$CWOC", "T$EMNO", CM."T$NAMA", CM."T$EDTE", PC."T$PERI", PC."T$QUAN", PC."T$YEAR", PC."T$RGDT" From BAANDB.TTPPPC235201 PC RIGHT OUTER JOIN BAANDB.TTCCOM001201 CM Using (T$EMNO)
    but I got error
    ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
    acooding to the oerr
    // *Cause:  The materialized view did not satisfy conditions for refresh at
    // commit time.
    // *Action: Specify only valid options.
    what dose it mean? both my master tables are not IOT and are locale ones. It seems that only changing to ON DEMAND works. If I use the "REFRESH FORCE START ..NEXT", it also failed.
    I have created the materalized view logs with rowid on each master table. I think my script met every prequirement of ON COMMIT.
    table owner has "on commit refresh" privilege

    After googling on line, someone mentioned that for "ON COMMIT" on join tables, we have to use th old OUTER JOINT syntax (+) on WHERE. The new "outer joint" in FROM clause won't work.
    I tested it, it seemed to be true.

  • Materialized view problem ORA-00904: "from$_subquery$_ error

    Hello everyone,
    I've created data warehouse star schema and I'm trying to set up materialized view. DBMS_MVIEW.EXPLAIN_MVIEW passes and also the select query passes and is executed with no problems but when I try to CREATE MATERIALIZED VIEW... then error ORA-00904: "from$_subquery$_003"."SERVICE_ID_2_2": invalid identifier pops-up. How does Oracle 9i (9.2.0.1.0) managed to do this ? How to make it to work ?
    This is the query, and the schema:
    CREATE MATERIALIZED VIEW analiza_profitabilnosti
    BUILD IMMEDIATE
    REFRESH FAST
    ON COMMIT
    AS
    select
    GROUPING_ID(t.y,t.q,t.m,t.w,t.d,s.service_type,s.service_id,c.customer_category) as g_id,
    t.y, t.q, t.m, t.w, t.d,
    s.service_type , s.service_id ,
    c.customer_category ,
    COUNT(*) as c_star,
    SUM(cost) cost, COUNT(cost) c_cost,
    SUM(number_of_units) number_of_units, COUNT(number_of_units) as c_number_of_units
    from fact f
    inner join timeline t on f.datum = t.datum
    inner join service s on f.service_id = s.service_id
    inner join customer_category c on f.customer_category=c.customer_category
    group by
    ROLLUP(t.y, t.q, t.m, t.w, t.d),
    ROLLUP(s.service_type, s.service_id),
    ROLLUP (c.customer_category)
    and the schema:
    FACT (
    DATUM DATE,
    HOST_ID NUMBER,
    SERVICE_ID NUMBER (5),
    CALLED_PREFIX_ID NUMBER (10),
    CUSTOMER_CATEGORY NUMBER,
    TRAFIC_PERIOD_ID NUMBER (5),
    CALL_DURATION NUMBER,
    COST NUMBER,
    NUMBER_OF_UNITS NUMBER,
    NUMBER_OF_CALLS NUMBER)
    TIMELINE (
    Y VARCHAR2 (5),
    Q VARCHAR2 (5),
    M VARCHAR2 (5),
    W VARCHAR2 (5),
    D VARCHAR2 (5),
    DATUM DATE NOT NULL)
    SERVICE (
    SERVICE_ID NUMBER (5) NOT NULL,
    SERVICE_CODE VARCHAR2 (15) NOT NULL,
    SERVICE_NAME VARCHAR2 (63),
    SERVICE_TYPE NUMBER (5),
    SERVICE_TYPE_CODE VARCHAR2 (4) NOT NULL,
    S_ID NUMBER (5))
    CUSTOMER_CATEGORY (
    CUSTOMER_CATEGORY_NAME VARCHAR2 (65) NOT NULL,
    CUSTOMER_CATEGORY NUMBER NOT NULL)
    Thanks,
    Igor

    Yes, thank you. I suspected that version is problem, and patch 9.2.0.6 helped. It works under 9.2.0.6

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

  • Create Materialized view Error ORA-22818

    Hi,
    I am creating a materialized view based on a complex query with inline queries, below is a simplified version of the query:
    CREATE MATERIALIZED VIEW CM_FA_PEND_mvu
    TABLESPACE CISTS_TH
    BUILD IMMEDIATE
    REFRESH COMPLETE
    ENABLE QUERY REWRITE
    AS
    SELECT/*+ index (a,XT094S3) index (b,XT232S1) index (c, XM143P0) index (d, XM185S1)*/
    a .fa_id,
    a.fa_type_cd,
    a.fa_status_flg,
    a.disp_grp_cd,
    (SELECT dl.descr
    FROM ci_disp_grp_l dl
    WHERE dl.disp_grp_cd = a.disp_grp_cd AND dl.language_cd = 'ENG')
    disp_grp_cd_descr
    FROM ci_fa a,
    ci_sp_mtr_hist b,
    ci_mtr_config c,
    ci_reg d,
    ci_fapr_faty e
    WHERE a.fa_type_cd = e.fa_type_cd
    AND a.sp_id = b.sp_id(+)
    AND b.mtr_config_id = c.mtr_config_id(+)
    AND c.mtr_id = d.mtr_id(+)
    AND a.fa_status_flg = 'P'
    AND e.fa_type_prof_cd = 'METERED'
    AND ( (b.removal_dttm IS NULL))
    I am getting error "ORA-22818: subquery expressions not allowed here". the problem is in columns "disp_grp_cd_descr" (when I remove this column from the query, the MView is created successfully)
    Is using inline queries as columns a limitation on creating materialized view?
    Is there a workaround ?
    Thanks
    AK

    No version and no exception ... the full text is necessary the number alone insufficient ... to help you much other than recommend you read this:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10810/basicmv.htm#DWHSG8195
    where it says:
    "The SELECT clause in the materialized view creation statement defines the data that the materialized view is to contain. Only a few restrictions limit what can be specified. Any number of tables can be joined together. Besides tables, other elements such as views, inline views (subqueries in the FROM clause of a SELECT statement), subqueries, and materialized views can all be joined or referenced in the SELECT clause. You cannot, however, define a materialized view with a subquery in the SELECT list of the defining query. You can, however, include subqueries elsewhere in the defining query, such as in the WHERE clause."
    Something you could have found in a second or two in the docs at http://tahiti.oracle.com by searching for "Materialized Views Restrictions"
    But without your version and the actual error message this may not apply.

  • Create materialized view get ora-00998 error cause by subquery

    hi all,
    my create statement as follow,
    create materialized view MV_DM_DIM_DEALER01
    Build deferred
    Refresh complete
    ON DEMAND
    Enable query rewrite
    as
    select a.dealer_no,a.sk_period from DM_DIM_DEALER a
    where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
    ORA-00998: must name this expression with a column alias
    so what's the problem?
    thx all

    >
    my create statement as follow,
    create materialized view MV_DM_DIM_DEALER01
    Build deferred
    Refresh complete
    ON DEMAND
    Enable query rewrite
    as
    select a.dealer_no,a.sk_period from DM_DIM_DEALER a
    where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
    ORA-00998: must name this expression with a column alias
    so what's the problem?
    >
    Well since the error is 'ORA-00998: must name this expression with a column alias' you might try naming your expressions with aliases
    select a.dealer_no dealer_no,a.sk_period sk_period from DM_DIM_DEALER a

  • Materialized View Issue

    Hi,
    I have created a materialized view , which is refreshed every day at 1 AM . It was created yesterday. Here is the initial part of it
    CREATE MATERIALIZED VIEW MV_TEST
    TABLESPACE USERS
    PCTUSED 0
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    NOCACHE
    NOLOGGING
    NOCOMPRESS
    NOPARALLEL
    BUILD IMMEDIATE
    REFRESH COMPLETE
    START WITH SYSDATE
    NEXT ROUND(SYSDATE + 1) + 1/24
    WITH PRIMARY KEY
    AS
    Now , when it was created initially , a query that retrieves around 40,000 records took 8 seconds to run . That looked ok . But today when I tried to run the same query , it took 12 minutes to runt he query . Any idea whats going wrong . I checked the user jobs , it says its a non broken job ,means completed successfully . Please, if you can have some suggestions , what to do or what to check to see whats is going on .
    Thanks .

    here is the query with its execution plan
    SELECT  PERSONNEL_ID, EMP_FIRST_NAME, EMP_LAST_NAME, EXEMPT, FTE_ASSIGNED, EMPLOYEE_VISITOR_ID, STAFF_CATEGORY, EMP_DIVISION, ACCOUNT_ID, ACCOUNT_NUMBER, ACCOUNT_NAME,
            ACCOUNT_MANAGER_ID, ACCOUNT_START_DATE, ACCOUNT_END_DATE, ACCOUNT_STATUS, MGR_FIRST_NAME, MGR_LAST_NAME, MGR_DIVISION, YEARS, PERIOD_YEAR, LCS_EFFORT
    FROM
    WITH
    LCS AS (SELECT LC.PERSONNEL_ID, LC.ACCOUNT_ID , SUM(NVL(LC.LCS_EFFORT,0)) LCS_EFFORT , AP.PERIOD_YEAR
            FROM
            (SELECT PERSONNEL_ID, ACCOUNT_ID , FISCAL_YEAR_ID , FISCAL_PERIOD_ID , LCS_EFFORT
            FROM LABOR_COMMITED WHERE COMMITED_DATE IS NOT NULL ) LC
            PARTITION BY ( PERSONNEL_ID, ACCOUNT_ID)
            RIGHT OUTER JOIN
            (SELECT FIRST_DAY PERIOD_YEAR, FISCAL_YEAR_ID, FISCAL_SYSTEM_PERIOD_ID FROM ALL_PERIODS WHERE CALENDRICAL_EQUIVALENT IS NOT NULL
             AND FIRST_DAY > TO_DATE('01-JUN-2004','DD-MON-YYYY')) AP
            ON (LC.FISCAL_YEAR_ID = AP.FISCAL_YEAR_ID  AND LC.FISCAL_PERIOD_ID = AP.FISCAL_SYSTEM_PERIOD_ID)
            GROUP BY LC.PERSONNEL_ID, LC.ACCOUNT_ID , AP.PERIOD_YEAR),
    PER AS (SELECT P.PERSONNEL_ID, P.FIRST_NAME EMP_FIRST_NAME, P.SURNAME_ISI EMP_LAST_NAME, P.EXEMPT, P.FTE_ASSIGNED,
            NVL(P.EMPLOYEE_ID,P.VISITOR_NUMBER) EMPLOYEE_VISITOR_ID, ST.CODE_VALUE STAFF_CATEGORY, DIV.DIVISION_NUMBER EMP_DIVISION
            FROM PERSONNEL P , CODES ST , DIVISIONS DIV 
            WHERE P.STAFF_CATEGORY_CODE_ID  = ST.CODE_ID (+) AND P.DIVISION_ID = DIV.DIVISION_ID (+)),
    ACT AS (SELECT AC.ACCOUNT_ID, AC.ACCOUNT_NUMBER, AC.ACCOUNT_NAME, AC.ACCOUNT_MANAGER ACCOUNT_MANAGER_ID, AC.ACCOUNT_START_DATE, AC.ACCOUNT_END_DATE,
            ACS.ACCOUNT_STATUS_DESIG ACCOUNT_STATUS, MGR.FIRST_NAME MGR_FIRST_NAME, MGR.SURNAME_ISI MGR_LAST_NAME,  MGR_DIV.DIVISION_NUMBER MGR_DIVISION
            FROM ACCOUNTS AC, ACCOUNT_STATUS ACS, PERSONNEL MGR, DIVISIONS MGR_DIV
            WHERE AC.ACCOUNT_STATUS_ID = ACS.ACCOUNT_STATUS_ID AND AC.ACCOUNT_MANAGER = MGR.PERSONNEL_ID AND MGR.DIVISION_ID = MGR_DIV.DIVISION_ID (+))
    SELECT  PER.PERSONNEL_ID , PER.EMP_FIRST_NAME, PER.EMP_LAST_NAME, PER.EXEMPT, PER.FTE_ASSIGNED, PER.EMPLOYEE_VISITOR_ID, PER.STAFF_CATEGORY , PER.EMP_DIVISION,
            ACT.ACCOUNT_ID, ACT.ACCOUNT_NUMBER, ACT.ACCOUNT_NAME, ACT.ACCOUNT_MANAGER_ID, ACT.ACCOUNT_START_DATE, ACT.ACCOUNT_END_DATE, ACT.ACCOUNT_STATUS,
            ACT.MGR_FIRST_NAME, ACT.MGR_LAST_NAME, ACT.MGR_DIVISION, TO_NUMBER(TO_CHAR(LCS.PERIOD_YEAR,'YYYY')) YEARS, LCS.PERIOD_YEAR, LCS.LCS_EFFORT
    FROM    LCS, PER, ACT
    WHERE   LCS.PERSONNEL_ID = PER.PERSONNEL_ID
    AND     LCS.ACCOUNT_ID = ACT.ACCOUNT_ID
    PLAN_TABLE_OUTPUT
    Plan hash value: 2443154823
    | Id  | Operation                          | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                       |   190K|   278M|       | 41814   (1)| 00:08:22 |
    |   1 |  VIEW                              |                       |   190K|   278M|       | 41814   (1)| 00:08:22 |
    |*  2 |   HASH JOIN RIGHT OUTER            |                       |   190K|    39M|       | 41814   (1)| 00:08:22 |
    |   3 |    TABLE ACCESS FULL               | CODES                 |  4513 | 58669 |       |     8   (0)| 00:00:01 |
    |*  4 |    HASH JOIN RIGHT OUTER           |                       |   190K|    36M|       | 41802   (1)| 00:08:22 |
    |   5 |     TABLE ACCESS FULL              | DIVISIONS             |    11 |    77 |       |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |*  6 |     HASH JOIN                      |                       |   190K|    35M|       | 41795   (1)| 00:08:22 |
    |   7 |      TABLE ACCESS FULL             | PERSONNEL             |  2100 | 90300 |       |    25   (4)| 00:00:01 |
    |*  8 |      HASH JOIN                     |                       |   190K|    27M|       | 41766   (1)| 00:08:22 |
    |*  9 |       HASH JOIN                    |                       |  2449 |   253K|       |    42   (8)| 00:00:01 |
    |  10 |        TABLE ACCESS FULL           | ACCOUNT_STATUS        |     2 |    10 |       |     3   (0)| 00:00:01 |
    |* 11 |        HASH JOIN                   |                       |  2449 |   241K|       |    38   (6)| 00:00:01 |
    |* 12 |         HASH JOIN RIGHT OUTER      |                       |  2100 | 69300 |       |    28   (4)| 00:00:01 |
    |  13 |          TABLE ACCESS FULL         | DIVISIONS             |    11 |    77 |       |     3   (0)| 00:00:01 |
    |  14 |          TABLE ACCESS FULL         | PERSONNEL             |  2100 | 54600 |       |    25   (4)| 00:00:01 |
    |  15 |         TABLE ACCESS FULL          | ACCOUNTS              |  2449 |   162K|       |     9   (0)| 00:00:01 |
    |  16 |       VIEW                         |                       |   190K|  8906K|       | 41720   (1)| 00:08:21 |
    PLAN_TABLE_OUTPUT
    |  17 |        HASH GROUP BY               |                       |   190K|    12M|    32M| 41720   (1)| 00:08:21 |
    |  18 |         VIEW                       |                       |   190K|    12M|       | 38561   (1)| 00:07:43 |
    |  19 |          MERGE JOIN PARTITION OUTER|                       |   190K|    10M|       | 38561   (1)| 00:07:43 |
    |  20 |           SORT JOIN                |                       |     5 |    95 |       |    14   (8)| 00:00:01 |
    |  21 |            VIEW                    |                       |     5 |    95 |       |    13   (0)| 00:00:01 |
    |  22 |             NESTED LOOPS           |                       |     5 |    90 |       |    13   (0)| 00:00:01 |
    |  23 |              TABLE ACCESS FULL     | FISCAL_YEARS          |     8 |    80 |       |     3   (0)| 00:00:01 |
    |* 24 |              TABLE ACCESS FULL     | FISCAL_SYSTEM_PERIODS |     1 |     8 |       |     1   (0)| 00:00:01 |
    |* 25 |           SORT PARTITION JOIN      |                       | 38000 |  1447K|  4216K|   532   (3)| 00:00:07 |
    |  26 |            VIEW                    |                       | 38000 |  1447K|       |   142   (3)| 00:00:02 |
    |* 27 |             TABLE ACCESS FULL      | LABOR_COMMITED        | 38000 |  1447K|       |   142   (3)| 00:00:02 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       2 - access("P"."STAFF_CATEGORY_CODE_ID"="ST"."CODE_ID"(+))
       4 - access("P"."DIVISION_ID"="DIV"."DIVISION_ID"(+))
       6 - access("LCS"."PERSONNEL_ID"="P"."PERSONNEL_ID")
       8 - access("LCS"."ACCOUNT_ID"="AC"."ACCOUNT_ID")
       9 - access("AC"."ACCOUNT_STATUS_ID"="ACS"."ACCOUNT_STATUS_ID")
      11 - access("AC"."ACCOUNT_MANAGER"="MGR"."PERSONNEL_ID")
    PLAN_TABLE_OUTPUT
      12 - access("MGR"."DIVISION_ID"="MGR_DIV"."DIVISION_ID"(+))
      24 - filter("PERIODS"."CALENDRICAL_EQUIVALENT" IS NOT NULL AND CASE  WHEN
                  "PERIODS"."CALENDRICAL_EQUIVALENT" IS NOT NULL THEN TO_DATE(''||TO_CHAR("PERIODS"."CALENDRICAL_EQUIVALENT")|
                  |'/01/'||"YEARS"."FISCAL_YEAR"||'','MM/DD/YYYY') ELSE
                  TO_DATE('06/01/'||"YEARS"."FISCAL_YEAR"||'','MM/DD/YYYY')+14 END >TO_DATE('2004-06-01 00:00:00',
                  'yyyy-mm-dd hh24:mi:ss'))
      25 - access("LC"."FISCAL_YEAR_ID"="AP"."FISCAL_YEAR_ID" AND
                  "LC"."FISCAL_PERIOD_ID"="AP"."FISCAL_SYSTEM_PERIOD_ID")
           filter("LC"."FISCAL_PERIOD_ID"="AP"."FISCAL_SYSTEM_PERIOD_ID" AND
                  "LC"."FISCAL_YEAR_ID"="AP"."FISCAL_YEAR_ID")
      27 - filter("COMMITED_DATE" IS NOT NULL)
    55 rows selected.

  • 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

  • Materialized view error

    Hi,
    I am using oracle 9i and OS is HP UNIX .
    I encountered the below error while doing fast refresh for a Materialized view.
    ORA-12008: error in materialized view refresh path
    ORA-04030: out of process memory when trying to allocate 56 bytes (cursor work he,kenv: ktfcsnp)
    please advise how to resolve this error.
    Thanks !

    Hi,
    Please check this link, it is possible that you are running them all at the same time...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4541191739042#14605788052967
    Let me know if it helps.
    Thanks,
    Rajesh.

  • ORA-12052 when create materialized view

    I following the sample in Oracle document to create materialized viewCREATE MATERIALIZED VIEW LOG ON sales
       WITH ROWID, SEQUENCE(amount_sold, time_id, prod_id)   INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON times
       WITH ROWID, SEQUENCE (time_id, calendar_year)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON products
       WITH ROWID, SEQUENCE (prod_id,prod_name)  INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE   REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,
          SUM(s.amount_sold) AS sum_sales
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id
          GROUP BY t.calendar_year, p.prod_id, p.prod_name; This works. BUt I actually does not want do aggregation. Thus I changed the MV creation statement toCREATE MATERIALIZED VIEW sales_mv
       BUILD IMMEDIATE REFRESH FAST ON COMMIT
       AS SELECT t.calendar_year, p.prod_id, p.prod_name,s.amount_sold
          FROM times t, products p, sales s
          WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id;I got errorSQL Error: ORA-12052: cannot fast refresh materialized view GLU.SALES_MV
    *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.Please help or point me to the relevant document.
    Thanks

    damorgan, Thank you for you reply.
    the inner table of an outer join did not have UNIQUE constraints on join columns.
    I am not sure how much clearer and explanation can be written.If you look at the query, you will find that there is no outer join in the query.
    sales table does not have unique constraints on prod_id and time_id. If this is the cause of the problem, I cannot change the data but is there a work around. That is way I ask for specific doc. In 11g documents, I only find some info on CREATE MV. That is mainly on syntax but not on requirement.

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

  • ORA-00905: missing keyword error while creating a materialized view

    Hi Gurus,
    I am trying to create a materialized view as :
    1 CREATE MATERIALIZED VIEW AMREG.ClientData
    2 TABLESPACE AMREG_DATA
    3 COMPRESS
    4 PARALLEL
    5 NOLOGGING
    6 BUILD IMMEDIATE
    7 REFRESH COMPLETE
    8 ON DEMAND
    9 DISABLE QUERY REWRITE
    10 REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    11 AS
    12 SELECT
    13 CHILD.CLIENT_SGK "Child SGK",
    14 CHILD.CLIENT_NAME "Child Name",
    15 CHILD.ARC_ACCT_CD "Child ARC Acct Code",
    16 ULTIMATE.CLIENT_SGK "Ultimate Parent SGK",
    17 ULTIMATE.CLIENT_NAME "Ultimate Parent Name",
    18 ULTIMATE.ARC_ACCT_CD "Ultimate ARC Acct Code",
    19 HIER.LVL_FROM_ANCESTOR ,
    20 FROM [email protected] CHILD,
    21 [email protected] HIER,
    22 [email protected] ULTIMATE
    23 WHERE HIER.DESCENDANT_CLIENT_SGK = CHILD.CLIENT_SGK
    24* AND ULTIMATE.CLIENT_SGK = HIER.ANCESTOR_CLIENT_SGK;
    SQL> /
    REFRESH START WITH TRUNC( SYSDATE + 1 ) + 3/24 NEXT TRUNC( SYSDATE + 1 ) + 3/24
    ERROR at line 10:
    ORA-00905: missing keyword
    DBLink name is : DNYCPH60.WORLD
    Please guide me on this and help to resolve the issue.

    Ummm how about not posting the same question 4 times in 3 different forums?
    Gints Plivna
    http://www.gplivna.eu

  • A problem about ORA-12058 of materialized view

    consider the huge data of tableB, we make a decision about build materialized view using "on prebuilt table" parameter.
    create materialiezd view log on tableB rowid mode.
    when we create materialized view we got the error ORA-12058.
    Is there someone can tell us why?
    thank you very much我
    SQL> CREATE MATERIALIZED VIEW USERA.TABLEA
    3 REFRESH FORCE
    4 WITH ROWID
    5 AS SELECT * FROM USERB.TABLEB@DBLINK01 ;
    CREATE MATERIALIZED VIEW USERA.TABLEA
    ON PREBUILT TABLE
    REFRESH FORCE
    WITH ROWID
    AS SELECT * FROM USERB.TABLEB@DBLINK01
    ORA-12058: materialized view cannot use prebuilt table

    Hello SuperPianist,
    Please take a look at this document, and let me know if the troubleshooting steps help to resolve your microphone issues.
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • ORA-12096: error in materialized view log

    Hi All,
    I had created a fast refresh materialized view. Log was also created.
    Now i dropped the mv and the logs.
    But now every time i update or insert into this customer table i get error message.
    ORA-12096: error in materialized view log on Customer
    ORA-00942: table or view does not exist
    There are entries in the DBA_MVIEW_LOGS for customer table.
    Please suggest.

    Hi,
    What database version are you on?
    And do you have access to Metalink/My Oracle Support?
    Found this, by the way:
    ORA-12096: error in materialized view log on <table>
    If problems occur when you try to access a log file for a materialized view, the system issues an ORA-12096 error message which is followed by the actual error. If the ORA-12096 error message is accompanied by an ORA-00942 message, the problem may be due to an online reorganization that was only partially undone. In this case, you can drop the log file for the materialized view manually (after you have verified that it is no longer required):
    DROP MATERIALIZED VIEW LOG ON <table>;
    Edited by: hoek on Jul 29, 2009 2:15 PM

  • ORA-12096: error in materialized view log on ORA-01301:insufficient privile

    Hi,
    One of our ebusiness Apps 11510 instances has database that was
    upgraded from 9.2.0.6 to 10.2.0.4 with Database Vault.
    After that, we are getting an error:
    ORA-12096: error in materialized view log on "SCHEMA"."TABLE_NAME" ORA-01301:insufficient privileges
    Can you please let know what can be the reason. Which user is being checked for the privileges?
    Regards

    I am facing the same issue in one of our internal instances.
    Apps Environment has been upgraded from Database 9.2.0.6 to Database 10.2.0.4 with Database Vault. We started facing this issue and the same error after the upgrade. MLOG definition has not changed.
    What privilege is it expecting to be present for the schema.
    The definition of the MLOG is as given below
    LOG_TRIGGER = NULL
    ROWIDS = YES
    PRIMARY_KEY = NO
    OBJECT_ID = NO
    FILTER_COLUMNS = NO
    SEQUENCE = NO
    INCLUDE_NEW_VALUES = NO

Maybe you are looking for

  • How to delete reading list in ios 7

    Please i want to know how to delete reading list in ios7

  • Current position in ovi maps 3.06

    Hi All, I have N8 with ovi maps 3.06. I was just wondering how to get current position in current maps, as there is no option as there was in older versions. I click on maps and then nothing happens Plese help Thanks

  • Materialized view query (Oracle 9i)

    I have dropped a materialized view query and trying to create the same with additional columns in the prebuilt table. Option - 1 when Iam using a query in the materialized view query "select * from schema.table@link, with refresh mode fast option, th

  • Albums With Over 50 Tracks Split

    Is it normal for albums with over 50 tracks to split up into different sections? How do I take a screenshot with Mac, so I can show you what I mean.

  • Calling AdvancedDataGridSortItemRenderer with custom header

    HI, I have searched for a few hours now no luck... I have an advanced datagrid, with a lot of columns showing small check mark icon for boolean value. To make the columns smaller, I made a simple headerRenderer that rotates the labels 90 degrees, so