Materialized View - does not contain a primary key constraint

I am trying to create materialized view. I gone through the MV wizard creation. Added 2 columns (foo_column, foo_pk) of the table and have a simple select statement (Select foo_column from foo_dim). Also created a primary key contrainst and refencing the primary key (FOO_PK) of the dimension.
I am getting the following error:
ORA-12014: table 'FOO_DIM' does not contain a primary key constraint

It was solved. The table that I am querying has to have a primary key defined before creating a materialized view.

Similar Messages

  • ORA-12014 table does not contain a primary key constraint

    Hi
    I have some existing Materialised Views I am trying to redeploy through OWB as its now our standard tool.
    The existing code has
    CREATE MATERIALIZED VIEW .......
    .REFRESH ON DEMAND WITH ROWID AS
    SELECT *
    FROM apps.fafg_assets
    When I create in OWB you only put the select statement, there is nowhere to put the 'with rowid ' part hence I get the following error on deployment;
    ORA-12014: table 'FAFG_ASSETS' does not contain a primary key constraint
    I cannot put a primary key on this table though so how do I get around this in OWB? Like I say writing the MV in PL/SQL putting the 'with rowid' bit makes it work?
    Thanks

    Hi...
    I believe you'll need a PK so Oracle will know how to update the MV. Is there any particular reason for you not having a PK in FAFG_ASSETS table? As an alternative, you may want to create a new column in this table and having a table trigger/sequence populating this column.
    But It looks like you are using EBS, so, I don't know if you can add new columns to tables.
    See if this thread can help you:
    Re: ORA-12014: table 'XXX' does not contain a primary key constraint
    Regards,
    Marcos

  • ORA-12014: table 'DBA' does not contain a primary key constraint

    Hai
    when implementing basic replication i got the below error.
    ORA-12014: table 'DBA' does not contain a primary key constraint
    I was wondering primary key is enable at remote table
    Any idea about this
    Regards
    mohan
    I am giving below example
    AT master site
    global_names=false in init.ora file
    sql>create table dba(no number primary key);
    table created
    and create snapshot log
    sql>create snapshot log on m1;
    materilized view created
    AT SNAPSHOT SITE
    1.Create service using net8 stiring name like n1
    2.create database link
    sql>create public database link m3 connect to system identified by manager using 'n1';
    Database link created.
    3.when creating snapshot site i got below error
    SQL> create snapshot snap1 refresh fast start with sysdate next sysdate+1/(24*60
    *60) as select * from dba@m3;
    create snapshot snap1 refresh fast start with sysdate next sysdate+1/(24*60*60)
    as select * from dba@m3
    ERROR at line 1:
    ORA-12014: table 'DBA' does not contain a primary key constraint

    Hello,
    Please repost this question in the appropriate section of the Discussion Forum.
    This forum is for general suggestions and feedback about the OTN site.
    You can also use our new offering called OTN Service Network:
    For Oracle Advice/Minimal Support (fee based) on the Oracle Database Server, Oracle9i Application Server Containers for J2EE (OC4J), Oracle9i JDeveloper, Reports, Forums, SQL*Plus, and PL/SQL, please go to: http://www.oracle.com/go/?&Src=912386&Act=45
    For customers with paid support (Metalink) please go to:
    http://www.oracle.com/support/metalink
    Regards,
    OTN

  • Error remote table does not contain a primary key

    I make replication between oracle and Microsoft sql using getway for sql but when I insert to table in oracle I get this error in apply process
    information :
    ASD.SUBHI.COM is database link from oracle to microsoft sql
    "DBO"."REGIONS" name of the table
    CREATE TABLE regions (a INTEGER primary key) command to create table
    error
    ORA-26711: remote table does not contain a primary key constraint ORA-26712: remote object is "DBO"."REGIONS"@"ASD.SUBHI.COM"
    Note: I go to sql server and verify that primary key is creates
    is this the best place to like this question ?
    if you need more details please tell me I need the answer

    I make replication between oracle and Microsoft sql using getway for sql but when I insert to table in oracle I get this error in apply process
    information :
    ASD.SUBHI.COM is database link from oracle to microsoft sql
    "DBO"."REGIONS" name of the table
    CREATE TABLE regions (a INTEGER primary key) command to create table
    error
    ORA-26711: remote table does not contain a primary key constraint ORA-26712: remote object is "DBO"."REGIONS"@"ASD.SUBHI.COM"
    Note: I go to sql server and verify that primary key is creates
    is this the best place to like this question ?
    if you need more details please tell me I need the answer

  • View object SponsorVwView does not include a primary key attribute RowId

    Hi,
    I have an Entity Object and a View Object which do not have a primary key. So I use a ROWID to act as one. The only thing is that sometimes I get this error which causes the application to fail on the server:
    JBO-30003: The application pool (gov.fda.cber.pts.model.services.CberPtsServiceLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.PersistenceException, msg=JBO-26028: View object SponsorVwView does not include a primary key attribute RowId of entity base SponsorVw.
    Does anyone have any any ideas on this?
    Thank you in advance

    Hi...
    I believe you'll need a PK so Oracle will know how to update the MV. Is there any particular reason for you not having a PK in FAFG_ASSETS table? As an alternative, you may want to create a new column in this table and having a table trigger/sequence populating this column.
    But It looks like you are using EBS, so, I don't know if you can add new columns to tables.
    See if this thread can help you:
    Re: ORA-12014: table 'XXX' does not contain a primary key constraint
    Regards,
    Marcos

  • Error : Rowkey does not have any primary key attributes

    Hello All,
    I'm developing an ADF application which has a few ADF forms. The forms have VO's and some tables.
    On running, I seem to be getting this error
    <Error> <oracle.adfinternal.view.faces.model.binding.CurrencyRowKeySet> <BEA-000000> <ADFv: Rowkey does not have any primary key attributes. Rowkey: oracle.jbo.Key[], table: oracle.jbo.server.ViewObjectImpl@2ecf4f19.>
    Where does the Rowkey have to be set? Is it in the VO?
    Regards,
    PP

    Make sure that the VO's you use have at least one attribute selected as a key attribute. GO to View Object overview editor and select attributes tab, see whether there is at least one attribute marked as a key. If not select the most appropriate attribute from the list of fields and go to edit attribute dialog, tick the key attribute property.

  • Errors in the high-level relational engine. The data source view does not contain a definition for the table or view. The Source property may not have been set.

    Hi All,
    I have a cube in which i'm using the TIME DIM that i created in the warehouse. But now i wanted a new measure in the cube which is Average over time and when i wanted to created the new measure i got a message that no time dim was defined, so i created a
    new time dimension in the SSAS using wizard. But when i tried to process the new time dimension i'm getting the follwoing error message
    "Errors in the high-level relational engine. The data source view does not contain a definition for "SSASTIMEDIM" the table or view. The Source property may not have been set."
    Can anyone please tell me why i cannot create a new measure average over the time using my time dimension? Also what am i doing wrong with the SSASTIMEDIM, that i'm getting the error.
    Thanks

    Hi PMunshi,
    According to your description, you get the above error when processing the time dimension. Right?
    In this scenario, since you have updated the DSV, it should have no problem on the table existence. One possibility is that table has been specified for tracking in the notifications for proactive caching, but isn't available any more for some
    reason. Please change the setting in Proactive Caching into "MOLAP".
    Reference:
    How To Implement Proactive Caching in SQL Server Analysis Services SSAS
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Getting ADFv: Rowkey does not have any primary key attributes

    Hi
    I am using 11.1.1.5.0 version of JDeveloper.
    The ViewObject has DistaccountId,OperatingUnit,PricingCategoryId,PartyId as Primary Key and
    the EntityObject also has DistaccountId,OperatingUnit,PricingCategoryId,PartyId as Primary Key
    and my Table also has the same set of attributes(DistaccountId,OperatingUnit,PricingCategoryId,PartyId) as Primary Key .
    I am getting the following error on Create,Update Operation -
    "<CurrencyRowKeySet> <_computeCurrentRowKey> ADFv: Rowkey does not have any primary key attributes. Rowkey: oracle.jbo.Key[], table: oracle.jbo.server.ViewObjectImpl@6c41af."
    Also,when i choose a row for Update operation,the pop-up that opens up holds the values for some other record.
    Please suggest.

    I'm not too sure but can you check if you have the following text in your page source ?
    selectedRowKeys="#{bindings.<TreeBindingName>.collectionModel.selectedRow}"
    selectionListener="#{bindings.<TreeBindingName>.collectionModel.makeCurrent}"

  • On commit fast refreshable materialized view does not update

    ... but instead it deletes and inserts. And I would like it to perform an update, so we can add a database trigger to call a webservice. But it's crucial that we call the "update webservice" when it updates.
    This is an Oracle 10.2.0.4 database.
    Output of my problem-reproducing-case:
    First creation of a small instrumentation setup:
    SQL> create table logtable
      2  ( id   number
      3  , time timestamp
      4  , text varchar2(100)
      5  )
      6  /
    Tabel is aangemaakt.
    SQL> create sequence log_seq cache 100
      2  /
    Reeks is aangemaakt.
    SQL> create procedure add_log_message (p_text in varchar2)
      2  is
      3    pragma autonomous_transaction;
      4  begin
      5    insert into logtable
      6    values (log_seq.nextval,systimestamp,p_text);
      7    commit;
      8  end;
      9  /
    Procedure is aangemaakt.Two tables with full blown materialized view logs defined on them:
    SQL> create table t1 (id,ean)
      2  as
      3   select level
      4        , to_char(trunc(dbms_random.value(0,999999999999999999)))
      5     from dual
      6  connect by level <= 10
      7  /
    Tabel is aangemaakt.
    SQL> alter table t1 add primary key (id)
      2  /
    Tabel is gewijzigd.
    SQL> create materialized view log on t1 with sequence, rowid (id,ean) including new values
      2  /
    Gematerialiseerde viewlog is aangemaakt.
    SQL> create table t2 (id,t1_id,value)
      2  as
      3   select level
      4        , level * 2
      5        , trunc(dbms_random.value(1,100))
      6     from dual
      7  connect by level <= 5
      8  /
    Tabel is aangemaakt.
    SQL> alter table t2 add primary key (id)
      2  /
    Tabel is gewijzigd.
    SQL> alter table t2 add foreign key (t1_id) references t1(id)
      2  /
    Tabel is gewijzigd.
    SQL> create materialized view log on t2 with sequence, rowid (id,t1_id,value) including new values
      2  /
    Gematerialiseerde viewlog is aangemaakt.And the materialized view itself, containing an outer join. And on that materialized view there is a trigger that logs the action performed (I, U or D):
    SQL> create materialized view mv refresh fast on commit
      2  as
      3  select t1.rowid t1_rowid
      4       , t2.rowid t2_rowid
      5       , t1.id    t1_id
      6       , t1.ean   ean
      7       , t2.id    t2_id
      8       , t2.value value
      9    from t1
    10       , t2
    11   where t1.id = t2.t1_id (+)
    12     and t1.ean is not null
    13  /
    Gematerialiseerde view is aangemaakt.
    SQL> create trigger mv_trg_ariud
      2  after insert or update or delete on mv
      3  for each row
      4  begin
      5    add_log_message
      6    ( case
      7        when inserting then 'I'
      8        when updating then 'U'
      9        when deleting then 'D'
    10      end
    11    );
    12  end;
    13  /
    Trigger is aangemaakt.
    SQL> select * from mv
      2  /
    T1_ROWID           T2_ROWID                T1_ID EAN                                           T2_ID      VALUE
    AAFwMeAChAABamIAAA                             1 360432237186591962
    AAFwMeAChAABamIAAB AAFwMhAChAABamaAAA          2 706465424496730795                                1         77
    AAFwMeAChAABamIAAC                             3 678961199378791568
    AAFwMeAChAABamIAAD AAFwMhAChAABamaAAB          4 351418443524585979                                2         35
    AAFwMeAChAABamIAAE                             5 610374519804201714
    AAFwMeAChAABamIAAF AAFwMhAChAABamaAAC          6 798782716740397566                                3         33
    AAFwMeAChAABamIAAG                             7 909989471290455410
    AAFwMeAChAABamIAAH AAFwMhAChAABamaAAD          8 670698835550268126                                4         69
    AAFwMeAChAABamIAAI                             9 746290195605805530
    AAFwMeAChAABamIAAJ AAFwMhAChAABamaAAE         10 157491298211132413                                5         82
    10 rijen zijn geselecteerd.Now we add a new t1 row, which leads to an extra row in the mv on commit time:
    SQL> insert into t1 values (11, '999999999999999999')
      2  /
    1 rij is aangemaakt.
    SQL> commit
      2  /
    Commit is voltooid.
    SQL> select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      2    from logtable
      3   order by id
      4  /
    LOG
    I         11:39:47.817225
    1 rij is geselecteerd.
    SQL> select * from mv where ean = '999999999999999999'
      2  /
    T1_ROWID           T2_ROWID                T1_ID EAN                                           T2_ID      VALUE
    AAFwMeAChAABamJAAA                            11 999999999999999999
    1 rij is geselecteerd.As expected. Now insert a record in t2, which should lead to an update of the materialized view:
    SQL> insert into t2 values (11,11,1)
      2  /
    1 rij is aangemaakt.
    SQL> commit
      2  /
    Commit is voltooid.
    SQL> select * from mv where ean = '999999999999999999'
      2  /
    T1_ROWID           T2_ROWID                T1_ID EAN                                           T2_ID      VALUE
    AAFwMeAChAABamJAAA AAFwMhAChAABambAAA         11 999999999999999999                               11          1
    1 rij is geselecteerd.
    SQL> select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      2    from logtable
      3   order by id
      4  /
    LOG
    I         11:39:47.817225
    D         11:39:47.992824
    I         11:39:48.015072
    3 rijen zijn geselecteerd.But it doesn't: apparently it has inserted a row and deleted a row. Let's do a normal update:
    SQL> update t2 set value = 2 where id = 11
      2  /
    1 rij is bijgewerkt.
    SQL> commit
      2  /
    Commit is voltooid.
    SQL> select * from mv where ean = '999999999999999999'
      2  /
    T1_ROWID           T2_ROWID                T1_ID EAN                                           T2_ID      VALUE
    AAFwMeAChAABamJAAA AAFwMhAChAABambAAA         11 999999999999999999                               11          2
    1 rij is geselecteerd.
    SQL> select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      2    from logtable
      3   order by id
      4  /
    LOG
    I         11:39:47.817225
    D         11:39:47.992824
    I         11:39:48.015072
    D         11:39:48.142621
    I         11:39:48.168553
    5 rijen zijn geselecteerd.And again: a delete and an insert.
    Does anybody know if I can change this behaviour and let the mv perform an update?
    In another materialized view (not shown here) containing aggregates, I've seen that it performs an update. But using this "join" mv, it does not.
    Here is the script, if you want to try it on your own database:
    create table logtable
    ( id   number
    , time timestamp
    , text varchar2(100)
    create sequence log_seq cache 100
    create procedure add_log_message (p_text in varchar2)
    is
      pragma autonomous_transaction;
    begin
      insert into logtable
      values (log_seq.nextval,systimestamp,p_text);
      commit;
    end;
    create table t1 (id,ean)
    as
    select level
          , to_char(trunc(dbms_random.value(0,999999999999999999)))
       from dual
    connect by level <= 10
    alter table t1 add primary key (id)
    create materialized view log on t1 with sequence, rowid (id,ean) including new values
    create table t2 (id,t1_id,value)
    as
    select level
          , level * 2
          , trunc(dbms_random.value(1,100))
       from dual
    connect by level <= 5
    alter table t2 add primary key (id)
    alter table t2 add foreign key (t1_id) references t1(id)
    create materialized view log on t2 with sequence, rowid (id,t1_id,value) including new values
    create materialized view mv refresh fast on commit
    as
    select t1.rowid t1_rowid
         , t2.rowid t2_rowid
         , t1.id    t1_id
         , t1.ean   ean
         , t2.id    t2_id
         , t2.value value
      from t1
         , t2
    where t1.id = t2.t1_id (+)
       and t1.ean is not null
    create trigger mv_trg_ariud
    after insert or update or delete on mv
    for each row
    begin
      add_log_message
      ( case
          when inserting then 'I'
          when updating then 'U'
          when deleting then 'D'
        end
    end;
    select * from mv
    insert into t1 values (11, '999999999999999999')
    commit
    select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      from logtable
    order by id
    select * from mv where ean = '999999999999999999'
    insert into t2 values (11,11,1)
    commit
    select * from mv where ean = '999999999999999999'
    select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      from logtable
    order by id
    update t2 set value = 2 where id = 11
    commit
    select * from mv where ean = '999999999999999999'
    select rpad(text,10) || to_char(time,'hh24:mi:ss.ff6') log
      from logtable
    order by id
    set echo off
    drop materialized view mv
    drop table t2 purge
    drop table t1 purge
    drop procedure add_log_message
    drop sequence log_seq
    drop table logtable purge
    /Regards,
    Rob.
    Edited by: Rob van Wijk on 7-mrt-2009 9:49
    bump

    Rob,
    here's what Tom says about this:
    seems dangerous as there is nothing stopping Oracle from performing an "update" of a materialized
    view as a DELETE+INSERT.  For you see, the internals of how materialized views are maintained are
    "internal" and subject to change (so even if documented - so what, you cannot control the "how" of
    materialized view refreshes)
    ...It is from 2006 though ...things might have changed ;)

  • Materialized view does not exist upon refresh

    Hi all,
    I got the following stack trace upon executing 'DBMS_MVIEW.REFRESH('Layout_tab','C')' to refresh an materialized view upon an object table:
    ORA-23401: materialized view "MINIMOL"."LAYOUT_TAB" does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 794
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 851
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    The view create statement is following:
    CREATE MATERIALIZED VIEW PlateLayout_tab
    OF PlateLayout
    CACHE
    REFRESH ON DEMAND
    AS
    SELECT
    PlateLayout(l.id,VALUE(pos),l.ComputeCheckerboardPosition(VALUE(pos)))
    FROM
    Layout_tab l
    , TABLE(mcu_enumerate.LoopFor(1,l.wells_across * l.wells_down)) pos;
    now what is going wrong? I can't even create the view with the 'REFRESH ON COMMIT' option.
    Thanks,
    Henrik

    John,
    it is only a typo in the posted message, but the executed SQL-smt of course was:
    EXECUTE DBMS_MVIEW.REFRESH('PlateLayout_tab','C');
    After browsing through metalink I even tried this:
    EXECUTE DBMS_MVIEW.REFRES('PlateLayout_tab','C','',TRUE,FALSE,0,0,0,TRUE);
    with the same stack trace.
    By the way the MVIEW is accessible via:
    SELECT * FROM PlateLayout_tab
    Thanks,
    Henrik

  • Confused ... ALL_DEPENDECIES view does not contain indexes?

    I try to generate a installation sequence for all my objects, for this I experimented with the all_dependecies view
    1st generate a table with all objects:
    <pre>
    drop table rank_sources;
    create table rank_sources as
    select rownum as rn, object_name, object_type, owner from all_objects
    where owner = 'SYS';
    commit;
    select * from rank_sources;
    </pre>
    afterwards fire a pl/sql
    <pre>
    set serveroutput on
    declare
    cursor l_cursor is select * from rank_sources for update;
    l_found boolean := false;
    begin
    for src in l_cursor loop
    l_found := false;
    for dep in (
    select level, referenced_name, referenced_type
    from DBA_DEPENDENCIES
    where owner = src.owner
    and referenced_owner = src.owner
    start with name = src.object_name and type = src.object_type
    connect by name = prior referenced_name and type = prior referenced_type
    loop
    l_found := true;
    update rank_sources
    set rn = src.rn - dep.level
    where object_name = dep.referenced_name
    and object_type = dep.referenced_type;
    end loop;
    if not l_found then
    update rank_sources
    set rn = -9999999999 where CURRENT OF l_cursor;
    end if;
    end loop;
    commit;
    end;
    </pre>
    As you can see, there are potentially indexes with a lower rank than their table. When you do a
    <pre>select * from all_dependencies where type like '%INDEX%'</pre>
    the result is NULL - I am really confused why indexes are not referencing to their tables?? So in case of Index I have to query seperatly all_indexes.
    But when you look at the all_dependecies view definition you can see, index as an expected type - is this a bug? I use Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    <pre>
    SET DEFINE OFF;
    DROP VIEW SYS.ALL_DEPENDENCIES
    /* Formatted on 20.10.2010 12:31:15 (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE FORCE VIEW SYS.ALL_DEPENDENCIES
    OWNER,
    NAME,
    TYPE,
    REFERENCED_OWNER,
    REFERENCED_NAME,
    REFERENCED_TYPE,
    REFERENCED_LINK_NAME,
    DEPENDENCY_TYPE
    AS
    SELECT u.name,
    o.name,
    DECODE (o.type#,
    0, 'NEXT OBJECT',
    1, 'INDEX',
    2, 'TABLE',
    3, 'CLUSTER',
    4, 'VIEW',
    </pre>
    Thanks
    Chris

    Ok, so what I have done so far - to get a solution for my requirement - I created a sys view like this:
    <pre>
    create or replace
    view REALLY_ALL_DEPENDENCIES as
    select *
    from ALL_DEPENDENCIES
    union
    select owner, index_name, 'INDEX', table_owner, table_name, table_type, null, null
    from all_indexes
    union
    select p.owner, p.table_name, 'TABLE', f.owner, f.table_name, 'TABLE', null, null
    from all_constraints p
    join all_constraints f
    on F.R_CONSTRAINT_NAME = P.CONSTRAINT_NAME
    and F.CONSTRAINT_TYPE = 'R'
    and p.constraint_type='P'
    </pre>
    Since union is checking for duplicates, it should be harmless to use this view from now on :-) ... ok, performance is not really good, but I do not use the view every minute - maybe once a day.
    Thanks and cheers
    Chris

  • ADFS - The metadata does not contain the signing key needed for the entity to be configured as a claims provider trust

    Our customer has provided us with federated metadata.xml file. When we go to import and create the claims provider trust we receive this error message:
    I have performed considerable Google search to be able to tell the customer what is missing. Can you provide explanation as to what ADFS is expecting in the customer xml file that it is not getting?
    Thanks,
    Paul

    They'll help you over here.
    ADFS forums on MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Create a materized view without primary key constraint on the base table?

    Hi
    I tried to create a materized view but I got this error:
    SQL> CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    ERROR at line 1:
    ORA-12014: table 'TABLE1' does not contain a primary key constraint.
    TABLE1 in remote_db doesn't have a primary key constraint. Is there anyway that I can create a materized view on a base table which doesn't have a primary key constraint?
    Thanks
    Liz

    Hi,
    Thanks for your helpful info. I created a materialized view in the source db with rowid:
    SQL> CREATE MATERIALIZED VIEW log on TABLE1 with rowid;
    Materialized view log created.
    Then I created a MV on the target DB:
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    REFRESH FAST
    with rowid
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    ERROR at line 1:
    ORA-12018: following error encountered during code generation for
    "my_schema"."TABLE1_MV"
    ORA-00942: table or view does not exist
    TABLE1 exists in remote_db:
    SQL> select count(*) from TABLE1@remote_db;
    COUNT(*)
    9034459
    Any clue what is wrong?
    Thanks
    Liz

  • CREATE MATERIALIZED VIEW - TABLE OR VIEW DOES NOT EXIST

    Anybody can help me? Why could this happen?
    SQL> CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
    2 TABLESPACE MVU
    3 NOCACHE
    4 NOPARALLEL
    5 REFRESH FORCE
    6 START WITH TO_DATE('19-APR-2005 18:00:00','DD-MON-YYYY HH24:MI:SS')
    7 WITH PRIMARY KEY
    8 USING DEFAULT LOCAL ROLLBACK SEGMENT
    9 DISABLE QUERY REWRITE AS
    10 SELECT PT,
    11 TO_CHAR(TANGGAL,'MMYYYY')PERIODE,
    12 AFDELING,
    13 BLOK,
    14 TH_TANAM,
    15 SUM(TON_TERIMA) TON_TERIMA,
    16 SUM(JJG_TERIMA) JJG_TERIMA,
    17 SUM(JJG_PANEN) JJG_PANEN,
    18 SUM(HK) HK, (LS_TANAM),
    19 DECODE(LS_TANAM,0,0,ROUND((SUM(TON_TERIMA)/(LS_TANAM)),2)) YIELD,
    20 HITUNG_STANDARD_YIELD (PT, TH_TANAM,TO_CHAR(TANGGAL,'MMYYYY')) YIELD_STD,
    21 DECODE(SUM(JJG_TERIMA),0,0,ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_TERIMA),2)) BJR,
    22 HITUNG_STANDARD_BJR_TH_TANAM(PT,TH_TANAM) BJR_STD,
    23 DECODE(SUM(HK),0,0,ROUND((SUM(TON_TERIMA)*1000/SUM(HK)),2)) OP,
    24 DECODE(SUM(JJG_TERIMA),0,0,HITUNG_STANDARD_OUTPUT_PEMANEN(ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_
    TERIMA),2))) OP_STD,
    25 MAX(POTENSI) POTENSI,
    26 MAX(DIS_POT) DIS_POT,
    27 DECODE(LS_TANAM,0,0,ROUND(MAX(POTENSI)*MAX(DIS_POT)/100/LS_TANAM,2)) YIELD_POTENSI,
    28 MAX(RAPIM) RAPIM,
    29 MAX(DIS_RAPIM) DIS_RAPIM,
    30 DECODE(LS_TANAM,0,0,ROUND(MAX(RAPIM)*MAX(DIS_RAPIM)/100/LS_TANAM,2)) YIELD_RAPIM
    31 FROM (SELECT B.*, A.LS_TANAM, A.TH_TANAM, POTENSI, DIS_POT, RAPIM, DIS_RAPIM
    32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
    33 WHERE A.PT = B.PT
    34 AND B.PT = C.PT
    35 AND C.PT = D.PT
    36 AND A.KD_AFD = B.AFDELING
    37 AND B.AFDELING = C.AFDELING
    38 AND A.KD_BLOK = B.BLOK
    39 AND B.BLOK = C.BLOK
    40 AND A.TAHUN = TO_CHAR(TANGGAL,'RRRR')
    41 AND TO_CHAR(TANGGAL,'MM')=D.BULAN
    42 AND A.TAHUN = D.TAHUN
    43 AND A.TAHUN = C.TAHUN
    44 AND A.LS_TANAM > 0) A
    45 GROUP BY PT, TO_CHAR(TANGGAL,'MMYYYY'), AFDELING, BLOK, LS_TANAM, TH_TANAM
    46 /
    CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
    ERROR AT LINE 1:
    ORA-00942: TABLE OR VIEW DOES NOT EXIST

    32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
    Either of these tables/views do not exist. Check the spelling of the table/view names

  • Create materialized View fails with "table or view does not exist"

    DB: 10.2.0.4
    OS: Win 2003
    Hi,
    Here in my tests, i have 2 databases (A(source) and B(backup)), and i am trying to create an mview in database B to replicate data from one test table from database A, only for test purpose. I'm getting the error "table or view does not exist" when i try to create a mview with REFRESH FAST. Here is my code:
    CREATE MATERIALIZED VIEW TESTES.TAB_TESTES_REPLIC_MVIEW_02
    REFRESH FAST
    START WITH TO_DATE('21/02/2012 18:50:00', 'DD/MM/YYYY HH24:MI:SS')
    NEXT SYSDATE + 1/24/60
    WITH PRIMARY KEY
    AS SELECT REGISTRO1,
    REGISTRO2
    FROM TESTES.TAB_TESTES_REPLIC_MVIEW_02@DB_LINK_ORA10;
    The dblink is workig fine(dblink user has select privilege on TESTES.TAB_TESTES_REPLIC_MVIEW_02), and i have created the mview log on database A.
    Where is my mistake.
    Thanks a lot.
    Edited by: Fabricio_Jorge on 21/02/2012 19:06

    I found the solution.
    I had to grant SELECT on the mview log. The name is avaiable in DBA_MVIEW_LOGS

Maybe you are looking for

  • How do I install iMovie08 on my iMac after migrating

    I bought a new iMac and transferred my Macbook G4 to it including iLife sans iMovie because it would not install on that machine. Now I want to add the '08 version to my iLife suite and tried inserting the disc and reinstalling iLife to no avail. I s

  • Adobe acrobat pro DC trial download error (Mac)

    When I try to download the trial version of Adobe acrobat DC pro on my mac, it gives an error "Acrobat installer encountered an unexpected failure. Please try again. If it continues to fail contact Adobe support". I have tried doing in about 5 times,

  • Access Violation in DllMain of coherence.dll

    I have an issue with C++ project, that using coherence (version 3.7). During loading the exe file dialog box is shown with the message: "The application failed to initialize properly (0xc0000005)". After clicking "OK" the process terminates. Running

  • I can't get Vimeo videos to add to my muse pages.  Help

    Can anyone tell me how to make Vimeo work on my Muse pages.  Not working as shown in tutorial video

  • How to search by Keyword Tags

    I have just installed PS El:11 and convered the catalogue from PS El:10 however whilst all the photo's are showing none appear under the tags created in PS El:10 However all the tags have transferred to 11 but no photos appear to be linked - what hav