Updatable materialized view- error with CREATE_SNAPSHOT_REPGROUP

I'm trying to create an updatable materialized view from the replication administrators account (REPADMIN). I use the assistant and in the third step (after creating the replication group and the materialized view), when the materialized view is going to be added to the group, I got this error:
ERROR in line 1:
ORA-01403: No data found
ORA-06512: in "SYS.DBMS_REPCAT_SNA_UTL", line 5927
ORA-06512: in "SYS.DBMS_REPCAT_SNA", line 82
ORA-06512: in "SYS.DBMS_REPCAT", line 1332
ORA-06512: in "SYS.DBMS_REPCAT", line 1307
ORA-06512: in line 2
I have also tried to use the command file that the assistant generates (I add below), and the error is triggered within the CREATE_SNAPSHOT_REPOBJECT procedure.
Has anybody any idea to resolve the problem?
Thanks in advance
BEGIN
DBMS_REPCAT.CREATE_SNAPSHOT_REPGROUP(
gname => '"MYGROUP"',
master => 'DB.DOMAIN.COM',
propagation_mode => 'ASYNCHRONOUS');
END;
CREATE SNAPSHOT "MYUSER"."MYTABLE"
REFRESH COMPLETE WITH ROWID
FOR UPDATE
AS SELECT "COD", "NAME" FROM
"MYUSER"."MYTABLE"@DB.DOMAIN.COM c
BEGIN
DBMS_REFRESH.ADD(
name => '"MYUSER"."REF3"',
list => '"MYUSER"."MYTABLE"',
lax => TRUE);
END;
BEGIN
DBMS_REPCAT.CREATE_SNAPSHOT_REPOBJECT(
gname => '"MYGROUP"',
sname => '"MYUSER"',
oname => '"MYTABLE"',
type => 'SNAPSHOT',
min_communication => FALSE);
END;

Hello,
These days I have had some problems with my forum-account and I haven't been able to connect and reply.
Regarding to your doubt, the name of refresh group was correct, and as I see, the problem can't be related to the refresh group.
While the problem with my account was resolved, I created two new databases (*) and the problem within the materialized view process is disappeared. I suppose that my first original databases were degraded, but I don't know where.
(*) of course, I could do that because I use Oracle in an academy institution, not for production, thank God
Anyway, for now I will give up here. Thanks for your help.
Regards,

Similar Messages

  • Refresh Order Management Materialized Views errors out in R12.1.3

    Hi All -
    Refresh Order Management Materialized Views errors out in R12.1.3 when submitted with blank parameters. Please find below error details ..
    OEXITORDMV module: Refresh Order Management Materialized Views
    Current system time is 15-OCT-2012 11:30:29
    **Starts**15-OCT-2012 11:30:29
    ORACLE error 12008 in FDPSTP
    Cause: FDPSTP failed due to ORA-12008: error in materialized view refresh path
    ORA-01555: snapshot too old: rollback segment number 4 with name "_SYSSMU4_3768336236$" too small
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2566
    ORA
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Thanks,

    Cause: FDPSTP failed due to ORA-12008: error in materialized view refresh path
    ORA-01555: snapshot too old: rollback segment number 4 with name "_SYSSMU4_3768336236$" too small
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2566Please see old threads for the ORA-015555 docs you need to refer to.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=ORA-01555&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=ORA-01555+AND+Materialized+AND+View&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Scheduling updatable materialized view

    Hi everybody,
    As you may know I have a solution in which I have 5 sites .One master site with 4 updatable materialized view sites.
    I want to know that is it correct if I dont set up schedule push to run periodically and set it up to do continuous push ?
    I want in at least 2 minutes all sites become update and I have to mention that at first I tried multimaster but our client doesn't want that because they want if one special site becomes unavailable they others can not transfer data to eachother.
    I appreciate your help in advance.

    Your requirements are a bit unclear...
    1) In general, if you are looking to have sites updated within a minute or two of the original transaction being committed, you are better off looking at something like Streams rather than using materialized views.
    2) Architecturally, when you set up multi-master replication (which it sounds like you are attempting to do here), you need to choose between synchronous and asynchronous replication. Synchronous replication means that a transaction cannot commit until it has been pushed to all the other nodes, which is great for latency but horrible for performance, scalability, and availability. Very, very few people really want synchronous replication. That leaves asynchronous replication, which would require you to schedule jobs to replicate changes. Some folks who think they want asnychronous replication really want another technology entirely (i.e. DataGuard, RAC, etc).
    3) Are you sure about the requirement "they want if one special site becomes unavailable they others can not transfer data to each other"? That says that if one site fails, they want all transactions everywhere to fail. That pretty much defeats the purpose of setting up multi-master replication. If the system is only available as long as every node is available, and you're going to incur the overhead of synchronous replication on every change, you would be far better served consolidating everything into a single data center and potentially using RAC to create a multi-node cluster to spread the work among nodes. There would be very little benefit to offset the complexity of configuring and maintaining a multi-master replication environment if you didn't want the nodes to be able to continue in the event that one of them failed.
    Justin

  • Oracle Streams vs. Updatable Materialized View

    Does anyone have an idea in which cases Oracle Streams is better than Updatable MV or visa verse?

    Are you really talking about Updatable Materialized Views? Or multi-master replication? Personally, I'm rather hard-pressed to come up with a situation where updatable materialized views would be useful unless you're taking the next step and doing multi-master replication.
    In general, Streams is going to put less load on the source system than materialized views and is going to replicate data more quickly. The downside tends to be that it's a relatively new technology, so it's not appropriate for environments that have older versions of Oracle. Going along with that, you'll find a lot more people/ organizations/ setups using materialized views than Streams, which can be a good thing if you need to hire new staff/ get support from a local user group/ etc. Streams also tends to be more flexible, which can be a good thing, but also tends to make things a bit more complicated.
    If you can outline the particular problem you're trying to solve, we can probably be a lot more specific...
    Justin

  • Materialized View hangs with SELECT MAX

    Hi there,
    I'm using Oracle 10.2.0.4 on a 64bit AIX system and I am having issues with creating a materialized view.
    We have a large (1Tb) database and the large table the materialized view looks at is 200m rows.
    I've created 5 other materialized views each with a select max clause and all looking at the same table.
    When I created my problem MV I forget the select max and it created in 22mins.
    I corrected my error by putting in the select max clause (so as to retrieve the top record) and the create MV ran for 16hrs+, I killed it.
    If I just run the select statement at a sqlplus prompt it runs through in 22mins, if I create another object e.g. a table from the query it creates in 22mins.
    So the question would be, why can I not create a MV using SELECT MAX on 10.2.0.4?
    If I've missed any details don't hesitate to ask.
    Thanks in advance.

    Hi Justin,
    Thank you for your reply.
    It has been upgraded to 9.2.0.8.0 from 9.1.... I'm not aware about the procedure used.
    I could see a job scheduled for the materialized view , but that fails and it's broken after 16 attempts.
    How to log the error generated by the Refresh Job?
    Recreating the View - After the upgrade I have created the Materialized view again. Object T1 exists in the user schema User1.
    I'm not explicitly getting any error but the refresh doesn't happens , so I couldn't find any records in the materialized view.
    Thanks
    GM

  • Updatable Materialized View and Master Table on same database

    Hi all,
    My first question - Is it possible to have an Updatable Materialized View and the associated Master Table located on the same database?
    This is the requirement scenario:
    One unique database D exists.
    A is a batch table. Only inserts are allowed on Table A.
    M is an updatable materialized view on Table A (Master). Only updates are allowed on M (no insert or delete).
    Requirement is to push updates/changes from M to A periodically and then get the new inserted records from A into M via a refresh.
    Is this possible? What other approaches are applicable here?

    John,
    My question is related to the implementation and setup of the environment as explained in the above example. How can I achieve this considering that I have created an updatable m-view?
    If possible, how do I push changes made to an updatable m-view back to it's master table when/before I execute DBMS_MVIEW.REFRESH on the m-view? What is the procedure to do this if both table and mview exist on the same database? Do I need to create master groups, materialized view refresh groups, etc.?
    One more thing.. Is there a way to retain changes to the m-view during refresh? In this case, only newly inserted/updated records in the associated table would get inserted into m-view. Whereas changes made to m-view records would stay as-is.
    Hope my question is directed well. Thanks for your help.
    - Ankit

  • Updatable materialized views.

    Hi ,
    I am using sqlplus.
    Please can anyone share a simple example to update a base table using a updatable materialized view.
    Thanks

    usera :- Contains the base table tab1.
    userb:- Contains the materialized view
    materialized view create query in userb:-
    CREATE MATERIALIZED VIEW MV_UPDATETAB1
    REFRESH on demand
    FOR UPDATE
    AS
    SELECT * FROM  USERA.TAB1
    MView created.
    Tab1 has 4 rows existing.
    I added one more row to the mview.
    select * from mview shows 5 rows. (base table 4 rows)
    Then I refreshed the mview :-
    exec DBMS_MVIEW.REFRESH('mv_updatetab1','c')
    successfully executed.
    Base table still has 4 rows.
    The mview alos has 4 rows and the newly added is not present in the table and mview either.
    Any thoughts and suggestions

  • Updatable Materialized View with Union ALL

    (please don't ask about db structure)
    DB: 11gR2
    create table table_1  (
        id number primary key,
        val varchar2(100)
    create table table_2  (
        id number primary key,
        val varchar2(100)
    insert into table_1(id) values (0);
    insert into table_1(id) values (2);
    insert into table_1(id) values (3);
    insert into table_1(id) values (4);
    insert into table_1(id) values (5);
    insert into table_2(id) values (10);
    insert into table_2(id) values (12);
    insert into table_2(id) values (13);
    insert into table_2(id) values (14);
    insert into table_2(id) values (15);
    update table_1 set val='Table1 val:'||id;
    update table_2 set val='Table2 val:'||id;
    create view v_table_all as
    select * from table_1
    view V_TABLE_ALL created.
    select * from v_table_all;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             YES       YES        YES      
    VAL                            YES       YES        YES      
    update v_table_all set val='XXX changed' where id = 3;
    1 row updated.
    select * from table_1;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      XXX changed                                                                                         
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    rollback;
    select * from table_1;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    create or replace view v_table_all as
    select * from table_1
    union select * from table_2;
    view V_TABLE_ALL created.
    select * from v_table_all;
    ID                     VAL                                                                                                 
    0                      Table1 val:0                                                                                        
    2                      Table1 val:2                                                                                        
    3                      Table1 val:3                                                                                        
    4                      Table1 val:4                                                                                        
    5                      Table1 val:5                                                                                        
    10                     Table2 val:10                                                                                       
    12                     Table2 val:12                                                                                       
    13                     Table2 val:13                                                                                       
    14                     Table2 val:14                                                                                       
    15                     Table2 val:15  
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             NO        NO         NO       
    VAL                            NO        NO         NO       
    trying update:
    update v_table_all set val='XXX changed' where id = 3;
    SQL-Fehler: ORA-01732: Datenmanipulationsoperation auf dieser View nicht zulässig
    01732. 00000 -  "data manipulation operation not legal on this view"
    *Cause:   
    *Action:
    drop view v_table_all;
    view V_TABLE_ALL dropped.all is ok before this point.
    now we want create a new materialized view with some query
    create  materialized view v_table_all
    as
    select * from table_1
    union all select * from table_2 ;
    materialized view V_TABLE_ALL created.
    select column_name, updatable, insertable, deletable
    from user_updatable_columns
    where table_name = 'V_TABLE_ALL'
    COLUMN_NAME                    UPDATABLE INSERTABLE DELETABLE
    ID                             YES       YES        YES      
    VAL                            YES       YES        YES       it seems to be ok with update.
    but...
    update v_table_all set val='XXX changed' where id = 3;
    SQL-Fehler: ORA-01732: Datenmanipulationsoperation auf dieser View nicht zulässig
    01732. 00000 -  "data manipulation operation not legal on this view"
    *Cause:   
    *Action:How can solve this issue??
    Any suggestion

    Looks like user_updatable_columns sort of thinks the MV is just a table - I don't know about that...
    An MV on a single table can be updated - I tried that and it works:
    create materialized view mv_table_1 for update
    as
    select * from table_1;I noticed [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/advmv.htm#sthref294]examples stating the UNION ALL needs a "marker" so Oracle can know from the data which source table a row in the MV originates from - like this:
    create materialized view v_table_all for update
    as
    select 'T1' tab_id, table_1.* from table_1
    union all
    select 'T2' tab_id, table_2.* from table_2 ;But that also fails (the "marker" requirement was specifically for FAST REFRESH, so it was just a long shot ;-) )
    What are you planning to do?
    <li>Create the MV.
    <li>Update records in the MV - which then is no longer consistent with the source data.
    <li>Schedule a complete refresh once in a while - thereby overwriting/losing the updates in the MV.
    If that is the case, I suggest using a true table rather than an MV.
    <li>Create table t_table_all as select ... .
    <li>Update records in the table - which then is no longer consistent with the source data.
    <li>Schedule a job to delete table and insert into table select ... once in a while - thereby overwriting/losing the updates in the table.
    In other words a kind of "do it yourself MV".
    I cannot see another way at the moment? But perhaps try in the data warehousing forum - the people there may have greater experience with MV's ;-)

  • How to alter the materialized view defintion with -- For update clause

    My db version is 9.2.0.3
    My orginal materialized view difination does not have "for update " clause.
    how can i alter the mview defination to inclused and exclude the "for update" clause.
    I dont want to drop and recreate the mview with for update clause. But I what to change the existing definition.
    Please suggest.
    Thanks
    Naveen.

    I already have the view definition in place. I want to change the exising defination, by adding the "for update " clause. Is it possible with any " alter mview ... " syntax.
    Below is my existing syntax. I don't what to drop and recreate. Just want to alter the existing definition , with for update clause.
    create materialized view test
    pctfree 0
    tablespace DATA storage (pctincrease 0)
    build immediate refresh start with sysdate next (trunc(sysdate+1) +1/24)
    with primary key
    disable query rewrite
    as select * from test@isource;
    Please suggest!
    Thanks
    Naveen
    Edited by: user12096071 on Apr 8, 2010 2:56 PM

  • Database replication with updatable materialized view in oracle 10gR2

    I neet to set up 1 central server and two local databases ....the local database will hold materialized view....now how to replicate data...in this scenario...please help as soon as possible...i am in rush.....
    the database i use is oracle 10g Release 2
    Edited by: user9932019 on Sep 4, 2009 2:25 AM

    It's not a process that can be explained in a forums posting. You have to understand the steps.
    Here are some other examples :
    http://www.orafaq.com/wiki/Scripts#Oracle_Advanced_Replication_Scripts

  • Materialized views Error

    Hi,
    I have installed oracle 11g expression edition. I am trying to create materialized view like this
    create materialized view test_mv
    build immediate
    refresh fast on commit
    enable query rewrite
    as
    select product.category, sum(sales.netsales) from product, sales where product.productid=sales.productid group by
    product.category order by product.category;
    I am getting the following error:
    SQL Error: ORA-00439: feature not enabled: Materialized view rewrite
    I have updated the init file in the following path:
    # Materialized views for query rewrite
    QUERY_REWRITE_ENABLED=TRUE
    Path: C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts (where exactly it is installed.). Pls let me know what is the problem? I am unable to trace it.
    regards
    chandra kanth.

    The Oracle Error Message brings it to the point nicely :-)
    $ oerr ORA 00439
    00439, 00000, "feature not enabled: %s"
    // *Cause:  The specified feature is not enabled.
    // *Action: Do not attempt to use this feature.The feature is only available with Enterprise Edition - not with your free-of-charge XE.
    See here for the Feature Availability by Edition
    http://docs.oracle.com/cd/E11882_01/license.112/e10594/editions.htm#CJACGHEB
    Kind regards
    Uwe Hesse
    "Don't believe it, test it!"
    http://uhesse.com

  • 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

  • Updatable materialized view

    Can someone help with this scenario:
    Say I have a master site 1 that has two tables T1A and T1B. I would like to have these tables viewable and updatable on another site 2. Site 1 is on a ship and site 2 is on a shore. Site2 will have access to Site 1 on port 1521.
    I have read some on "materialized view" but I'm still not clear how to push the updates made on Site 2 back to Site1.
    Can someone provide sample scripts to make replication happens between the two sites?
    Thank you.

    hi,
    try goin thru this online documentation by oracle for details =>
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10732/toc.htm
    and for step by step setup of an updatable MV replication =>
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10733/toc.htm

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