Materialized Views from 9i to 10g
Hi All
I have read that Materialized views in oracle 9i or 10g does not differ alot and that in 10g the query_rewrite is compulsory... With this in mind I have done an import of full database from oracle 9i 9.2.0.1 to a database in 10g, 10.2.0.3. the import as such did not throw any messages..
however, when I tried to re-import data schema wise from user1 in 9i to user1 in 10g, all the materialised views are failing to import data.. with ora-01732 error message.. where an update/insert is not allowed on views.. however, I expected tht once the import is complete, I could quickly recompile the views .. and restore the data. But when I try doing it.. .these tables in 10.2.0.3 database do not show up as snapshot tables which they are in source 9i..
I tried to avoid importing these in my next attempt.. but no luck.. I am at the moment unsure if i am missing any thing on the target database which is 10g? Please advice.
Sarat
It is the same user who is doing both import as well as export... I create a full schema dmp file from the exp utility in 9i.. which is later imported as the same user into the schema in 10g for the data refresh..
my exp and imp commands are as below..
exp u1/u1 file=D:\Database\u01.dmp buffer=200000 compress=Y grants=y log=D:\Database\u01-emp.log STATISTICS=NONE
imp file=e:\u01.dmp buffer=1073741824 statistics=none ignore=y resumable=y
when prompted, supply u01 login credentials..
the target machine has more cpu and ram and so the difference in buffer values..
on source oracle is 9.2.0.1 and on target it is 10.2.0.3. I did not set any value for query rewrite or any additional parameter in the target.. as I read it is by default true.
please advice.
sarat
Similar Messages
-
Problems in creating Materialized View from 10g R2 to 11g
Hi,
We have two databases in 10g Release 2. These databases are on two different servers and we use
Materialized views to replicate data between these servers. We are currently using 64 bit version of
oracle 10g release 2 for LINUX.
Oracle Database 10g Release 10.2.0.1.0 - 64 bit Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
We use CENTOS 5 - 64 bit edition
We upgraded one of the databases to 11g (We exported the data from old database and
imported it in new database) . Then we tried to create a Materialized view with incremental refresh
on it where the base table is in the second Oracle 10g database.
The problem is that it is not letting us create the view with FAST Refresh. It kept on giving ORA-12028
error. We tried different remedies suggested on forums like creating a view with ROWID, but still it
continued giving us the same error. We also synchronized the characterset of Oracle 10g and Oracle 11g
installations but still it did not work.
Our base table size is pretty large (over 10 Million records) and if we do a full refresh, it takes hours to
refresh it.
Without incremental refresh, we will not be able to fucntion, and to upgrade both database simultaneously
we will need a large down-time which also we can not afford.
Please advise what should we do.
Best Regards
Madhup
Edited by: Madhup on Mar 2, 2009 10:45 AMHello,
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 -
Materialized View UNION different tables 10g.
I am trying to create a materialized view from 2 different tables. According the documentation for 10G it should be available.
Here is my script.
DROP MATERIALIZED VIEW PERSON_MV_T16;
CREATE MATERIALIZED VIEW PERSON_MV_T16 refresh complete on demand
AS
SELECT
CAST(P.MARKER AS VARCHAR2(4)) AS MARKER,
P.ROWID P_ROW_ID,
CAST(P.ACTIVE_IND_DT AS DATE) AS ACTIVE_IND_DT
FROM PERSON_ORGS_APEX_MV P
UNION
SELECT
CAST(P.MARKER AS VARCHAR2(4)) AS MARKER,
P.ROWID P_ROW_ID,
CAST(P.ACTIVE_IND_DT AS DATE) AS ACTIVE_IND_DT
FROM PERSON_ORGS_APVX_MV P
delete from mv_capabilities_table;
begin
dbms_mview.explain_mview('PEOPLE.PERSON_MV_T16');
end;
select *
from mv_capabilities_table where capability_name not like '%PCT%' and capability_name = 'REFRESH_FAST_AFTER_INSERT';
I get the following error.
CAPABILITY_NAME = REFRESH_FAST_AFTER_INSERT
POSSIBLE = N
MSGTEXT = tables must be identical across the UNION operator
I wrapped them in CAST operations just to be sure they are the same type and size.As far as I'm aware, you can create MV in standard and also there is no limitation that I'm aware off
Standard and Enterprise Edition
A. Basic replication (MV replication)
\- transaction based
- row-level
- asynchronous from master table to MV (Materialized View)
- DML replication only
- database 7 / 8.0 / 8i / 9i / 10g
Variants:
1. Read-only MV replication
2. Updateable MV replication:
2.1 asynchronous from MV to master
2.2 synchronous from MV to master
3. Writeable MV replication
Enterprise Edition only
B. Multimaster replication
\- transaction based
- row-level or procedural
- asynchronous or synchronous
- DML and DDL replication
- database 7 / 8.0 / 8i / 9i / 10g
- Enterprise Edition only
Variants:
1. row-level asynchronous replication
2. row-level synchronous replication
3. procedural asynchronous replication
4. procedural synchronous replication
C. Streams replication
(Standard Edition 10g can execute Apply process)
\- (redo) log based
- row-level
- asynchronous
- DML and DDL replication
- database 9i / 10g (10g has Down Streams Capture) -
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 -
ORA-12015: cannot create a fast refresh materialized view from a complex q
Hi,
I'm facing very strange problem. Please help me why this error is coming
I'm creating a simple materialized view, but it is giving below error since this is simple select * from.
CREATE MATERIALIZED VIEW EFMS.MS_TASK
BUILD IMMEDIATE
REFRESH FAST
START WITH SYSDATE
NEXT (SYSDATE + 1/24)
WITH ROWID
AS
SELECT * FROM MS_TASK@efms_link;
SELECT * FROM MS_TASK@efms_link
ERROR at line 8:
ORA-12015: cannot create a fast refresh materialized view from a complex query
CREATE MATERIALIZED VIEW LOG ON MSDBO.MS_TASK
TABLESPACE DBOR_MVLOG
PCTUSED 0
PCTFREE 60
INITRANS 20
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOLOGGING
PARALLEL ( DEGREE 2 INSTANCES 1 )
WITH ROWID, PRIMARY KEY
EXCLUDING NEW VALUES;1º
Not is a best practice to use 'select *'
2º
ORA-12015: cannot create a fast refresh materialized view from a complex query
Cause: Neither ROWIDs and nor primary key constraints are supported for complex queries.
Action: Reissue the command with the REFRESH FORCE or REFRESH COMPLETE option or create a simple materialized view.
Then you have to change REFRESH FAST or create a primary key in MS_TASK@efms_link to avility fast refresh.
. :-) any help with my english is wellcome :-) . -
ORA-12015: cannot create a fast refresh materialized view from a complex
Hi All,
I am trying to create materialized view but i got a error ORA-12015: cannot create a fast refresh materialized view from a complex query.
Regards,
narayanaHi,
Please see if (Note: 179466.1 - Diagnosing ORA-12015 fast refresh materialized view / complex queries) helps.
Regards,
Hussein -
Create materialized view from Designer9i
Is there a way to create a materialized view from Oracle Designer 9i that will that have a header that look like this :
CREATE MATERIALIZED VIEW XXXXXXXXX
REFRESH COMPLETE ON DEMAND WITH PRIMARY KEY
Instead of this :
CREATE MATERIALIZED VIEW XXXXXXXXX
REFRESHWITH ROWID
Thanks
Jérômeyes.
as long as you have the privilege.
but be careful, it may causing locking issue in the SQL Server side. -
Materialized view in Oracle 9i/10g SE?
Hi All,
Can we define MV's in standard edition of oracle9i & 10g database? If yes, are there any limitations on creation of MV's in Standard edition compare to Enterprise edition like Query rewrite, creation of log tables etc?
As per link : http://www.dba-oracle.com/art_so_oracle_standard_enterprise_edition.htm , MV's seems to be avialable in EE.
Also let me know if there is any document available to general public for comparision of various edition features of oracle database version.
Thanks in advance,
AJAs far as I'm aware, you can create MV in standard and also there is no limitation that I'm aware off
Standard and Enterprise Edition
A. Basic replication (MV replication)
\- transaction based
- row-level
- asynchronous from master table to MV (Materialized View)
- DML replication only
- database 7 / 8.0 / 8i / 9i / 10g
Variants:
1. Read-only MV replication
2. Updateable MV replication:
2.1 asynchronous from MV to master
2.2 synchronous from MV to master
3. Writeable MV replication
Enterprise Edition only
B. Multimaster replication
\- transaction based
- row-level or procedural
- asynchronous or synchronous
- DML and DDL replication
- database 7 / 8.0 / 8i / 9i / 10g
- Enterprise Edition only
Variants:
1. row-level asynchronous replication
2. row-level synchronous replication
3. procedural asynchronous replication
4. procedural synchronous replication
C. Streams replication
(Standard Edition 10g can execute Apply process)
\- (redo) log based
- row-level
- asynchronous
- DML and DDL replication
- database 9i / 10g (10g has Down Streams Capture) -
Importing materialized views from database into physical layer
Hi,
I have created materialized view in the database. When I try to import the materialized view into the physical layer in OBIEE 10G (using the import from database option), it is not showing in the list of available object. I have selected all the object types (tables,views etc.). Can you please let me know how to import the existing MVs in the database into the physical layer.
Regards
Vinodh.
Edited by: user493441 on Jul 7, 2012 4:11 PMHi Vinod,
Refer the below links.
Materialized Views in OBIEE
http://gerardnico.com/wiki/database/oracle/materialized_view
Concept of materialized views in creating datawarehouse?????
Hope this help's
Thanks
Satya -
Creating a Materialized View from different agregate queries
I want to create a materialized view. The problem is that doing so can get sticky. The view should have one row, with each column representing the return of an aggregate function on the base table. Here is a query that returns this kind of result:
select
(select count(rowid) from pasta) "PASTA_ROWS",
(select count(salt) from pasta where salt='F') "SALT_IS_FEMALE_ROWS"
from dual;
You can see that by selecting the subqueries from dual, I get the return to be in seperate columns. The problem is that when I try creating a Materialized view, I get an error.
ERROR at line 8:
ORA-22818: subquery expressions not allowed here
So, is there a simple SQL query that will return the values I am asking for, in seperate columns, but will not make the materialized view produce an error?
Thanks,
Edward
For your reference, here is a describe of the pasta table:
SQL> desc pasta
Name Null? Type
CHEESE NUMBER(4)
TOMATO VARCHAR2(20)
SALT VARCHAR2(1)
OREGANO VARCHAR2(20)
OLIVE_OIL VARCHAR2(40)Edward:
Something like this should work:
SELECT COUNT(*) PASTA_ROWS,
SUM(DECODE(salt,'F',1,0)) SALT_IS_FEMALE_ROWS
FROM pastaTTFN
John -
Query against materialized view from stored procedure brings back empty row
I have a stored procedure that runs a query against a materialized view. When I run the query outside the SP it works just fine. When I change the MV to a table name, the SP works. When I change it back to the MV i get an empty row. Any ideas? The code is below:
PROCEDURE getAuth (p_naid IN NUMBER,
p_scope IN VARCHAR2,
o_xml_data OUT SYS_REFCURSOR
) IS
BEGIN
IF p_scope = 'Approved' THEN
OPEN o_xml_data FOR
SELECT naid,
p_naid,
auth_type,
xml_data
FROM some_mv
WHERE naid = p_naid;
RETURN;
CLOSE o_xml_data;
... the rest of the procedure ...does procedure contain EXCEPTION handler?
if so, then remove, delete & eliminate EXCEPTION handler (at least during testing & debugging) -
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 -
Materialized view from prebuilt table doesn't work with spatial types?
Hello, I'm trying to build a materialized view of a table using the prebuilt option and a pre-built table.
Oracle gives me an ORA-32304 error, saying it can't do this with user-defined types. The original table has no user-defined types, but does use an sdo_geometry column. Is this what it's complaining about?
Now I can sort of understand this, but here's my real problem: the materialized view I'm creating is comprised of a subset of the columns from the original table, but not the geometry column. Is Oracle right in refusing my prebuilt request? Does anyone know of a way around this (besides creating the MV from scratch without prebuilt).
I've successfully created an MV on another table, which doesn't have a spatial column, using the prebuilt option and a subset of columns.
(I'm using Oracle 11.2.0.2.0 on both master and slave databases)Good news, everyone! =)
SAPwebIDE team fixed this issue with MMD template in SAPwebIDE v1.10.2. available on http://hanatrial.ondemand.com.
This "Bug" or "Feature" was presented in 1.8.x and 1.9.x SAPwebIDE (i've used local installation) and now it's gone in v1.10.2. Thank you, SAPwebIDE Team! =)
The difference between versions of MMD template is only in one file (fixed one is on the right):
Master2.controller.js
And here it is:
Now, only one question remains: HOWTO:SAPUI5 Fiori-like report. (mix control's value as key into binding context)
Best regards, ilia. -
ORA-12015: cannot create a fast refresh materialized view from a complex qu
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionI'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh?
CREATE TABLE "DAS_DESC"."AUTHORITY_TEST"
"NAID" NUMBER(20,0) NOT NULL ENABLE,
"AUTH_TYPE" VARCHAR2(40 BYTE),
"XML_DATA" "SYS"."XMLTYPE" ,
"TERM_NAME" VARCHAR2(4000 BYTE)
CREATE TABLE "DAS_DESC"."AUTH_ASSC_TEST"
"NAID" NUMBER(20,0),
"P_NAID" NUMBER(20,0),
"REL_TYPE" VARCHAR2(25 BYTE),
"XML_DATA" "SYS"."XMLTYPE"
CREATE
MATERIALIZED VIEW person_mv
AS
SELECT p.naid
, p.auth_type
, INSERTCHILDXML
p.xml_data -- Parent XML Column
, '//*[contains(local-name(), ''person'')]' --XPATH to Person
, 'nonPreferredHeadingArray' -- Value for new child element
( -- Sub query for injecting new variant person array
SELECT XMLELEMENT
"nonPreferredHeadingArray"
, XMLAGG -- Aggregator for Variant Persons Array
XMLELEMENT
"variantPersonName" -- Wrapper for each entry in array
, extract(a.xml_data,'*/*')
FROM auth_assc_table -- Link table
WHERE a.p_naid = p.naid
) AS XML_DATA
FROM authority p -- Parent table
WHERE p.auth_type = 'Person';The views are created fine and they work perfectly for what we need. The problem is the refresh when we edit the base tables. Ideally, it should take a couple seconds. Right now, it takes a couple minutes. XMLTYPE is one problem and the Complex Query exception is the other. If there is a work-around for fast refresh, please let me know. Greatly appreciated.jjmdb wrote:
I'm trying to create a fast refresh materialized view that uses a column of xmltype. The problem is I cannot create an MV log that accounts for the xmltype column. I tried excluding it and got the above error. Is there another way I can incrementally update a materialized view where I don't have to do a COMPLETE refresh or use FAST refresh? Besides XMLTYPE column, your MV definition has a subquery which prevents it from being fast refreshable.
I could not find any specific reference in documentation about restriction on XMLTYPE (or CLOB) columns but it seems logical that oracle will not be able to keep track of changes to binary data. What does DBMS_MVIEW.EXPLAIN_MVIEW generate for your MV definition? That should tell you which all conditions (for FAST REFRESH) your MV violates. Since you can not create a MV LOG to include XMLTYPE column, it will not be possible to create a FAST REFRESHABLE MV that includes the XMLTYPE column.
I am afraid there is not much you can do here unless you are prepared to change the way data is stored in your base tables. If you can store data in base tables using standard data types instead of binary/XML storage, you might be able to create a FAST REFRESHABLE MV. -
Need to refresh materialized view from procedure and pl/sql block
Hi,
I need to refresh materialized view (complete refresh)from procedure and pl/sql block .can some one help.
MV name:MV_DGN_TEST_SESSION
Thanks,
Rajasekhardbms_mview.REFRESH ('MV_DGN_TEST_SESSION', 'C');Regards,
Mahesh Kaila
Edited by: user4211491 on Dec 1, 2009 10:41 PM
Maybe you are looking for
-
Satatus of Data in Bex Analyzer
Hello , is it possible to hide "status of data" in bex analyzer ? I have read some documents but all are say it is only possible with Web Designer. I have a query from a Multiprovider and I don't wnt to show Status of data information in the report
-
What's the maximum memory ram for Macbook Pro?
Hello, May I know what's the maximum memory ram capacity for Macbook Pro? I am having Macbook Pro - 2.53GHz Intel Core 2 Duo Thank you! Alvin
-
Error in conection ClientNT and DB Linux 805
Im installing two servers with Database. One with WindowsNT Server with Oracle 8.0.5 and other Linux RH5.2 with Oracle 8.0.5. After configuration of tnslistener I connect perfectly with users in OraLnx and OraNT. My clients are Windows95. I try conne
-
Webcenter Content URL is NOT WORKING
Hi All, I'm new to Oracle Webcenter and installed webcenter content 11.1.1.8 in my system(Windows 7).After running Admin and managed server(UCM_server1), getting the following error while i'm going to connect http://localhost:16200/cs Error 404--Not
-
Datatags, Error Handling, Formatting
I've build JSP Pages on BC4J components using Datatags. I was wondering when applying DML changes how can i get write my own error code? Do I have the posibility to get the state of the attribute out of the datatags? Can i ask if the attribute is man