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.
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 AzeemCan 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 -
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 -
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,
KemianYou 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> -
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
Jurnrownum 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,
ShaileshYes, 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 -
Illegal use of LONG datatype error message when i create materialized view
Hello to all
I want create read only materialized view replication environment two of our tables have LONG datatype when i create materialized view against on them
I recieve this error message
CREATE MATERIALIZED VIEW MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID AS SELECT * FROM MDB.TOAD_PLAN_TABLE@arahisto
Error report:
SQL Error: ORA-00997: illegal use of LONG datatype
00997. 00000 - "illegal use of LONG datatype"
Do you know any resort solution for it?
thanksYou can not use longs in materialized views over a database link, you can however take a part of a long over to a materialized view.
I have gotten this to work in the past l had to create a PL/SQL function that you can use to extract the character data from the long column and use that to
as part of the function you will need to pass in the columns of the table that will identify the unique records so you can pick out the long column
example function
-- you will need to make sure this funtion is in the remote location as you can not select longs accross a DB LINK.
CREATE OR REPLACE FUNCTION MDB.TOAD_PLAN_LONG_CONV
(pass in the primary key columns for the table)
RETURN VARCHAR2
IS
v_long VARCHAR2(32767) ;
BEGIN
BEGIN
-- need to select the long column into the PL/SQL variable
SELECT long_column
INTO v_long
FROM MDB.TOAD_PLAN_TABLE
WHERE key_columns = passed columns ;
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE = '-01406' THEN
NULL ;
ELSE
RAISE ;
END IF ;
END ;
RETURN SUBSTR(v_long,1,4000) ;
END ;
Then when you create the materialized view utilize that function on the long column.
create or replace materialized view MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID
AS
SELECT column1, .... columnx,
MDB.TOAD_PLAN_LONG_CONV@arahisto (primary key column list) as long_column_name
FROM MDB.TOAD_PLAN_TABLE@arahisto ;
See if this will work for you? Keep in mind however this solution will not get the entire long column only as much as a PL/SQL variable will hold of it.
Mike -
How do I monitor the actual refresh of materialized view.
Hi See below,
I am creating the materialized view.
It took a while to see the actual data in the table. Do you any reason.
How do I, investigate, if there is any issue, how do I monitor the actual refresh.
I am worried since, it look long time to see the actual data, after creating the materialized view.
SQL> @"ee_grant_details_mview.sql.bkp"
Snapshot dropped.
Snapshot created.
SQL>
select count(*) from grant_details_mview;SQL>
COUNT(*)
0
SQL> select count(*) from grant_details_mview;
COUNT(*)
0
SQL> commit;
Commit complete.
SQL> select count(*) from grant_details_mview;
COUNT(*)
0
SQL> select count(*) from grant_details_mview;
COUNT(*)
0
SQL> select count(*) from grant_details_mview;
COUNT(*)
0
SQL> select count(*) from grant_details_mview;
COUNT(*)
0
SQL> select count(*) from grant_details_mview;
COUNT(*)
344466
SQL>During the initial building of the materialized view, the data is not available to users until the refresh completes.
If you are talking about subsequent refreshes, you have a few options
- Can the materialized view be made fast refreshable?
- If not, can you put the materialized view be put into a refresh group? This will increase the time required to refresh, since Oracle would be deleting and inserting rather than truncating and inserting, but the old data will remain available for users until the refresh completes.
Note that the Replication or Database - General forums might be more appropriate for this sort of question. You may want to move further discussion to one of those forums.
Justin -
Problem with replication based on materialized view
Problem with replication based on materialized view...
Given:
1. Source: S-1
2. Targets: T-1, T-2
3. DB links: from T-1 to S-1, from T-2 to S-1
Required replicate table TBL on S-1 to T-1, T-2 via db links.
On S-1 was created materialized view log with PK on TBL. On T-1, T-2 were created mat.views as "on prebuilt table refresh fast on demand". In case of get "ORA-12034: materialized view log younger than last refresh" or initial load - perform complete refresh. Initial load on T-1 takes about 1 hour, on T-2 - about 12 hours. Refresh is executed via job with minutely interval. If refresh is running then it is not performed.
Problem: after initial load on T-1 performs fast refresh, but on T-2 raised ORA-12034 and complete performs again.
What's wrong?34MCA2K2, Google lover?
I confess perhaps I gave a little info.
View log was created before MV.
It was the first initial load.
No refresh failed.
No DDL.
No purge log.
Not warehouse.
There is no such behavior for MVs on another sites.
P.S. I ask help someone who knows what's wrong or who faced with it or can me follow by usefull link.
P.P.S. It's a pity that there is no button "Useless answer" -
Data Replication Between Sqlserver and Oracle11g using materialized view.
I have Sqlserver 2005 as my source and oracle11g as my target.I need to populate the target daily with change data from source.
for that we have created a dblink between sqlserver and oracle and replicated that table as a Materialized view in Oracle.
problem we are getting here is Fast refresh option is not available.each day it will pick full data from the source.
is there any way to use Fast refresh in this scenario??
Thanks in advance.
Regards,
Balaram.Pl do not post duplicates - Data Replication Between Sqlserver and Oracle11g using materialized view.
-
Updatable materialized view site - replication
Hi all,
I have a shared instance database (with multiple schemas) hosting different applications for different customers. I'm now going to move out one of the application - the materialized view site to another database in new server. (as per request by customer to another data center) by using schema level import/export. The master site will remain untouched.
As i'm rather new in replication, I would like your advise in which data dictionary tables where I can find which are the schemas having the below privileges. As this is a legacy database handed over to us long back, i need to dig out all the info to plan for the migratiion. I need to identify which schema is taking part in the snapshot replication in the mview site as there are 20 over schemas in the database. Can anyone advise me? Kindly provide addtional info if u think it helps.
grant_admin_any_schema
privilege_type => 'proxy_snapadmin'
privilege_type => 'receiver'
privilege_type => 'propagator'
thanksdba_sys_privs
-
Replication of database views/materialized views from big oracle to mobile client
Hi all,
Has anyone done a replication of a view or a materialized view
from big oracle to oracle lite? I can get replication of a
database table happening(although I cant seem to find the table
when I log into the odb using msql) but it just doesn't seem to
work with views(hence the path I have taken which is to use
materialized views). Anyone? CheersHello,
Yesterday I met the same problem and very sad about this, however, my story is much more complicated (I think so).
I have 6 databases:
2 - 11g
2 - 10g
2 - 9i
Every database of each release has different characterset(UTF8 and AL16UTF16).
I am trying to create Materialized view with FAST REFRESH on Oracle 11g, when master tables are located on 10g database and 9i database.
Materialized view, which points to 9i database, was successfully created.
Materialized view, which points to 10g database, gets ORA-12028
Like you, I tried many notes from METALINK and thought at the begining that the problem is my characterset. But, when the materialized views were successfully built on Oracle 9i database, I understood that the problem is something else.
Did you find the actual reason why this issue does not work??
Thanks,
Alex -
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 AMIt'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 -
Creating a Materialized View Log After the Data has been instered
Hi,
I am trying to create a method of replication from Oracle to MySQL using the Materialized View Log table.
This has been done before and works quite well, the only problem is that I am trying to impliment the log after the table has been created and populated and wish to push all the existing data through the log file...
Does anyone know if it is possible to refresh the Materialized View Log and not a Materialized View.
The way the replication is intended to work is:
Oracle> Data inserted into table
Oracle> writes the vector data to the MVL
Script> Monitors the MVL and can see the changes being made to the Oracle Table
Script> Updates MySQL with the data and removes the rows from the MVL
MySQL is then used with other unix systems
Currently we export the data from the table using Triggers and a cronjob running every x minute to check for changes in the TriggerTables
Many thanks for your time on this, I have been checking for almost a whole working day and not found the answer to this problem.Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
Many thanks for your help.
Maybe you are looking for
-
Error when accessing Tuxedo Services from Weblogic
Hi, I have a stateless session bean deployed on Weblogic 10.3.5 . I have a WTC Server configured to connect to my Tuxedo server.I have all the local and remote AP's set on this server also. Now I am trying to access Tuxedo server from a method in my
-
Is there a reservation for iphone 5 for tourist ?
is there a reservation for iphone 5 for tourist ?
-
Can't see my mac in Find My Mac, even with it enabled.
I have a C2D Macbook Pro, Late 2006 Model. I have successfully upgraded to the newest version of leopard, and have enabled all the settings of iCloud with no error messages. Problem is, when i go to look at my iCloud account in a browser and look for
-
Desktop and documents question for Lion
is there a way to set certain word documents to open on a designated desktop without them appearing on other designated desktops. for instance: I have 2 desktops: One for play and one for work I would like to assign certain word documents to my work
-
In app purchase made without entering a password
My 2year old son yesterday managed to buy an in app purchase for £13.99 without a password being entered! How has he managed to do this? Is there anyway of getting a refund?