Replication :: Difference In Using Updateable Materialized View And Multi Master Async
Aug 21, 2008
I have 3 sites which want to be updated as soon as the other one updates its data.(in 5 seconds). So I have chosen multi master solution,sync regardless of the resource consideration.
1-what is the difference between multimaster async and updatable materialized view regardless of resource consuming in multimaster?because in both of them each site can receive and also propagate the data...I just know that in materialized view we can work offline and then apply it manually is there any other thing?
2-I can not understand the difference between multimaster sync and async (considering the 5 seconds,because 5 second is a little time)I mean in this case are they different from each other or not.
I want to remove the master site which is in the multi master replication environment.
I have a doubt here. When I try to suspend the master activity,I need to give the gname.
BEGIN DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY ( gname => 'NAGADMIN'); END; /
Where gname=master group name.But I have 9 master groups in my database. If i give one of the gname present in the master site will suspend the replication of the entire database from the replication.
eg; i am only giving NAGADMIN gname in the suspend activity script.. I have other gnames like, NAGUSER,NAGAUTH, etc....
while replicating the master site via materialized views, in mViewGroups i issued:
BEGIN DBMS_REFRESH.MAKE ( name => 'mvadmin.hamza_refg', list => '', next_date => SYSDATE, interval => 'SYSDATE + 1/1440', -- for test purpose i used such a small interval implicit_destroy => FALSE, rollback_seg => '', push_deferred_rpc => TRUE, refresh_after_errors => FALSE); END;
in my previous attempt it worked all fine... i had a change in senerio, so i did my replication again from scractch using the same old spool in a new installation but even after 3 tries on replicating from scratch my objects are not getting refreshed automatically. even when i attempt to refresh the group it does not work. it works only when i refresh each of the participating object of the group manually.
i need to set up a central server with all the master tables and two other local database which will hold the updatable materialized view of the master table...the databases must be synchronized with central server..and user will work on the materialized view database...
I have attempted to set up the materialized view below to refresh complete at the time specified below. The problem is that it does not refresh and pick up the changes to one of the base tables.
Create Materialized View table_name Tablespace FG_Report Build Immediate Refresh Force Start with SYSDATE next SYSDATE+5/1440 As Select * from table_name@dblink;
after creating, i don't see indexes on the the materialized view created. where as in actual table we have indexes..
Can we replicate indexes along with Materialized views?
I have a Materialized View that gets refreshed everyday.While the DB running on oracle 9.2.0.7,It was taking around 50mins to refresh.I was using the following codes
dbms_mview.refresh('mvname','c');
After 10g upgradation the refresh process ran for more than 2 hr.So I used the following codes
It took 50mins to refresh. But what I found that the number of record count is same after each day refresh.Is there any problem with the option atomic_ refresh=>false.Why I used it -In Oracle 9.2.7.0 the 'c' option truncate the MVIEW then insert.But in Oracle 10.2.0.4.0 the 'c' option deletes the records and then insert .The option atomic_refresh=>false truncates.
Have some issue with Materialized view refresh. Have presented scenario which we have .
Schema1 : 1. Have base tables 2. Created MV logs on base tables
Schema2 : 1. Created sysnonyms for Schema1 base tables 2. created Materialized views 3. Created MV group , added views to the group
Executing the below command in schema2 : execute dbms_refresh.refresh('MV_grp');
Error : ORA-12048: error encountered while refreshing materialized view "Schema2"."Table1_MV" ORA-12018: following error encountered during code generation for "Schema2"."Table1_MV "ORA-00942: table or view does not exist ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255 ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461 ORA-06512: at "SYS.DBMS_IREFRESH", line 683 ORA-06512: at "SYS.DBMS_REFRESH", line 195 ORA-06512: at line 1
how much would be overhead of materialized view logs against DML on tables with few millions of records?
I need to convince my team lead before moving ahead with materialized view for few reports about overhead so is there any documentation by oracle on this issue?
What is the difference between Materialized view and dblink. When we use materialized view and when we use dblink. In my knowledge mviwes and dblinks are used to retrieve data from remote database.But I am unable to understand when should we materialized views and when should we use dblinks.
How can i use refresh option as 1 hr in creation of materialized view, Can i use unoin all in the materialized view and other clause like CONNECT BY PRIOR .
We are using Oracle 10g rel 2. The replication is setup on 1 server which is in City A, and the snapshot server is in City B.
City A . Create materialized view log on table-a with primary key including new values.
City B database. Create user test_rep identified by test grant connect, resource, create any materialized view , table, view , procedure to test_rep.
Create materialized view city-A_db_MV refresh fast select * from cityA.Tablea@city-Adb
When i select from city-A_db_MV, it showed the complete table-A of city-A database.
Now if we make any changes to City-A table at the Master site, will it be propagated automatically to the MV site.
I guess we need to create jobs to push / or refresh fast .. isnt it. But exactly how to do it is a question.
Secondly if we make a replication group at Master site at city-A db, how do we refresh that Group and how to monitor whether it is refreshing on time or not? do we need to see the jobs every now and then.
but still a lot of questions unanswered, even though i had read the documents earlier.
1-The MView was created without identifying that after what interval it will be fast refreshed. 2- How to Manually refresh it. Does it support On Commit, I think it is not. 3- Where should be we make a group and then add the table to that group and refresh that group.
Should this group belongs to the Master Site or to MV site?
I have to create a materialized view for a table which does not have index on any field.
While creating a Mview i am getting an error "TABLE DOES NOT HAVE THE PRIMARY KEY CONSTRAINT".
application developers do not want to create an index on the base table onto which MView is to be created.
is there any way to create a materialised view for the table without index, or is it necessary to have the index on the base table before creating MView on it.
How I can create a Materialized View without having any data in it.
For e.g.
I create a Materialialized View based on a View.
CREATE MATERIALIZED VIEW test_mv REFRESH FORCE ON DEMAND AS SELECT * FROM test_view
In the above case the data fetched by the view test_view gets stored in the Materialized View test_mv. Suppose I want materialized view test_mv to get created with all the columns of test_view but not the data. I will refresh the materialized view test_mv later for data as and when required.
What shall I do for immidiate formation of materialized view test_mv without data.
We have the task to create to Materialized view from oracle 10g to 8i. - Will we face any kind of issue after creation of Materialized view. check what the prerequisite need to be verified is.
I inherited an existing database. I have a materialised view on a table that uses a materialised view log. I have been asked to see if it is possible to categorise the rows by change type (inserted, updated or deleted) and populate another materialised view or table accordingly. If this is possible then how can it be achieved.
1)I have a master site and local site. 2)Materialized view is refreshed at local site... and the results are stored in a cache which Java uses . 3)Any request for the mview data is retrieved from cache. 4)Now I am refreshing matview again using fast refresh.. i.e only records that are changed in the master is updated at the local site. 5) I have to flush the cache .. while flushing i have to flush only those records that are changed.... coz full flush is not good and i have to re cache the entire data if i do full flush
My Question is How to identify the records that changed....so that I can only flush those records from cache. I want to identify the changed records.
I created materialized view in Database B. The master table is in Database A. If i shutdown the database B and bring it up again, the next refresh time in dba_jobs tablein database A is coming as 01-jan-00. It is not getting refreshed automatically. The job_queue_process is 10. wat could be the reason, for the refresh failure.
i want to create "on update" database trigger on materialized view which is on replication schema.I would like to update rows in table when update occurs on materialized view on master side.I wrote some code and tried with this:
CREATE OR REPLACE TRIGGER a after update on A@dirfep.us.oracle.com FOR EACH ROW BEGIN
I am working on materialized view replication but i have an crucial issue. I have a refresh group which contain many MVs some are Read only and some are update but all are in Fast refresh mode (logs are created on both replication and MV sites on these objects) and are referentially integrated to each other i.e they 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 pending transactions at the MVs sites are pushed to Replication site i e ( Base tables at replication site and MVs of these tables are synchronized).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 .After 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 problem?
Some other information , Replication site running with 10gR2 Enterprise Edition. Materialized View site running with 10gR2 Slandered Edition.
what would be the difference between a view and a materialized view? whether DML possible on a view? i think error occurs if DML tried on a view which is a combination of two or more tables, whether DML possible on a materialized view?
How does an oracle materialized view log host keep track of pulling oracle materialized view clients?By global service name or databaseid?
Case: Oracle database host A hosting table X with corresponding materialized view log MLOG$_X Oracle database host B creates a materialized view on A.X using fast refresh (pull) Oracle database host C creates a materialized view on A.X using fast refresh (pull)
How does Oracle database host A keeps track of host B and C in order to clean up MLOG$_X?
I created a Materialized view using joining of two tables with FAST REFRESH ON COMMIT option. These tables are the main tables of the DB and contains alot of data(about 15 millions of records). two master tables have index but mview doesn't have any indexes. I've thought the entire concept of the fast refresh is that it should be a relatively quick operation but the result showed that DB performance reduced, for example I could insert 900 records per minute thru application into master tables before but now I can just insert about 400 records per hour!.Also, It slows down the select operation, went from 0.11 seconds(with joining two tables) to 33 seconds (in mview)!.
First of all, I considered following possibilities and test them:
1) The most likely solution was that a complete refresh was happening. However, the materialized view refresh was confirmed to be a fast refresh by querying USER_MVIEWS.
2) I checked the query of the materialized view and confirmed that it was a simple select from the master tables without any aggregation or sorting.
3) DBMS_MVIEW.explain_mview was run on the materialized view. MV_CAPABILITIES_TABLE did not reveal any problems.
4) A query of dba_registered_snapshots showed that no other snapshots appeared to be using these logs. So, After each refresh, the records in mview logs were deleting.
As you see, it seems everything is ok, but what was causing this fast refresh to go so slow?
I use oracle 10.2 on Suse Linux enterprise server.
I am having two server A and B.B is the replica of A.I have to alter the materialized view of one of the table in server B,of which Master table is in both the servers .I do not have any Materialized view log on both the servers and want to convert the Refresh method from Complete to Fast refresh.One way of this altration is to create materialized view log on master table.