Oracle Materialized views | Reporting
I have a requirement as follows:
Requirement:
We need to create a Reporting DB to use for Reporting and a Transactional DB will be in separate Host. Basically we need to pull data from a set of tables from Transactional DB and move to Reporting DB schema at proper intervals.
We might have to get data from different column from different tables and store it in a single table/multiple tables in Reporting DB.
Solution (Please validate):
I am planning to use Oracle Materialized views in the same host as Transactional DB to achieve the following part of requirment
"We might have to get data from different column from different tables and store it in a single table/multiple tables in Reporting DB."
and then to use Oracle streams to move it in scheduled interval to Reporting DB.
Is it feasible?
Or please suggest some solution.
Thanks,
Appu
Hi,
You design is too complex, why use 2 technologies if one is sufficient ? If data amount permits I would do fast refresh MV (if possible, based on required joins and aggregations) over db link directly in the reporting database.
--romas
Similar Messages
-
CacheConnect Support for Oracle Materialized View
Does TimesTen cacheconnect support caching Oracle Materialized views? It is my understanding that materialized views are really just Oracle tables under the covers.
hi Scheung,
I noted following description in Page40 of standard document 6.0.8 cacheconnect.pdf
Note: You can define a USERMANAGED cache group to include an Oracle
materialized view, but the cache group will be restricted, as described in “About
restricted cache groups” on page 49. Alternatively, you can create any type of
cache group to include an Oracle detail table for a materialized view.
and actually in 7.0.2, we can still create usermanaged cache group based on Oracle MV, but the above description disappears in 7.0.2 document. is it deprecated ? -
Can Oracle materialized view be used as crystal report datasource
Hi,
Can we use materialized view created in Orace 10g database as the data source of crystal reports.
I'm using Crystal reports Server 2008 V1 version. I'm unable to find the materialized view under my data connection. I can see only tables, static views and stored procedures.
Is there a way by which I can run my reports against a materialized view created in Oracle.
Thanks
Thomas ELHi Thomas,
Rather than doing all of this work around to access multiple databases/servers why not create a stored procedure to do all of this for you? Search the notes area for samples on how/what CR requires to use a SP in Oracle.
Advantages is this is done all server side and CR simply waits for the data to be returned. Even if you are using a BVM or connecting directly to the SP, both cases are server side. Database servers are much more efficient and optimized to run queries and filtering data. CR has to do the filtering on it's second pass and that causes performance delays.
Thank you
Don -
CGroup from Oracle Materialized view
Hi
I'm trying to create a User Manage Cgroup in timesten from a oracle mview....
When execute "create .. cache group command" this error message appears
Command> CREATE USERMANAGED CACHE GROUP "cg_ser_lin"
> AUTOREFRESH MODE INCREMENTAL INTERVAL 10 MINUTES
> STATE PAUSED
> FROM
"MARTINEL"."v_SER_LIN" (
> "MARTINEL"."v_SER_LIN" (
"NUM_LINE" CHAR(12 BYTE) NOT NULL,
"COD_serv" CHAR(10 BYTE) NOT NULL,
> "NUM_LINE" CHAR(12 BYTE) NOT NULL,
> "COD_serv" CHAR(10 BYTE) NOT NULL,
> "fec_term" date not null,
> PRIMARY KEY("NUM_LINE","COD_serv"), READONLY
>
> );
5120: No matching unique index with not null columns, unique key constraint with not null columns, or primary key constraint on table MARTINEL.V_SER_LIN, cache operations are restricted
5168: Restricted cache groups are deprecated
5126: A system managed cache group cannot contain non-standard column type mapping
The command failed.
The mview definition is :
create materialized view v_ser_lin
parallel 3
nologging
refresh complete
start with sysdate next SYSDATE + 30/1440
as
select /*+ index (s ser_pk)*/sl.num_line, s.cod_serv,SL.FEC_INIC,SL.FEC_TERM
from servicios s, ser_lin sl
where
s.cod_serv = sl.cod_prod
and
s.flg_cons='S'
and
s.flg_switch='S';TimesTen does not currently support caching of Oracle materializesed views. The only objects that a cache group can be defined on are actual tables.
Also, any Oracle table that will be cached must have a primary key defined in Oracle.
Chris -
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 -
Can OGG capture change data set from Oracle Materialized Views ?
Hi Gurus,
We have 3 DB .
1st one is for application . 2nd one is staging where data will come via Materialized Views i.e. we have MView log on DB_1 and have MView on DB_2 . MViews are getting refreshed incrementally everday .
Now a new requirement has come so we need to pass the data from DB_2 to a new database DB_2 .
If OGG can capture and replicate incremental data from Miews then we can go along with OGG .
Can any one confirm the above ?
Thanks,
PujanHi Pujan,
Yes. There are some restrictions mentioned in the section Limitations of support for materialized page 8 of the Oracle Installation and Setup Guide 11g Release 1 found here:
http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html
Good luck,
-joe -
Materialized Views/Reporting Best Practice
Hi,
We have a number of complex materialized views (joining many tables) that are rebuilt every night by doing a full refresh (RERESH FORCE ON DEMAND). The views take a few hours to refresh and I have a concern that they will become slower over time as more data is added into the underlying tables.
Does anyone have any advice on other ways to achieve the rebuilds other that doing a full refresh? I would ideally like to refresh on commit, but as they are complex it won't allow that.
Regards
PaulHave you tried "MATERIALIZED VIEW LOG"
For more info you can refer..
http://docs.oracle.com/cd/E11882_01/server.112/e25554/toc.htm -
Oracle Materialized view with xmltype data type
this the table having in db1 i need to create materialized view db2 for this table i have followed below steps..
create table WORKSHEETMASTER
METHODID NUMBER(10),
WORKSHEETCODE VARCHAR2(50 BYTE) not null,
WORKSHEET SYS.XMLTYPE);
create materialized view log on db1.WORKSHEETMASTER;
db2
CREATE MATERIALIZED VIEW WORKSHEETMASTER
REFRESH FAST ON DEMAND
AS
SELECT METHODID,
WORKSHEETCODE,
worksheet FROM db1.WORKSHEETMASTER@DBLINK;
when i was create materialized view above script in db2 iam getting error
ORA-22992:cannot use LOB locators selected from remote tables
like this when remove the worksheet column created succesfully may know how achieve this problem
my database version 11g iam searched some sceniour not full filled
need for help
thanksthis the table having with in DB1
create table WORKSHEETMASTER
METHODID NUMBER(10),
WORKSHEETCODE VARCHAR2(50 BYTE) not null,
WORKSHEET SYS.XMLTYPE,
WORKSHEETID NUMBER primary key,
CREATEDDATE DATE,
CREATEDBY VARCHAR2(50 BYTE),
WORKSHEETNAME VARCHAR2(50 BYTE),
UPDATEDDATE DATE,
UPDATEDBY VARCHAR2(50 BYTE),
NOOFROWS NUMBER(3),
NOOFCOLUMNS NUMBER(3),
WORKSHEETTYPE CHAR(1 BYTE),
SUBSTRATEUSED VARCHAR2(50 BYTE),
STATUS NUMBER(1),
APPROVEDBY VARCHAR2(50 BYTE),
APPROVED CHAR(1 BYTE) default 'N',
APPROVALREMARKS VARCHAR2(100 BYTE),
LNG_WORKSHEETNAME VARCHAR2(50)
iam trying to create materailzed view in db2
create materialized view WORKSHEETMASTER
refresh fast on demand
as
SELECT METHODID,
WORKSHEETCODE,
WORKSHEETID,
worksheet,
CREATEDDATE,
CREATEDBY,
WORKSHEETNAME,
UPDATEDDATE,
UPDATEDBY,
NOOFROWS,
NOOFCOLUMNS ,
WORKSHEETTYPE,
SUBSTRATEUSED,
STATUS,
APPROVEDBY,
APPROVED,
APPROVALREMARKS,
LNG_WORKSHEETNAME FROM db1.WORKSHEETMASTER@DBLINK; --remote database
iam creating above scriprt in db2 getting error this my total script -
Oracle Materialized View | Deletion of Records, Oracle Materialized View
One question reg Materialized views.
If as part of housekeeping of the Source database we delete some records (older records), will the materialized view also be updated with the deletion?
I believe the answer is yes. In that case can we ensure that this delete does not happen?
Is there anyway we can prevent MView refresh from deleting the records that is once inserted even if we delete the same records in source DB?This is a common scenario, particularly with materialised views that summarise detail data where you want to keep the summary but not the detail, and it is addressed in the documentation.
The technique is to make the MV refresh on demand, delete the data from the detail tables, and use the CONSIDER_FRESH procedure to prevent the changes propagating to the MV. You'll probably find it in the docs by searching on DBMS_MView.Consider_Fresh. There are a few warnings to note I think. -
Oracle Materialized view tables not getting refreshed automatically.
At Destination:--
CREATE MATERIALIZED VIEW PROG_MEDIA
TABLESPACE ONA_TS1
BUILD IMMEDIATE
REFRESH FAST with rowid
START WITH SYSDATE
NEXT SYSDATE+1/96
AS (select /*+ PARALLEL(a,6) */ * from PROG_MEDIA@onair a);
exec dbms_mview.refresh('PROG_MEDIA','C');
At Source:--
CREATE MATERIALIZED VIEW LOG ON ONAIR.PROG_MEDIA
TABLESPACE MVLOG
WITH ROWID;
Fired manually:--
13:00:43 SQL> exec dbms_mview.refresh('PROG_MEDIA','C');
PL/SQL procedure successfully completed.
At source:--
13:18:35 SQL> select PROG_MEDIA_ID,PROG_MEDIA_NAME from PROG_MEDIA where PROG_MEDIA_ID='102226';
PROG_MEDIA_ID
PROG_MEDIA_NAME
102226
test
At Destination:--
14:03:28 SQL> select PROG_MEDIA_ID,PROG_MEDIA_NAME from PROG_MEDIA where PROG_MEDIA_ID='102226';
PROG_MEDIA_ID PROG_MEDIA_NAME
102226 UTSAV-5-162077
JOB LOG_USER THIS_DATE LAST_DATE_TIME NEXT_DATE_TIME INTERVAL FAILURES WHAT
242 ONAIR 17-05-11 14:17:24 SYSDATE+1/96 7 dbms_refresh.refresh('"ONAIR"."PROG_MEDI
A"');
242 ONAIR 17-05-11 14:32:25 SYSDATE+1/96 8 dbms_refresh.refresh('"ONAIR"."PROG_MEDI
A"');
1> I have scheduled this refresh job for every 15mins, but its not getting executed. Also my job_queue_process is '20'. Whenever i execute it manually it get's refresh.
2> I can schedule a cron for the same for every 15mins but i really dont want to do it.
Kindly help me out.Hi,
I have created MV_CAPABILITIES_TABLE & executed below commands:--
17:56:54 SQL> EXECUTE DBMS_MVIEW.EXPLAIN_MVIEW ('"ONAIR"."PROG_MEDIA"');
PL/SQL procedure successfully completed.
17:57:26 SQL> SELECT capability_name, possible, SUBSTR(related_text,1,8)
17:57:27 2 AS rel_text, SUBSTR(msgtxt,1,60) AS msgtxt
17:57:27 3 FROM MV_CAPABILITIES_TABLE
17:57:27 4 ORDER BY seq;
CAPABILITY_NAME P REL_TEXT MSGTXT
PCT N
PCT N
REFRESH_COMPLETE Y
REFRESH_COMPLETE Y
REFRESH_FAST Y
REFRESH_FAST Y
REWRITE N
REWRITE N
PCT_TABLE N PROG_MED relation is not a partitioned table
PCT_TABLE N PROG_MED relation is not a partitioned table
REFRESH_FAST_AFTER_INSERT Y
REFRESH_FAST_AFTER_INSERT Y
REFRESH_FAST_AFTER_ONETAB_DML Y
REFRESH_FAST_AFTER_ONETAB_DML Y
REFRESH_FAST_AFTER_ANY_DML Y
REFRESH_FAST_AFTER_ANY_DML Y
REFRESH_FAST_PCT N PCT is not possible on any of the detail tables in the mater
REFRESH_FAST_PCT N PCT is not possible on any of the detail tables in the mater
REWRITE_FULL_TEXT_MATCH N PROG_MED mv references a remote table or view in the FROM list
REWRITE_FULL_TEXT_MATCH N PROG_MED mv references a remote table or view in the FROM list
REWRITE_FULL_TEXT_MATCH N query rewrite is disabled on the materialized view
REWRITE_FULL_TEXT_MATCH N query rewrite is disabled on the materialized view
REWRITE_PARTIAL_TEXT_MATCH N materialized view cannot support any type of query rewrite
REWRITE_PARTIAL_TEXT_MATCH N materialized view cannot support any type of query rewrite
REWRITE_PARTIAL_TEXT_MATCH N query rewrite is disabled on the materialized view
REWRITE_PARTIAL_TEXT_MATCH N query rewrite is disabled on the materialized view
REWRITE_GENERAL N materialized view cannot support any type of query rewrite
REWRITE_GENERAL N materialized view cannot support any type of query rewrite
REWRITE_GENERAL N query rewrite is disabled on the materialized view
REWRITE_GENERAL N query rewrite is disabled on the materialized view
REWRITE_PCT N general rewrite is not possible or PCT is not possible on an
REWRITE_PCT N general rewrite is not possible or PCT is not possible on an
PCT_TABLE_REWRITE N PROG_MED relation is not a partitioned table
PCT_TABLE_REWRITE N PROG_MED relation is not a partitioned table
34 rows selected.
Elapsed: 00:00:00.09
What to be done next?
Also i fired the job manually by:--
17:38:02 SQL> set serveroutput on
17:39:45 SQL> EXEC DBMS_JOB.RUN(242);
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.48 -
Oracle materialized view + spatial index
Hello,
i faced with problem when i create spatial index on materialized view.
I create materialized view on 2 table which contains spatial geometrys.
create materialized view mv_geom as
select g.nid, g.geometry
from geom1
union all
select select g.nid, g.geometry
from geom2
i created spatial index - all works fine, but when i try to drop table, i get exception "ORA-04020"...
Materialized view become invalid but don't drop from database.
SQL> drop materialized view mv_geom;
Materialized view dropped
But object does not drop
select * from all_objects z where z.OBJECT_NAME = 'geom1'
and z.OBJECT_TYPE ='MATERIALIZED VIEW'
Any ideas?
Thank's for help!I don't quite follow you. Do you mean that after you dropped mv "mv_geom".
you expect that the base table "geom1" should be dropped? -
How to CREATE MATERIALIZED VIEW LOG (MV fast refresh) with some JOINS
Hi @ all,
i'm trying to create a MATERIALIZED VIEW LOG for a fast refresh of a MATERIALIZED VIEW.
It works fine with a simple Request in the MATERIALIZED VIEW:
CREATE MATERIALIZED VIEW MV_ZOTD43_P
TABLESPACE GDII
BUILD IMMEDIATE
REFRESH FORCE AS
SELECT * FROM ZOTD43_P;
COMMIT;
CREATE MATERIALIZED VIEW LOG ON ZOTD43_P
TABLESPACE "GDII"
WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
call DBMS_MVIEW.REFRESH('MV_ZOTD43_P', 'f');
But when I use a complex SQL-Request with some JOINS (one of the Table with spatial Data) in the MATERIALIZED VIEW, I get an error:
CREATE MATERIALIZED VIEW MV_TEST
TABLESPACE GDII
BUILD IMMEDIATE
REFRESH FORCE AS
SELECT lptd04_p.sst_nr AS sst_nr,
lptd03_p.aaaa AS aaaa,
lptd04_geom.geom as geom
FROM lptd04_p lptd04_p
JOIN lptd01_p lptd01_p ON lptd01_p.cre_nr = lptd04_p.sst_nr
JOIN lptd04_geom ON lptd04_geom.sst_nr = lptd04_p.sst_nr
JOIN lptd03_p lptd03_p ON lptd03_p.lief_nr = lptd04_p.lief_nr;
COMMIT;
CREATE MATERIALIZED VIEW LOG ON LPTD04_P
TABLESPACE "GDII"
WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
call DBMS_MVIEW.REFRESH('MV_TEST', 'f');
Error report:
SQL Error: ORA-12004: REFRESH FAST kann für Materialized View "GDI"."MV_GDI_SST_STAMM" nicht benutzt werden
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2255
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2461
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2430
ORA-06512: in Zeile 1
12004. 00000 - "REFRESH FAST cannot be used for materialized view \"%s\".\"%s\""
*Cause: The materialized view log does not exist or cannot be used. PCT
refresh is also not enabled on the materialized view
*Action: Use just REFRESH, which will reinstantiate the entire table.
If a materialized view log exists and the form of the materialized
view allows the use of a materialized view log or PCT refresh is
possible after a given set of changes, REFRESH FAST will
be available starting the next time the materialized view is
refreshed.
Am I doing something wrong or is it not possible CREATE MATERIALIZED VIEW LOG when the MATERIALIZED VIEW got some JOINS?
Regards,
GreqThanks for the link Alessandro ,
the error seems something to do with the Column-Type SDO_GEOMETRY, so
i create a new thread in the Spatial Discussion forum:
FAST REFRESHing of Oracle Materialized Views containing SDO_GEOMETRY column
Regards,
Greq -
About Refresh Error In Materialized view
hi
i have
Oracle 9.2.0.1 at the windows server 2003
i have created some materialized view to use in my one web application running on tomcat
i have scheduling for refresh it using refresh utility available in oracle materialized view snapshot refresh
but when its try to run state of refresh become unusable and table according to it
remains empty
when i try to do it manually it gives error log
Ora-12008 error in materialized view refresh path
ora-01114 io error writing block to file 201(block #2621321)
ora-27069 skgfdisp:attmempt to do i/o beyond the range of file
osd-04026 invalid parameter passed(OS 2621327)
ora-01114 io error writing block to file 201(block#2621321)
ora-27069 skgfdisp:attempt do i/o beyond the range of the file
osd-04026 invalid parameter passed (OS 2621327)
ora 06512 at "SYS.DBMS_SNAPSHOt",line 794
ora 06512 at "SYS.DBMS_SNAPSHOt", line 851
ora 06512 at "SYS.DBMS_SNAPSHOt", line 832
ora 06512 at line 2
even i could not understand this error
one strange thing in this when i restart my server and try to refresh
it is going to be refresh
please help meI suspect one of your datafiles has exceeded the 4Gb windows limit. Your tablespace has probably been set to autoextend and this has created the problem. I am not sure what you can do at this point apart from recover from backup. I would open a TAR with Oracle Support as soon as possible to try and resolve this issue.
Please note: This forum is for OLAP issues only. If you need more information I would try posting on the database forum.
Keith Laker
Oracle EMEA Consulting
OLAP Blog: http://oracleOLAP.blogspot.com/
OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
DM Blog: http://oracledmt.blogspot.com/
OWB Blog : http://blogs.oracle.com/warehousebuilder/
OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html -
Oracle Reports 6i w/ Materialized Views
Is Oracle Reports 6i integrated with Materialized Views? If so, is there a patch out there so the query builder will see them? The query is fine in Sql+ but Reports doesn't recognize the materialized views. What is the fix?
hello,
when you paste the query into the sql-window it should work. only the query-builder-tool does not pick them up.
regards,
the oracle reports team -
Materialized view not being used in the report
I have had a materialized view (MV) for a particular report. Recently, the report definition has changed little bit, so the existing MV is not being used by the report anymore. I copied the code Discoverer's SQL Inspection and recreated the materialized view. But still it is not working. Obviously, I am missing something at the database level. Does anyone have any idea? The database is 9i and Discoverer is 9.0.2. Thank you!
The SQL that you see from the Inspect SQL option will provide you with the SQL that Discoverer sends to the database. The database then may do a query rewrite to point to an available materialized view if available. This rewrite won't be seen from the inspect sql option. You need to check at the database level to verify if a query rewrite did in fact take place.
You may want to check the section titled "Query Rewrite with Materialized Views" from Ch1 - "Introduction to the Optimizer" in the Oracle9i Database Performance Tuning Guide and Reference, Release 2 (9.2), Part Number A96533-02, available at http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96533/optimops.htm#37287
Regards
Abhinav Agarwal
Oracle Business Intelligence Product Management
http://www.oracle.com/bi
http://www.oracle.com/technology/documentation/bi_ee.html
http://www.oracle.com/technology/software/products/ias/htdocs/101320bi.html
http://oraclebi.blogspot.com/
Maybe you are looking for
-
Images loaded in iMovie turn pixelated...
I am trying to create a slideshow using iMovie, but my images all turn out pixelated. I have tried high and low res files, as well as 1920x1080 px files but to no avail. What gives?
-
Call a adf form from oracle forms 11g
Hallo, I want to call a form developed in ADF from my existing oracle forms mask and then back from ADF form to the oracle forms mask. It this possible? Have everyone a how to for this problem? Thanks for your help Ines
-
%%[ ProductName: Distiller ]%% %%[Page: 1]%% %%[ Error: typecheck; OffendingCommand: showpage ]%% %%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %%
-
Hi Guru, Can you pls advice to how to configure the Cash Flow / Bank Flow in FF7A report. appreciate detailed steps with T codes. Joseph Jane.
-
Hi all Could some one tel y i'm getting the below mentioned error while doing migo for *** duty scenario/traders scenario "Enter a valid shipfrom vendor with excise details" Regards vkk