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
Similar Messages
-
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 -
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. -
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,
AppuHi,
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 -
How to get information from Oracle's views
Hi,
I need to get information from Oracle's views about:
* in which table's column is set index
* what type of index is on this column
* name of a trigger which exist on a table
* type of trigger (before, after etc)
* trigger status (enable, disable)
Thanks for help.Hi..
One of the best way to know which views to use is doing select * from dict where table_name like 'xxx';
For example in your case you needed to know about the indexes and triggers so
SQL> select * from dictionary where table_name like 'DBA_IND%';
TABLE_NAME COMMENTS
DBA_INDEXES Description for all indexes in the database
*DBA_IND_COLUMNS COLUMNs comprising INDEXes on all TABLEs and CLUSTERs*
DBA_IND_EXPRESSIONS FUNCTIONAL INDEX EXPRESSIONs on all TABLES and CLUSTERS
DBA_INDEXTYPES All indextypes
DBA_INDEXTYPE_COMMENTS Comments for user-defined indextypes
DBA_INDEXTYPE_ARRAYTYPES All array types specified by the indextype
DBA_INDEXTYPE_OPERATORS All indextype operators
DBA_IND_PARTITIONS
DBA_IND_SUBPARTITIONS
DBA_IND_STATISTICS Optimizer statistics for all indexes in the database
10 rows selected.
SQL> select * from dictionary where table_name like 'DBA_TRI%';
TABLE_NAME COMMENTS
DBA_TRIGGERS All triggers in the database
DBA_TRIGGER_COLS Column usage in all triggers
Reading the comments you can know which view to use, then describe the view and use what you need -
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 ? -
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 -
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 -
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 -
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? -
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 -
Error in Log file from a scheduled materialized view
Hi
Getting the following errors in the alert_xe.log file when refreshing a materialized view. The data from the materialized view seems fine.
ORA-12012: error on auto execute of job 1
ORA-12008: error in materialized view refresh path
ORA-01555: snapshot too old: rollback segment number 41 with name "_SYSSMU41$" too small
ORA-02063: preceding line from HRLIVE
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2566
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2779
ORA-06512: at "SYS.DBMS_IREFRESH", line 685
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 1
This is with XE Apex 4.1
Thanks for any suggestionsThanks - tried google and changing undo_retention but no luck.
We noticed something very odd...
TABLESPACE_NAME AUT
E:\ORACLEXE_11G\APP\ORACLE\ORADATA\XE\USERS.DBF
USERS YES
E:\ORACLEXE_11G\APP\ORACLE\ORADATA\XE\SYSAUX.DBF
UNDOTBS1 YES
E:\ORACLEXE_11G\APP\ORACLE\ORADATA\XE\UNDOTBS1.DBF
SYSAUX YES
E:\ORACLEXE_11G\APP\ORACLE\ORADATA\XE\SYSTEM.DBF
SYSTEM YES
The file SYSAUX.DBF has table space UNDOTBS1
and file UNDOTBS1.DBF has table space SYSAUX
This looks the wrong way around.
Any ideas how this could have happened and how this can be changed?
Thanks & regards
Edited by: rw on Jan 18, 2012 8:32 AM -
Execute Immediate. Insert from materialized view.
Hi,
I'm using Execute Immediate in a function to insert rows into a table. (Oracle 10G) The function in tern is used in a materialized view. So, effectively the view does an insert.
When I just had a regular insert statment the view would not compile. When I changed the insert statment into the execute immediate it started working.
Here are my questions:
1. Do I need a commit or execute immediate does it automatically? When I create my view that calls the function it looks like the rows do get inserted as expected. But I couldn't find documentation that explains whether execute immediate does the commit.
2. Is there a drawback to using execute immediate in a function that is used in a materialized view? Is there other way to insert rows from a materialized view? Can I call a stored procedure instead of a function in a materialized view?
Your help is greatly appreciated.
Thanks
NKthere are things that I'm not able to question yet :)It's a lot easier to write decent programs if we understand the why of the requirement as well as the what. I think you will create a better impression in your new job if you demonstrate some liveliness of thought and personality - by asking questions - rather than merely following orders.
The question I proposed is not necessarily a hostile one (I can think of at least one good reason for doing what you've been asked to do). Broadening your knowledge of your new system is a good thing in its own right. But you never know, asking the right question may prevent you doing unnecessary work.
Cheers, APC
Maybe you are looking for
-
[ Solved ] Firefox profile cannot be loaded .
After a few weeks of not updating , ( I was off line ), I updated and Firefox displays the following message ; " Your profile cannot be loaded . It may be missing or inaccesible. " In ' Home ' I have .mozilla-backup and under properties - owne
-
Im using CC and have installed all the latest updates. My cap lock is off and my cursor preferences are fine. BUT my brush tips are all messed up today. I see the brush outline only up to a specific size (different with each brush) but beyond that
-
How can I adress more memory with my Adobe Illustrator CC (64Bit) version?
Hi everybody! I'm using Adobe Illustrator CC 64Bit version. My PC has 24GB RAM and Scratch disk is set to local which has another 800GB available space. When I open Adobe Illustrator and have at the same time my Task Manager open it says that Illustr
-
Hello everyone. I'm going to give InDesign typesetting a Arabic book, ask the Middle East version where I can download? How to change the text direction? I download the CS6 version of why there is no text direction button? Thank you http://helpx.ado
-
Change the user/system status when PP order is packed through COPP1
Hi All, We have a requirement to set the system or user status for a PP order. The flow is the transaction COPP1 is used to pack the order for different dates. Now there is a button available on the toolbar when the second screen comes and it shows t