Materiliezed View Replication Problum

Hello,
I am working on materiliezed view replication but i have an crucial issue. I have a refresh group wich contain many MVs some are Read only and some are updateble but all are in Fast refresh mode (logs are created on both replication and MV sites on these objects) and are refrentially intigrated to each other i.e thay have parent child relationship with each other as at replication site on base tables.
When refresh group job runs to refresh these MVs i got the errors
ORA-02292: integrity constraint (string.string) violated - child record found
After that job status has changed to break,but in the same time all the panding transactions at the MVs sites are pushed to Replication site i e ( Base tables at replication site and MVs of these tables are syncronized).In order to change the status of job to Normal, i have to disable some constraints(not all) on the MVs and manually run the job .Atfer that job status will become Normal even i enable these constraints with validation.
What will be the reason ? Are there some MVs trying to complete refresh instead of Fast or increment refresh in this refresh group?If yes how i can trace out MVs and solve this problum?
Some other information ,
Replication site running with 10gR2 Enterprize Edition.
Materiliezed View site running with 10gR2 Standered Edition.
Thanx.

You can't control order of refresh of MV in refresh group. So if in master-detail relation FK with on delete restrict clause is defined then when master MV is refreshed and delete was performed, than this error is raised. Similar error is raised when detail MV is refreshed before master MV and insert is performed on detail a there is no master record.

Similar Messages

  • Multiversions in Materialized View Replication Environment

    Dear friends
    In my company we have a matarialized view environment where A materialized view, in snapshot site, contains a complete or partial copy of a target master - master site.
    This environment is in Oracle 8i Enterprise Edition and now we are increasing it. We are shrinking our budget and then i'm research an solution more cheaper, i found Oracle 10G Database Standard Edition One, an solution desinged for small to medium environments. My thought is to use Oracle 10G SE1 for news snapshot sites.
    Can someone talk about the user of differents versions (8i mastersite X 10G snapshotsite) in a Materialized View Replication Environment, is it possible? must i upgrade all my environment replication for 10G or to use multiversions ?
    Thanks !!

    10g to 8i can work, assuming
    - 8i = 8.1.7
    - You are applying at least the 8.1.7.4 patchset to the master (8i) or you are applying the latest patchset to the slave (10g). Realistically, you probably want to do both.
    If you are talking about using the standard edition, I assume that you are only doing basic replication, not multi-master replication. I also assume you are aware of the limitations on hardware that come with Standard Edition 1-- I don't recall if you are limited to machines that have a capacity for 2 or 4 CPU's. Also, be aware that Oracle considers multi-core CPU's as multiple CPU's.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • 2-Way Materialized View Replication

    Dear All,
    i want to know if it is possible to configure 2-way Replication with Materailized view Replication
    e.g if i had EMP table at master site
    and MV EMP_MV at materialized view site
    if i update EMP table in master site ,then EMP_MV is updated automatically
    it is working fine
    but i want if i update EMP_MV at MV site then the underlying table EMP at master site should also be updated
    if it is possible then how can we do that ???
    Regards,
    M.Shakeel Azeem

    Can u please give me the code to resolve conflict issue?
    i think i have to execute the code at master site
    for now ,i had resolve the issue by
    1) Login to Oracle Enterprise Manager with the replication adminstrator user
    2) Go to: Distributed->Advanced Replication->Administration
    3) On the right there will be a tab called "Errors"
    4) Delete or Re-run the error shown with the buttons on the bottom right.
    but now i m getting this in alter.log
    Thu Nov 08 06:29:47 2007
    Errors in file d:\oracle\admin\testdb\udump\testdb_j000_8420.trc:
    ORA-12012: error on auto execute of job 51
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01005: null password given; logon denied
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 794
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 851
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Please suggest?
    thanx a lot

  • Monitoring materialized view replication

    Hi.
    I have set up a materialized view replication (FAST with 5 minutes interval for refresh). Sometimes the child node can't reach the master node. Where can I monitor this behaviour? I found views (deftran, deferror,...) - but there is nothing in it. The information that the master isn't reachable is written into the child's alert file but for a normal user this isn't enough.
    So where can I look into for errors?
    Thanks
    Markus

    You could use dba_snapshot_refresh_times to find last refresh time of your snapshots.
    If this is not enough you must write you own procedure that check if master is reacheable or not. And write this info to table. Run this procedure as a job.

  • Oracle Materialized View replication

    I am perplexed by the fact that I have a slave sight full of MV's and a refresh group created to refresh with the Master site.
    When I refresh, however, the master site updates all of the tables (MV's) except one within my refresh group and all the changes I make on the MV site replicates to the Master site including this ONE MV.
    Where the problem lies is that the one MV does not accept any changes from the Master??
    Help!!

    Hello,
    I'm sorry to answer you so late.
    I could find an interesting Notes on My Oracle Support which gives a solution to this problem.
    Please, have a look on the following Notes:
    Complete refresh of a materialized view fails with ORA-02266 [ID 270456.1]In fact, you may have to add another MV to the Refresh Group so as to avoid the Truncate operation during the Refresh.
    If possible, you may also try a Fast Refresh (there's no Truncate in this case), but you'll need MV Log.
    Hope this help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on May 19, 2010 11:44 PM

  • Snapshot replication slow during purge of master table

    I have basic snapshot/materialized view replication of a big table (around 6 million rows).
    The problem that I run into is that when I run a purge of the master table at the master site (delete dml), the snapshot refresh time becomes slower. After the purge the snapshot refresh time goes back to the normal time interval.
    I had thought that the snapshot does a simple select so any exclusive lock on the table should not hinder the performance.
    Has anyone seen this problem before and if so what has been the workaround?
    The master site and the snapshot site both are 8.1.7.4 and are both unix tru64.
    I don't know if this has any relevence but the master database is rule based while the snapshot site is cost based.
    thanks in advance

    Hello Alan,
    Your problem is, to know inside a table-trigger if the actual DML was caused
    by a replication or a normal local DML.
    One way (I'm practising) to solve (in Oracle 8.1.7) this is the following:
    You can use in the trigger code the functions DBMS_SNAPSHOT.I_AM_A_REFRESH(),
    DBMS_REPUTIL.REPLICATION_IS_ON() and DBMS_REPUTIL.FROM_REMOTE()
    (For details see oracle documentation library)
    For example: a trigger (before insert of each row) at the master side
    on a table which is an updatable snapshot:
    DECLARE
         site_x VARCHAR2(128) := DBMS_REPUTIL.GLOBAL_NAME;
         timestamp_x      DATE;
         value_time_diff     NUMBER;
    BEGIN
    IF (NOT (DBMS_SNAPSHOT.I_AM_A_REFRESH) AND DBMS_REPUTIL.REPLICATION_IS_ON) THEN
    IF NOT DBMS_REPUTIL.FROM_REMOTE THEN
    IF inserting THEN
         :new.info_text := 'Hello table; this entry was caused by local DML';
    END IF;
    END IF;
    END IF;
    END;
    By the way: I've got here at work nearly the same configuration, now in production since a year.
    Kind regards
    Steffen Rvckel

  • SQL command of Materialized View Relication in Oracle XE

    Hi, all,
    While waiting for the machine to be OK, I decide to post my understand of materialized view replication here and please point me anything incorrect.
    I have two machines A and B, I want to make A as a master and B as replica, to replicate table test.
    On A:
    create materialized view log on test;
    On B:
    create database link dbl_a
    connect to SYSTEM identified by password
    using '(DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = a)(PORT = 1521))
    (CONNECT_DATA =
    (SID = XE)
    create materialized view test_mview as select * from test@dbl_a;
    At last, when I want to make a synchronization, I run
    On B:
    EXECUTE DBMS_MVIEW.REFRESH('test_mview');
    Any point is appreciated.
    Best wishes,
    Kemian

    You can use DBMS_METADATA :
    SCOTT@orcl SQL> create materialized view mv_emp
      2  refresh fast on demand with rowid
      3* as select empno,ename,job,sal from emp
    SCOTT@orcl SQL> /
    Materialized view created.
    SCOTT@orcl SQL> set long 100000
    SCOTT@orcl SQL> select DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP','SCOTT') from dual
    SCOTT@orcl SQL> /
    DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP','SCOTT')
      CREATE MATERIALIZED VIEW "SCOTT"."MV_EMP"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      BUILD IMMEDIATE
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      REFRESH FAST ON DEMAND
      WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS select empno,ename,job,sal from emp
    SCOTT@orcl SQL>                                                                               

  • View table and Master table don't match

    I am setting up Materialize view replication between two systems connected over a WAN. The number of rows in the master table does not match the number of rows in the Table at the view site. Is there a way I can monitor/watch or otherwise see what replicated transaction are being applied to the view. I know that rows are added to and deleted from this table over the course the the day.

    If the master table is always changing, the two tables will never match completely. Take the following scenario:
    time 0: Insert row A in master table
    time 1: Begin refresh of remote MV
    time 2: Insert row B in master table
    time 3: End refresh of remote MV
    At this point, the master table will have two rows (A & B) while the remote table only has row A. If there is a materialized view log on the master table, row B will be present in the log and will replicate on the next refresh. I'm not aware of any utility that lets you view the data in the materialized view log in a particularly human-readable form, however-- that data is stored in a RAW column.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Update sequence wrong in Materialized view when using refresh group

    Hi,
    I made a trigger (for each row) on a materialized view(replication data from a master table in in a different database), which is refreshed by a refresh group (exec dbms_refresh.refresh('"...). However, the update order/sequence is important and must be handled (by the trigger) in the same order how the updates where done in the master table. Unfortunately the updates in the materialized view are NOT in the same order. The trigger is fired in a wrong order.
    I am using database version 10.2.0
    Does anybody reconize this problem, Is there a solution for this problem ( with keeping the refresh group mechanisme)?
    Thanks
    Regards
    Jurn

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

  • Updating base table with Materialized View's data

    Hi,
    In order to update base table with MVs data, I am trying real time data transfer between two databases. One is Oracle 8i and other is Oracle 9i. I have created an updatable MV in 9i on a base table using database link. The base table is in 8i. Materialized View log is created in 8i on base table. MV has to be associated to some replication group, but I am not able to create replication group in 9i to which MV has to be associated. The required packages are not installed.
    Replication packages are to be used to create replication group are :
    /*Create Materialized View replication group*/
    BEGIN
    DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
    gname => 'TEST_MV_GRP',
    master => 'TEST_DATA_LINK',
    propagation_mode => 'ASYNCHRONOUS');
    END;
    But above block is giving error.
    Can anyone suggest how to resolve this, or are there any other approaches (by not using replication packages) to update base table with MVs data ?
    Thanks,
    Shailesh

    Yes, I created link between two databases and was able to update tables on 8i from 9i database using that link.
    The error I am getting while creating replication group is :
    ORA-06550
    PLS-00201 : identifier 'SYS.DBMS_REPCAT_UTL2@'TEST_DATA_LINK' must be declared
    ORA-06550
    PLS-00201 : identifier 'SYS.DBMS_REPCAT_UNTRUSTED@'TEST_DATA_LINK' must be declared
    ORA-06512 : at "SYS.DBMS_REPCAT_UTL", line 2394
    ORA-06512 : at "SYS.DBMS_REPCAT_SNA_UTL", line 1699
    ORA-06512 : at "SYS.DBMS_REPCAT_SNA", line 64
    ORA-06512 : at "SYS.DBMS_REPCAT", line 1262
    Is there any other approach which can be used to update base table with MVs data instead of using replication packages ?
    Thanks,
    Shailesh

  • Plz: Replication 9i Job Network Problem Hang

    Hi ,This problem is posted on this forum by other users
    but all of them remained unresponsed!
    I hope somebody will help me now:
    I have a hang problem in 9i
    We are using bidirectional Replication (Materialized View Replication)
    and when mview refresh group is being refreshed if there happens a network problem( on the VPN) then our refresh job seems to hang, it will never end (once we waited a week but nothing happened) and the materialized views remain locked
    the session won't be killed at all, the only way for us is to restart the database,
    I hope there is a better way or some settings to prevent this.
    somebody help me please

    Personally, I've never seen this behavior. If other reports of the same problem in the forum haven't been answered, it's likely because none of the folks that answer questions here have seen this behavior elsewhere.
    Have you logged a TAR in Metalink? It certainly sounds like a bug. Have you tried upgrading to the latest patchset?
    Justin

  • Replication 9i

    Hi All,
    I have a problem with replication in 9i.It is a master..materialized view replication.It has two master groups .
    I wanted to delete all the replication groups and rebuild them again ...when i did so , in the enterprise console it showed me under the replication node that the master groups still exist..though i can't find their nodes under the master group nodes in the master site.Can any body help??

    Why would you want to do this on a desupported platform? Upgrade to 11g and use the physical standby database, or logical your choice. Don't fiddle with outdated unsupported software. It will bite you on the butt.
    If you insist on doing with 9i, then create a logical standby database.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c01_02intro.htm#54305
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96653/create_ls.htm#SBYDB00315
    Read, learn and share.
    Regards
    Tim

  • Regarding replication configurations in oracle 9i

    Good Morning...
    In my current project,I have 3 databases like A,B and C.now i need to create materialized views on B & C database using dblink(created on A database), then i need to refresh around 70 tables for every 1 hour. so in this regard i need information about replication server configuration & DBLINK & MVIEW's ...

    OK. Then you'd need to configure Advanced Replication, not simple one-way materialized view replication.
    You'll want to start with the Advanced Replication manual.
    Justin

  • I am on Source side and DDL replication is enabled.

    I am on Source side and DDL replication is enabled.
    I would be providing initial dump of TABLE and VIEW objects to target using Export DP to Target.
    And start Golden Gate Extract, Pump on Source.
    Source PRM file has Table list.
    EXTRACT ex1test
    DDL INCLUDE MAPPED
    EXTTRAIL ./trails/l1
    TABLE ABCD.T100;
    TABLE ABCD.T200;
    TABLE ABCD.T300;
    Objective is ---- If I change VIEW definition at Source, it should be reflected to Target
    Question is --- In my PRM file, how I can include VIEWs???
    If the source has 10 views , only 5 are replicated to target ..
    DDL changes for only the ones in the target should be considered other must be excluded
    Thanks and Regards,
    Kurian

    Hi Kurian,
    Oracle GoldenGate supports VIEW replication in both Classic and Integrated Modes. But we do have some limitations on it.,
    1. Capture from a view is supported when Extract is in initial-load mode. The data is captured from the Source View and not the Redologs.
    2. Changes made to the data of the view will not be captured.
    3. View replication is only supported for inherently updateable views in which case the source table and target view structures must be identical.
    You can exclude DDL Objects using the ddl_filter.sql
    To know more about ddl_filter.sql, follow the below link.,
    http://docs.oracle.com/goldengate/1212/gg-winux/GIORA/ddl.htm#GIORA316
    Under this,
    13.8.1 Filtering with PL/SQL Code
    Regards,
    Veera

  • Database in Gigabytes - Optimized Replication - Assistance please

    Hi,
    I ran into a problem and have to find a solution.
    We have two Oracle database servers. say X and Y. Both are on separate machines.
    Y is a subset of X.
    Periodically, Y need to update itself with the changes/updation of X.
    Estimate of amount of data being copied is in Giga bytes.
    In theory, oracle provided replication scheme of one Master and one destination sites ( 'Materialized Views Replication') would take extensively long time to complete.
    Can any one help please?
    Kind regards,
    Many thanks,
    Cheers,

    Thought to furnish more details here.
    I am playing the role of R&D person at the moment.
    Our main database is Oracle 9.2 handling loads and loads of transactions each day.
    We have another readonly database for reporting purpose.
    The voulme of change occuring in the main database each day is too large, estimate is 2 to 3 gigs.
    Can anyone please provide a high level guideline to a performance friendly solution?
    Till now, i have been researching on Both Signle and Multimaster replications, but none of them appears to be performance friendly.
    Oracle Streams however, felt little better approach.
    Comments and suggestions are badly needed.
    Many thanks,
    Cheers,

Maybe you are looking for