Refresh/Update data in a materialized view
Hi,
I have question about the data in a materialized view and how it is refreshed. My mat view has all my dimension-ids and my (for my specialize needs) aggregated measures from my fact table. I used the mat view wizard to create my view - which works perfectly. But now I wonder if I have to create some sort of mapping(?) or some sort of trigger to refresh the data in the mat view. Or is the data automatically refreshed when I start my fact table mappings. I use OWB 11gR2
thx
MVs have properties for refresh - you an refresh based on schedules or when dependent data is committed or manually.
Cheers
David
Similar Messages
-
Refresh groups to administer several materialized views?
Hi,
I had three materialized views in my database. They are used for decision support and access local data. Each one is completely refreshed at a distinct time during the night.
Now, application developers asked for more 3 materialized views. Although there is no need to guarantee referential integrity between the materialized views, it seems to me that the more efficient way to administer their refresh is by using a refresh group. Therefore, I am planning to create a refresh group with the 6 materialized views.
Is there another good way to administer refresh options of several materialized views?
Regards.If the existing three materialized views are refreshed at distinct times during the night, I'm not sure what benefit there would be to putting the three into a single refresh group (and I'm ignoring what happens when you add the three new ones). You put multiple materialized views into a refresh group so that you can do a single refresh and so that the data is internally consistent. If you don't need the data to be consistent and you want the materialized views to be refreshed at different points in time, I'm not sure what benefit you'd derive from putting them in a refresh group.
Justin -
Exporting data from a materialized view in Oracle 10g
Can anybody tell me how to export data to a remote server and import data in that remote server without using ftp utility. Actually I want to export the data from a materialized view to the remote server and import the same in the remote server.
If everything works well, I'll put the exporting and importing in a cronjob.
Please let me know how can I do that if that's possible .
Any reply would be appreciated.
Thanks.Here is what I'm trying to do.
I created materialized views using multiple base tables in my local server and the base tables got populated using a long process.
Now I want to copy those data alone to some remote server since it doesn't have any base tables in it. For now, the remote server should depends on the localserver's data. I'm going to use the remote server's data for some testing purposes.
I know it is easy to create mat.views in the remote server but it doesn't have I don't want to do that now. I just want to copy the snapshots from my local server to the remote server.
Please let me know how to do that.
Thanks. -
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 -
Problem when try to get the next refresh date of a materialized view
I have a materialized view set to auto refresh(e.g hourly), I need to query this date and display in the report. I create a procedure which return the NEXT_DATE from the ALL_REFRESH_CHILDREN table, the procedure and the view all in schema HK3XDDB.
If I login as sys, dba in the sql plus and query the procedure, it return the next date, but if I login as normal user which has permission to execute all procedures, it didn't return anything, so I change ALL_REFRESH_CHILDREN to USER_REFRESH_CHILDREN, still no luck. But the details from the USER_MVIEWS can be returned, just won't return anything in the REFRESH one. How to query the next date out?
Another strange thing is, if I login as sys dba, it return the next date, but if I use a select next_date into statement in the procedure it will throw a data not found error.
I stuck here for several hours just can't figure it out, any suggestions are welcome,
CheersThank you for the reply. It's same with USER_REFRESH_CHILDREN, I can get the result when I run the procedure in SQL PLUS login as sys dba, but if I run the procedure using normal user which has permission to run any procedure, then nothing return. It might be a permission problem but I just can't figure out why.
Let me explain in detailed:
Schema HKXDDB, this schema has procedure TestProcedure, in the procedure, I have two ref cursor return, one is for select * from USER_JOBs (or from USER_REFRESH_CHILDREN, I have tried both), one is for select * From USER_MVIEWS, this schema has the materialized view. User HKDWUser has permission to run any procedures, so when this user run the TestProcedure which is own by HKXDDB, the cursor that select from USER_MVIEWS can return results which are materialized views owned by HKXDDB, but the cursor that select form USER_JOBS or USER_REFRESH_CHILDREN always return no rows.
Any permission I need to assign to HKDWUSER to get the jobs or fresh group that owned by HKXDDB?
Cheers -
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 -
The data of my materialized view....in the while
Hello
We have problems with materialized views
We have one wich re-build each a short period of time
¿Can i avoid the data to dissapear in the time process of refresh?
Is so annoing to our clients to see that "from time to time" the data just dissapear for one period of time -the time while the materialized view is refreshing-
Thank you in advance
Bruno. Madrid. Spain> Is so annoing to our clients to see that "from time to time" the data just dissapear for
one period of time -the time while the materialized view is refreshing-
Have a similar problem. And dealing with large data volumes that makes the DELETE of the MV a very undesirable feature. Not as much a the resource footprint required, but the time it takes to do this - and the very tight processing windows that exist.
The solution is a self-rolled and very likely not ideal for most - but it works well enough for us in production.
No MV. Create a partition table. Create a staging table. Do a manual "full refresh" of the staging table (TRUNCATE and direct path INSERT). Follow this by a partition exchange with the partition table (no validation and including indexes). The result is that the data is replaced in the partitioned table within a second - no long running and expensive DELETE. End-users not effected by having a truncate pulling the data from beneath their reports. -
How do I figure where is the data in a materialized view coming from
Hi: when I run select NAME, OWNER from dba_mview_refresh_times, I see a number of materialized views. How do I find more details about this view i.e where is the data coming from and which fields. The source table that is in another database changed. But the view on my database where the materialized view exist has not changed. I want to confirm from where is data coming in this view
TIA
RaviSQL> select * from dict where table_name like 'ALL%MVIEW%'
TABLE_NAME COMMENTS
ALL_BASE_TABLE_MVIEWS All materialized views with log(s) in the database that the user can s
ee
ALL_MVIEWS All materialized views in the database
ALL_MVIEW_AGGREGATES Description of the materialized view aggregates accessible to the user
ALL_MVIEW_ANALYSIS Description of the materialized views accessible to the user
ALL_MVIEW_COMMENTS Comments on materialized views accessible to the user
ALL_MVIEW_DETAIL_PARTITION Freshness information of all PCT materialized views in the database
ALL_MVIEW_DETAIL_RELATIONS Description of the materialized view detail tables accessible to the u
ser
ALL_MVIEW_DETAIL_SUBPARTITION Freshness information of all PCT materialized views in the database
ALL_MVIEW_JOINS Description of a join between two columns in the
WHERE clause of a materialized view accessible to the user
ALL_MVIEW_KEYS Description of the columns that appear in the GROUP BY
list of a materialized view accessible to the user
ALL_MVIEW_LOGS All materialized view logs in the database that the user can see
ALL_MVIEW_REFRESH_TIMES Materialized views and their last refresh times for each master table
that the user can look at
ALL_REGISTERED_MVIEWS Remote materialized views of local tables that the user can see
13 rows selected. -
Dimension updates in Analytic workspace:Materialized views?
We are using the 10g version of Oracle OLAP. We have 1 materialized view joining with our custom table and forming 1 source view per dimension. We load the cube programatically by refresh the dimension materialized views, followed by loading fact data to views against cube and then the actual workspace and cube creation..
Question is :
1) Do dimensions get loaded to analytic workspace only when the analytic workspace is created (programatically or maintain dimension via AW)?
2) Assume we do not create the analytic workspace programatically or do not do a maintain dimension. In this case willl the dimensions in the analytic workspace get refreshed any time the data in source tables in the materialized view or custom table used in dimension source view change?
Please advise.
Thanks,
SudipIf the data source changes for OLAP 10g then you must maintain the AW/ dimensions/cubes. There is no ability to check if anything in the source has changed.
If using 11g, then you can use the MV refresh capabilities to maintain your AW (if your model conforms)...MV refresh features detects changes in the source tables.
Hope I understood your question correctly. -
Refreshing the Data from a embed view in a view container
Hi everybody
I would like to know how can I do to refresh all data from a View with a view container the problem is:
that I have a window that has a view at the same time this has a view container. The Main view brings the data of editable elements when I select one element of the main view the view container brings a list for that element (dependencies) but only the first time a choose an element loads the correct data, when I choose another one it brings the same old data and doesn't make the call for the wdDoInit() method.
The question is:
How do I force the view to refresh all the data or call again the wdDoInit() method?
Thank you for your helpAida,
Lets say you have two components C1 and C2 and you want method from C1 to be available in C2 then follow these steps:-
1) Goto the Interface Controller of C1 and create a method there lets say doSomething
2) Then goto C2. There you can see Used Web Dynpro Components --> Right click Add Used Component --> Give some name say C1Comp --> Click browse and select C1 --> Click Finish.
3) Next goto Component Controller of C2 --> Properties --> Click Add and check if C1 is added. If not then select the checkbox and select OK.
4) Now goto Implementation tab of C2 and lets say wdDoInit you can write following code:-
wdThis.wdGetC1CompInterface().doSomething();
Chintan -
Is it possible to refresh the table from a Materialized view
Hi,
Is it possible to update the underlying table on which a Materialized view is created when some changes in a Materialized view is done.Is this reverse compatibility possible in Materialized View?
Thanks in Advance,
V.DennisIf you created the materialized view as UPDATEABLE then changes to it should automatically be relected in the underlying table. If this is not occurring I suggest you check the replication jobs. You probably have a stack of errors in DEFERROR.
Cheers, APC -
Transform 3D to 2D Data via a Materialized View
Hi,
I'm playing with Geoserver against an Oracle Locator database. Things are starting well, but I did notice a bug where 3D points and lines are not supported. I guess this is an issue with GeoTools. Anybody have a way to transform my 3D data to 2D. Since I do use the 3rd dimension for storing elevation, I don't want to lose the data. So I was thinking that I could create materialized views to "virtually strip" the 3rd dimension. Any thoughts? I'm not very strong in PL/SQL, so any code hints would be greatly appreciated as well.
Thanks!
JeffI would say the compiled pl/sql would be faster (it would also depend on whether you compiled to the pl/sql virtual machine code - MP-code or the machine-dependent code of the host's C compiler if you chose native copilation): I am coding a Java version of my GEOM.SDO_CENTROID function so will be in a better position to say, categorically, one way or the other.
In my free pl/sql packages there are these functions in case anyone is interested:
-- @function To_2D
-- @precis Converts a 3D geometry to a 2D geometry
-- @version 2.0
-- @usage v_2D_geom := geom.To_2D(MDSYS.SDO_Geometry(3001,....)
-- @history Albert Godfrind, July 2006, Original Coding
-- @history Bryan Hall, July 2006, Modified to handle points
-- @history Simon Greener, July 2006, Integrated into geom with GF.
Function To_2D( p_3D_geom IN MDSYS.SDO_Geometry )
Return MDSYS.SDO_Geometry deterministic;
-- @function To_3D
-- @precis Converts a 2D geometry to a 3D geometry
-- @version 1.0
-- @usage v_3D_geom := geom.To_3D(MDSYS.SDO_Geometry(2001,....),50)
-- @history Simon Greener, May 2007 Original coding
Function To_3D( p_2D_geom IN MDSYS.SDO_Geometry,
p_default_z IN NUMBER := NULL)
Return MDSYS.SDO_Geometry deterministic;
/** @Function : FIX_3D_Z
** @Precis : Checks the Z ordinate in the SDO_GEOMETRY and if NULL changes to p_default_z value
** @Note : Needed as MapServer appears to not handle 3003/3007 polygons with NULL Z values in the sdo_ordinate_array
** @History : Simon Greener - JUNE 4th 2007 - Original Coding
Function Fix_3D_Z( p_3D_geom IN MDSYS.SDO_Geometry,
p_default_z IN NUMBER := -9999 )
Return MDSYS.SDO_Geometry Deterministic;
/** Function just to change a single point coded in sdo_ordinates to sdo_point representation
* @param p_geometry A sdo_geometry object.
Function ToSdoPoint ( p_geometry in MDSYS.SDO_Geometry )
return MDSYS.SDO_Geometry Deterministic;Simon -
UPDATING the query in materialized view
Hi,
i have a little doubt in Materialized view. i created a materialized view and log with the following query,
create table test_mv (a number ,b number )
alter table test_mv add constraint t_pk primary key ( a );
insert into test_mv values (1,2);
insert into test_mv values(2,2);
insert into test_mv values(3,2);
insert into test_mv values(4,2);
insert into test_mv values(5,2);
commit;
CREATE MATERIALIZED VIEW LOG ON test_mv
WITH SEQUENCE, ROWID
*(a,b)*
INCLUDING NEW VALUES;
CREATE MATERIALIZED VIEW product_sales_mv
ENABLE QUERY REWRITE
AS SELECT b from test_mv;
Now i want to update the query in the MV as 'Select a from test_mv' . for that i tried with
*'ALTER MATERIALIZED VIEW product_sales_mv AS SELECT a from test_mv;'*
But it throwing error,
Error starting at line 5 in command:
alter MATERIALIZED VIEW product_sales_mv AS SELECT b from test_mv
Error report:
SQL Error: ORA-00933: SQL command not properly ended
+00933. 00000 - "SQL command not properly ended"+
*Cause:+
*Action:+
i guess i am doing wrong. kindly help me here. i want to update it without drop and recreate.
thanks,
Jeevanand.KeHi Jeeva,
No. you cannot add or drop columns to the materialized view using the ALTER Statement.
To Change the Structure of the view , drop and re-create the materialized view.
To Alter a materialized view log, You can use the ALTER MATERIALIZED VIEW LOG. By this,
You can add new columns to a materialized view log.
ALTER MATERIALIZED VIEW LOG ON sggi_mrps.emp ADD(deptno);Thanks,
Shankar
Edited by: Shankar Viji on Aug 24, 2012 2:11 AM -
Avoid customizing TR while updating data of SAP standard view
Hi all,
I am preparing TC for view V_T093C_01. View is SAP view and Requirement is to avoid customizing TR while updating data. Please suggest how we shall do that.
Thanks,
Krishna.Hi Krishna,
There is an attribute stored in the table/view maintenance dialogs, which say if there's a standard or custom transport routine to transport. By indicating a custom one, but without defining it, the system won't ask any transport request.
But I don't advise you to change it because:
- Changing this field is considered as a modification of the standard.
- why is it important that the system does not ask for a transport request? It is harmless!
Or is it that you want to allow changing it in production, in that case I would give another answer (by defining the "current settings")
Sandra -
IOS 7 iPhone 4 slow to refresh/update data
Apps like Weather, Email, and Notifications seem to have slowed down in updating/refreshing data. When I check notification center, the weather data is usually hours old. If I open the weather app it also has the older data but quickly refreshes. If I go back to Notification Center, it takes several more minutes to update. If I read emails on another device, they are still marked an unread on iPhone until I open the app or manually refresh. Anyone else having these issues? Could it be just that the servers are so stressed from upgrades that some push notifications have slowed down?
Before you ask, current settings:
Backgroud App Refresh: On (enabled for weather)
Location Services: ON (enabled for weather)
Notifications: All services enabled in Today View
Mail - Fetch New Data: Push
If email is not a Push account, set to Fetch Every 15 MinutesFigured it out.
The photos that I thought were on the phone where in the cloud, so there wasnt actually a photo folder created yet in the camera.
Took a picture, reconnected phone and viola, there it was.
Maybe you are looking for
-
Stop Depreciation for particular assets for a period Temporarly
Hi Friends I Need to Run the depreciation for october, but my requirement is , i dont want depreciation to be calculated for few assets for this period october as these asses were transfered to other cost centers, i need to stop depreciation to be ca
-
GoPod - Does it work with the latest Ipod firmware?
I have a 5th Gen 60gb iPod and have used goPod in the past to remove the volume cap. But ever since updating my iPod with the latest firmware the volume limit seems to be very quiet compared to what it used to be. Is this because goPod 1.4 doesn't wo
-
A few programs run slowly on my G4
Hi, I have a Power Mac G4 Gigabit Ethernet with 704MB RAM dual 500MHz G4 processors and 16MB VRAM (ATI RAGE graphics card) and Mac OS X's built in Chess program and some other programs (especially iTunes while browsing in CoverFlow but other view mod
-
OS Yosemite asks for Apple ID every time I turn on my Imac
Every time I turn on my Imac I have to introduce my Apple Id and accept terms and conditions since I have installed OS Yosemite.
-
Trouble opening programs since upgrading to yosemite
I am having trouble opening programs since upgrading to Yosemite.