Error in materialized views
during the materialized view creation.
i am phasing the following error
ERROR at line 12:
ORA-12014: table 'mtest' does not contain a primary key constraint
but the table does't have primary key.
when i tried to add primary key to the table mtest .another problem is comming
sql> alter table mtester.mtest add primary key (IUWP2_ITEM_NO);
alter table mtest add primary key (IUWP2_ITEM_NO)
ERROR at line 1:
ORA-02437: cannot validate (mtester.SYS_C0062425) - primary key violated
U can use this script.
alter table EMPLOYEE add constraint foo11 primary key (DEPRATMENT_ID) deferrable novalidate;
Similar Messages
-
ORA-12008: error in materialized view refresh path with ORA-01652
I have a temp tablespace with 2 tempfiles of 2GB each (total 4GB) but still refresh of materialized view is failing with following error:
5646690 - BIS Materialized View Refresh Program
ORA-12008: error in materialized view refresh path
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP1
I checked and temp ts is completly filled
SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
TABLESPACE_NAME BYTES_USED BYTES_FREE
TEMP1 2147483648 0
TEMP1 2147483648 0
My question is how do I find out how much space I need for temp tablespace. what 's the best practise to size temp tablespace when running refresh. refresh is done by client who is submitting a request thru ebiz apps so I 'd like to size it correctly without having to keep guessing.
Thanks so much in advance for any helpHello,
Temp tablespace size depends how much sort by , order by operation your application performing. You can create new temp tablespace and drop old one with bigger file size
CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '\mypath_to_temp\TEMP02' SIZE 256M REUSE AUTOEXTEND ON NEXT 256M MAXSIZE 8192M EXTENT MANAGEMENT LOCAL;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;
Drop tablespace temp including contents; -- Make sure you delete on temp data files.Here is link for your reading purpose
http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_3.shtml
Regards
Edited by: OrionNet on Mar 6, 2009 6:15 PM -
Materialized View, ORA-12008: error in materialized view refresh path
I want to refresh a materialized view, but I get an ORA-12008 error.
Does anybody have an idea? I do not find any errors in my refresh statement.
CREATE MATERIALIZED VIEW scott.dummy_mv
TABLESPACE test
BUILD IMMEDIATE
USING INDEX TABLESPACE idx_test
REFRESH
START WITH sysdate
NEXT ROUND(SYSDATE)+5/24
WITH PRIMARY KEY
ENABLE QUERY REWRITE
AS
SELECT KM.ID ID
,KM.USERNAME USERNAME
,KM.ABTID ABTID
FROM my_table KM
scott@orcl>desc dummy_mv
Name Null? Typ
ID NOT NULL NUMBER(4)
USERNAME NOT NULL VARCHAR2(30)
ABTID NOT NULL NUMBER(4)
scott@orcl>
BEGIN
SYS.DBMS_JOB.REMOVE(6579);
COMMIT;
END;
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'dbms_refresh.refresh(''"scott"."dummy_mv"'');'
,next_date => to_date('07.01.2009 05:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'ROUND(SYSDATE)+5/24 '
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
scott@orcl>exec dbms_refresh.refresh('dummy_mv');
BEGIN dbms_refresh.refresh('dummy_mv'); END;
FEHLER in Zeile 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 820
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 877
ORA-06512: in "SYS.DBMS_IREFRESH", Zeile 683
ORA-06512: in "SYS.DBMS_REFRESH", Zeile 195
ORA-06512: in Zeile 1
scott@orcl>crupper wrote:
I get the same error:
scott@orcl>exec dbms_mview.refresh('dummy_mv','c');
BEGIN dbms_mview.refresh('dummy_mv','c'); END;
FEHLER in Zeile 1:
ORA-12008: error in materialized view refresh path
ORA-00947: not enough values
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 820
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 877
ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 858
ORA-06512: in Zeile 1
I would first check the "query" information of the DBA_SNAPSHOTS/DBA_MVIEWS dictionary views if it reveals anything obvious.
But it looks more like an internal error while processing the refresh. You can get more information about the error by tracing the session. A "alter session set sql_trace = true;" before running the refresh should be sufficient. Disconnect afterwards and check the generated trace file for errors either using "tkprof" and checking the output or by manually searching for "err=" in the trace file.
Which 4-digit version of Oracle are you using?
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
ORA-12008: error in materialized view refresh path... Bug?
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> drop materialized view log on test_tbl;
Materialized view log dropped.
SQL> drop materialized view mv_test_tbl;
Materialized view dropped.
SQL> drop table test_tbl;
Table dropped.
SQL> create table test_tbl(
2 test_id number(10) primary key,
3 test_name varchar2(10) not null)
4 ;
Table created.
SQL> insert into test_tbl values (1,'bob');
1 row created.
SQL> insert into test_tbl values (2,'joe');
1 row created.
SQL> insert into test_tbl values (3,'john');
1 row created.
SQL> commit;
Commit complete.
SQL> create materialized view log on test_tbl
2 with primary key , rowid, sequence
3 (
4 test_name
5 )
6 including new values;
Materialized view log created.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 as
4 select test_id,
5 test_name
6 from test_tbl;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
Commit complete.Ok, so that's all good. Now if I create the materialized view log with the COMMIT SCN option:
SQL> drop materialized view log on test_tbl;
Materialized view log dropped.
SQL> drop materialized view mv_test_tbl;
Materialized view dropped.
SQL> create materialized view log on test_tbl
2 with primary key , rowid, sequence
3 (
4 test_name
5 ),
6 commit scn
7 including new values;
Materialized view log created.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 as
4 select test_id,
5 test_name
6 from test_tbl;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
commit
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01006: bind variable does not exist
SQL>Committing an update that updates no rows against a master table for a single table fast refreshable materialized view results in the error above when the materialized view log on the master table is created with the COMMIT SCN option. I'm guessing that this isn't how things are supposed to work. Or am I missing something here? Anyone else encountered this before?
Cheers.
Edited by: Stain on Jan 25, 2013 1:27 PMQuery Rewrite is an option for a Materialized View, not a Materialized View Log. Also, query rewrite is used as an optimization technique which "transforms a SQL statement expressed in terms of tables or views into a statement accessing one or more materialized views that are defined on the detail tables". I don't think it plays any role in the refresh path.
Regardless, it made no difference.
SQL> create materialized view mv_test_tbl
2 refresh fast on commit
3 ENABLE QUERY REWRITE
4 as
5 select test_id,
6 test_name
7 from test_tbl
8 ;
Materialized view created.
SQL> update test_tbl set test_name = 'hello' where test_id = 1000;
0 rows updated.
SQL> commit;
commit
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01006: bind variable does not exist
SQL>Edited by: Stain on Jan 25, 2013 2:06 PM -
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 -
ORA-12096: error in materialized view log
Hi All,
I had created a fast refresh materialized view. Log was also created.
Now i dropped the mv and the logs.
But now every time i update or insert into this customer table i get error message.
ORA-12096: error in materialized view log on Customer
ORA-00942: table or view does not exist
There are entries in the DBA_MVIEW_LOGS for customer table.
Please suggest.Hi,
What database version are you on?
And do you have access to Metalink/My Oracle Support?
Found this, by the way:
ORA-12096: error in materialized view log on <table>
If problems occur when you try to access a log file for a materialized view, the system issues an ORA-12096 error message which is followed by the actual error. If the ORA-12096 error message is accompanied by an ORA-00942 message, the problem may be due to an online reorganization that was only partially undone. In this case, you can drop the log file for the materialized view manually (after you have verified that it is no longer required):
DROP MATERIALIZED VIEW LOG ON <table>;
Edited by: hoek on Jul 29, 2009 2:15 PM -
ORA-12096: error in materialized view log on ORA-01301:insufficient privile
Hi,
One of our ebusiness Apps 11510 instances has database that was
upgraded from 9.2.0.6 to 10.2.0.4 with Database Vault.
After that, we are getting an error:
ORA-12096: error in materialized view log on "SCHEMA"."TABLE_NAME" ORA-01301:insufficient privileges
Can you please let know what can be the reason. Which user is being checked for the privileges?
RegardsI am facing the same issue in one of our internal instances.
Apps Environment has been upgraded from Database 9.2.0.6 to Database 10.2.0.4 with Database Vault. We started facing this issue and the same error after the upgrade. MLOG definition has not changed.
What privilege is it expecting to be present for the schema.
The definition of the MLOG is as given below
LOG_TRIGGER = NULL
ROWIDS = YES
PRIMARY_KEY = NO
OBJECT_ID = NO
FILTER_COLUMNS = NO
SEQUENCE = NO
INCLUDE_NEW_VALUES = NO -
ORA-12008: error in materialized view refresh path in 10g
Hi, all.
The database is on 10gr2.
I am testing materized view refresh.
However, I got the following errors.
exec dbms_refresh.refresh('"STGFAB"."MV_OPTION_TEST_HO1"');
ORA-12008: error in materialized view refresh path
ORA-01008: not all variables bound
ORA-02063: preceding line from L8ZFAB
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
ORA-06512: at "SYS.DBMS_IREFRESH", line 683
ORA-06512: at "SYS.DBMS_REFRESH", line 195
ORA-06512: at line 1
Thanks in advance.
Best Regards.Subject: Materialized View Refresh Fails on Second Attempt With ORA-01008 'Not All Variables Bound' Error
Doc ID: Note:472261.1 Type:
--MM -
ORA-12008: error in materialized view refresh path ;;; PLZ HELP ME
Hi all,
I 'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0; I got these errors when I tried to refresh my materialized view ;
ORA-12008: error in materialized view refresh path
ORA-01555: snapshot too old: rollback segment number 5 with name "_SYSSMU5$"
too small
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
I don't understand what mean these errors and why i got them?
Someone can help me please ?
Thanks
regards,thank you Justin,
I found in my alertDB.log this line ;
Mon Aug 20 03:00:54 2007
ORA-01555 caused by SQL statement below (SQL ID: 64a7sdbbvknta, Query Duration=1021 sec, SCN: 0x0004.4a145344):
Mon Aug 20 03:00:54 2007
INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "MANAGEMENT"."MVIEW_COMPUTERS"("ID","WINVERSION","ANTIVIRUS","GUID","INSTALLDT","CONNECTION_TYPE","GROUPID
","QUOVACOUNTRY") SELECT "C"."ID","C"."WINVERSION","C"."ANTIVIRUS","C"."GUID","C"."INSTALLDT","C"."CONNECTIONTYPE","C"."GROUPID","C"."QUOVACOUNTRY"
FROM "MANAGEMENT"."COMPUTERS" "C"
So i execute this query to found the TUNED_UNDORETENTION value ;
SELECT *
FROM V$UNDOSTAT v
WHERE v.MAXQUERYID = '64a7sdbbvknta'
and i have this result :
BEGIN_TIME 20070820 02:53:42
END_TIME 20070820 03:03:42
UNDOTSN 1
UNDOBLKS 51242
TXNCOUNT 5012
MAXQUERYLEN 1060
MAXQUERYID 64a7sdbbvknta
MAXCONCURRENCY 21
UNXPSTEALCNT 0
UNXPBLKRELCNT 0
UNXPBLKREUCNT 0
EXPSTEALCNT 14
EXPBLKRELCNT 51392
EXPBLKREUCNT 0
SSOLDERRCNT 1
NOSPACEERRCNT 0
ACTIVEBLKS 606920
UNEXPIREDBLKS 19896
EXPIREDBLKS 612728
TUNED_UNDORETENTION 1841
I don't know exactly which value i should set my parameter?
Message was edited by:
HAGGAR -
ORA-12096: error in materialized view log on a table
Hi while updating a table getting below error
ORA-12096: error in materialized view log on "FII"."FII_GL_JE_SUMMARY_B"
What might be the problem.
Thanks.might be table definition has changed, you may need to drop the mview log and recreate it.
-
ORA-12096 error in materialized view log on %s . %s
Hi,
I faced the peculiar error message "ORA-12096 error in materialized view log on ..." when trying to insert into a table. But .. there is not a materialized view log (none in the current schema nor in other users' schema).
Note:I use OraDB10g v2
Thanks ....a lot
SimSim,
NOthing relevant is coming up over metalink for the erorr. Some non-required results are coming but I dnt think that they are helpful. The most nearest to your error is this thread over google,
http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://blog.chinaunix.net/u/7121/showart_460192.html&sa=X&oi=translate&resnum=8&ct=result&prev=/search%3Fq%3DORA-12096%2Berror%2Bin%2Bmaterialized%2Bview%2Blog%2Bon%2BORA-00942%2Btable%2Bor%2Bview%2Bdoes%2Bnot%2Bexist....%26hl%3Den%26rls%3Dcom.microsoft:en-US:%26rlz%3D1I7GGLJ%26pwst%3D1
It does talk abot the same thing, mview logs.
Do let me know what you got.
Cheers
Aman.... -
Error in materialized view refresh path
I have a procedure that manuall refreshes a materialized view. It almost always gets the following errors:
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-08103: object no longer exists
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
ORA-06512: at "MGT2.ITV_026_SP", line 35
ORA-06512: at line 1
When I run the same refresh of the materialized view directly from SQL*Plus, it never gets the error. It takes only about 5 minutes. OEM says the undo tablespace can support retention of 753 minutes if I'm understanding the graph.
Thanks for your help..I will take a wild guess:
MGT2.VW_PRINT_026
Is a materialized view too.
This error means that while doing a refresh to VW_MAT_026 it
source mv, the VW_PRINT_026 wasn't exists, i.e. has been in the refresh process.
You didn't get it in Sql*Plus because you are doing it step by step.
The solution - make sure that VW_PRINT_026 completed it refresh before doing
The VW_MAT_026 refresh, e.g.
not tested-
begin
dbms_snapshot.refresh('VW_PRINT_026');
dbms_snapshot.refresh('VW_MAT_026');
end;Another option - the VW_PRINT_026 is a table created "on the fly"
And in some scenario - the table isn't exists yet...
If this is the case you should check if the object exist before doing the
VW_MAT_026 refresh, e.g.
not tested-
declare
ll_exists number;
begin
select 1 into ll_exists from all_objects where owner ='MGT2' and
object_name ='VW_PRINT_026';
dbms_snapshot.refresh('VW_MAT_026');
when others then raise;
end;Amiel -
Materialed View Refresh Error ORA-12008: error in materialized view refresh
Hi,
I am trying to refersh the following materialized view with the below command and getting the below error
begin
DBMS_MVIEW.REFRESH('GLVW_MIS_ADB');
end;
The following error has occurred:
ORA-12008: error in materialized view refresh path
ORA-12840: cannot access a remote table after parallel/insert direct load txn
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 803
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 860
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 841
ORA-06512: at line 2
Please advice on this.
Thanks & Regards,
Kartik$ oerr ora 12840
12840, 00000, "cannot access a remote table after parallel/insert direct load txn"
// *Cause: Within a transaction, an attempt was made to perform distributed
// access after a PDML or insert direct statement had been issued.
// *Action: Commit/rollback the PDML transaction first, and then perform
// the distributed access, or perform the distributed access before the
// first PDML statement in the transaction.
$ -
Error: ORA-12008: error in materialized view refresh path
Hello Dba' s
We are on 12.0.6 EBS with 10.2.0.5 DB on Sun solaris SPARC 64 bit.
We are getting below error while Refreshing Materialized View.
Start of log messages from FND_FILE
Error: ORA-12008: error in materialized view refresh path
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], [] Occured while Refreshing Materialized View
End of log messages from FND_FILE
Not sure how to proceed.We have just upgraded our database from 10.2.0.3 to 10.2.0.5.
Also we still have our test instance with 10.2.0.3 database ,there refreshing MV completed successfully.
Also refreshing through TOAD gives below error:-
BEGIN
DBMS_SNAPSHOT.REFRESH(
LIST => 'XXPPL.XXPPL_OPM_TRANSACTIONS_MV'
,PUSH_DEFERRED_RPC => TRUE
,REFRESH_AFTER_ERRORS => FALSE
,PURGE_OPTION => 1
,PARALLELISM => 0
,ATOMIC_REFRESH => TRUE
,NESTED => FALSE);
END;
Error at line 2
ORA-12008: error in materialized view refresh path
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
ORA-06512: at line 2
Please advice.
Thanks,
Edited by: user12209274 on Nov 23, 2010 2:10 AMthank you Justin,
I found in my alertDB.log this line ;
Mon Aug 20 03:00:54 2007
ORA-01555 caused by SQL statement below (SQL ID: 64a7sdbbvknta, Query Duration=1021 sec, SCN: 0x0004.4a145344):
Mon Aug 20 03:00:54 2007
INSERT /*+ BYPASS_RECURSIVE_CHECK */ INTO "MANAGEMENT"."MVIEW_COMPUTERS"("ID","WINVERSION","ANTIVIRUS","GUID","INSTALLDT","CONNECTION_TYPE","GROUPID
","QUOVACOUNTRY") SELECT "C"."ID","C"."WINVERSION","C"."ANTIVIRUS","C"."GUID","C"."INSTALLDT","C"."CONNECTIONTYPE","C"."GROUPID","C"."QUOVACOUNTRY"
FROM "MANAGEMENT"."COMPUTERS" "C"
So i execute this query to found the TUNED_UNDORETENTION value ;
SELECT *
FROM V$UNDOSTAT v
WHERE v.MAXQUERYID = '64a7sdbbvknta'
and i have this result :
BEGIN_TIME 20070820 02:53:42
END_TIME 20070820 03:03:42
UNDOTSN 1
UNDOBLKS 51242
TXNCOUNT 5012
MAXQUERYLEN 1060
MAXQUERYID 64a7sdbbvknta
MAXCONCURRENCY 21
UNXPSTEALCNT 0
UNXPBLKRELCNT 0
UNXPBLKREUCNT 0
EXPSTEALCNT 14
EXPBLKRELCNT 51392
EXPBLKREUCNT 0
SSOLDERRCNT 1
NOSPACEERRCNT 0
ACTIVEBLKS 606920
UNEXPIREDBLKS 19896
EXPIREDBLKS 612728
TUNED_UNDORETENTION 1841
I don't know exactly which value i should set my parameter?
Message was edited by:
HAGGAR -
Regarding Error in Materialized view Fast Refresh
ORA-12015: cannot create a fast refresh materialized view from a complex query
CREATE MATERIALIZED VIEW MVCONTENTHISTORY_01
BUILD IMMEDIATE
REFRESH FAST
WITH PRIMARY KEY
ENABLE QUERY REWRITE
AS
SELECT a.DAY, a.contentname,
SUM
(CASE
WHEN (b.subscriptionstartdate) <= (a.DAY)
AND ((CASE
WHEN b.subscriptionenddate IS NOT NULL
THEN (a.DAY)
ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
END
) <=
(CASE
WHEN b.subscriptionenddate IS NOT NULL
THEN (b.subscriptionenddate)
ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
END
THEN 1
ELSE 0
END
) COUNT,
COUNT
(CASE
WHEN (b.subscriptionstartdate) <= (a.DAY)
AND ((CASE
WHEN b.subscriptionenddate IS NOT NULL
THEN (a.DAY)
ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
END
) <=
(CASE
WHEN b.subscriptionenddate IS NOT NULL
THEN (b.subscriptionenddate)
ELSE TO_DATE ('01/20/1990', 'MM/DD/YYYY')
END
THEN 1
ELSE 0
END
) cnt
FROM TBLTDATEWISECONTENT a,
(SELECT TRUNC (a.subscriptionstartdate) subscriptionstartdate,
TRUNC (a.subscriptionenddate) subscriptionenddate, b.NAME,
b.contentid
FROM syntbltcontentsubscrhistory a, syntblmcontent b
WHERE b.contentid = a.contentid(+)) b
WHERE a.contentid = b.contentid(+) AND a.DAY = b.subscriptionstartdate(+)
GROUP BY a.contentname, a.DAY;
I can't create Materialized view with fast Refresh .
Kindly provide solution .
Regards,
nayana chavda.Kindly provide full Oracle version since option vary by release.
There error message says it is impossible to fast refresh based on a complex query.
On 10g Oracle provides a package procedure that will tell you why the view cannot be fast refreshed: dbms_mview.explain_mview.
Otherwise see the Advanced Replication Manual for a list of restrictions.
10gR2 >>Restrictions for Materialized Views with Subqueries
The defining query of a materialized view with a subquery is subject to several restrictions to preserve the materialized view's fast refresh capability.
The following are restrictions for fast refresh materialized views with subqueries:
Materialized views must be primary key materialized views.
The master's materialized view log must include certain columns referenced in the subquery. For information about which columns must be included, see "Logging Columns in the Materialized View Log".
If the subquery is many to many or one to many, join columns that are not part of a primary key must be included in the materialized view log of the master. This restriction does not apply to many to one subqueries.
The subquery must be a positive subquery. For example, you can use the EXISTS condition, but not the NOT EXISTS condition.
The subquery must use EXISTS to connect each nested level (IN is not allowed).
Each table can be in only one EXISTS expression.
The join expression must use exact match or equality comparisons (that is, equi-joins).
Each table can be joined only once within the subquery.
A primary key must exist for each table at each nested level.
Each nested level can only reference the table in the level above it.
Subqueries can include AND conditions, but each OR condition can only reference columns contained within one row. Multiple OR conditions within a subquery can be connected with an AND condition.
All tables referenced in a subquery must reside in the same master site or master materialized view site.
<<
HTH -- Mark D Powell --
Message was edited by: added list of restrictions left off initial post
mpowel01 -
ORA-12008: error in materialized view refresh path
Hi everyone,
I'm getting a weird error when I try to do a fast refresh on my materialized view. My basic approach is simple, I got a MV log on my fact table with all the columns needed by the materialized view, sequence, rowid INCLUDING NEW VALUES.
I've got my materialized view setup with a my summary level data, COUNT(*), and COUNT(EXP) for every SUM(EXP). I check the MV_CAPABILITIES_TABLE, and sure enough, it can be ran with fast refresh. I've got my fact table in schema USER1 and my materialized view in schema USER2.
When I create the materialized view, there's no problem. If I immediately execute a fast refresh (EXEC DBMS_MVIEW.REFRESH('MY_MV','F'); ), again, no problem.
However, if I run the ETLs which update the source fact table, and then I run the fast refresh again, I get the ORA-120008.
But if I make the exact same MV in the USER1 schema, I have no problem doing fast refreshes. What's up with that? Does the table owner have to be the one with the materialized view? USER1 and USER2 are on the same DB and have the same table space. Does USER2 need any additional grants besides select on the source fact table? Do I need to grant select on the MVIEW log somehow?
Thanks for the help!
-JoeI just granted select on the base table. I assumed that since the MV log is attached to the table, that select on the table also gave select to the MV Log. But I've been wrong before.
Is there some special syntax to grant on the MV Log?
-Joe
Maybe you are looking for
-
Random hard freezing issues, Windows 8 64-bit on Macbook Pro (Late 2008)
Hi, I recently upgraded to OS X 10.8.3 and got a hold on copy of Windows 8 64-bit. As I'm running on my old trustworthy 15 inch Macbook Pro (Late 2008), my hardware is officially unsupported. Over the years I've had XP, Vista, Win7 32-bit and 64-bit
-
How to create a package and add a file?
Hi all, I am new to Java and very much much confussed with how to create a package and then include some files any help will be very thankfull. Thanks for your help kka.
-
How to maintain GR/IR clearing account
Dear all, Can anyone tell me how the GR/IR clearing account maintained manually - i.e., prevent or stop system from auto posting. Is there any possibility - if yes can you tell me the steps and t.code where this has to be maintained. Regards, M.M
-
Hi, Can any one explain please 1.Why we need to create XSD, 2.What is the use of dehydration, 3.Types in XML Please explain any error handling with example.
-
Content of xml driven by parameter
What would be the schema for for the following xml structure? <entry bodySwitch="true"> <body> ... </body> </entry> <entry bodySwitch="false"/> I.e. whether the xml file has a content depends on a parameter.