Bug: Cannot create materialized view log on XE 11 G
HelloI connect as try and HR user create materialized view log
CREATE MATERIALIZED VIEW LOG ON HR.EMPLOYEES;
I get the error>
Error from the 1 in the command line:
CREATE LOG VIEW MATERIALIZED ON HUMAN RESOURCES. EMPLOYEES
Error in the command line: 1 column: 0
Error report:
SQL error: ORA-00439: feature not enabled not: Advanced replication
00439 00000 - "function not enabled: %s."
* Cause: The specified feature is not enabled.
* Action: Try not to use this feature.
>
You can create a materialized view log on 10G XE with no problems.
Kind regards
Jari
http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0
Is this a bug in 11g or 10g?
It was reported earlier in the beta forum now archived. {: identifier of the thread = 2214092}
The current doc lists the MV sites only (and 'No' to the function of replication advanced):
http://download.Oracle.com/docs/CD/E17781_01/license.112/e18068/TOC.htm#BABDFDAI
Tags: Database
Similar Questions
-
create materialized view log on the table without a primary key
Hi all
I don't want to refresh the mview when validation is performed on the base table.CREATE TABLE client_months ( SUBJ_CODE NUMBER(4), SERV_CODE NUMBER(4), DEBIT_CODE NUMBER(4), PERIOD_NUM NUMBER(2), PERIOD_NAME VARCHAR2(40 CHAR), FIRST_MON_DAY DATE, LAST_MON_DAY DATE, VALUE_MON_DAY DATE, MONTHES NUMBER(4,2), GARDENING_WEIGHT NUMBER(5,4), REASON_CODE NUMBER(5), STAMP_ACTION VARCHAR2(1 CHAR), STAMP_CDATE DATE DEFAULT SYSDATE, STAMP_DATE DATE, STAMP_USER VARCHAR2(15 CHAR), REGION_CODE NUMBER(9) ) table created. CREATE UNIQUE INDEX client_months_UK ON client_months (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE) index created. CREATE MATERIALIZED VIEW LOG ON client_months with rowid; CREATE MATERIALIZED VIEW client_months_mv BUILD immediate REFRESH FAST ON COMMIT AS SELECT * FROM client_months; ORA-12014: table 'CLIENT_MONTHS' does not contain a primary key constraint
And I don't want to change the base table by adding a primary key.
is it possible to create the mview journal using the unique index? or another solution?
Please help
Thanks in advance
NaamaNaamas wrote:
No,
I already read this post!Then you read wrong:
SQL> CREATE TABLE client_months 2 ( 3 SUBJ_CODE NUMBER(4), 4 SERV_CODE NUMBER(4), 5 DEBIT_CODE NUMBER(4), 6 PERIOD_NUM NUMBER(2), 7 PERIOD_NAME VARCHAR2(40 CHAR), 8 FIRST_MON_DAY DATE, 9 LAST_MON_DAY DATE, 10 VALUE_MON_DAY DATE, 11 MONTHES NUMBER(4,2), 12 GARDENING_WEIGHT NUMBER(5,4), 13 REASON_CODE NUMBER(5), 14 STAMP_ACTION VARCHAR2(1 CHAR), 15 STAMP_CDATE DATE DEFAULT SYSDATE, 16 STAMP_DATE DATE, 17 STAMP_USER VARCHAR2(15 CHAR), 18 REGION_CODE NUMBER(9) 19 ) 20 / Table created. SQL> CREATE UNIQUE INDEX client_months_UK ON client_months 2 (SUBJ_CODE, SERV_CODE, DEBIT_CODE, PERIOD_NUM, REGION_CODE) 3 / Index created. SQL> CREATE MATERIALIZED VIEW LOG ON client_months with rowid 2 / Materialized view log created. SQL> CREATE MATERIALIZED VIEW client_months_mv 2 BUILD immediate 3 REFRESH FAST WITH ROWID ON COMMIT -- pay attention to WITH ROWID 4 AS 5 SELECT * FROM client_months 6 / Materialized view created. SQL>
SY.
-
Cannot create Materialized View using the PL/SQL procedure
Hello
I have a question related to the creation of materialized view.
I have a stored procedure that creates the materialized view. When you try to perform this procedure, I get not enough privileges error: ORA-01031.
When I run the content of this procedure as a PL/SQL block anonymous their materialized view is created without any complications.
Can you please advice me on this subject?
It is even possible to create a materialized view in the stored procedure as I found no info on this subject.
Thank you
PetrHi chudapet,
Whenever you make in procedure, you must have direct subsidies and not through a role.
Most likely the grant to create a materialized view is available via a role to your username.
Assign a direct grant to the user:grant create materialized view to scott; {code}
-
Generate the ddl to create materialized view log...
Hi gurus...
Oracle db: 11g
I am trying to generate / excerpt from script MVIEW Logs from prod to be applied on the test.
I tried
< code >
DBMS_METADATA. GET_DDL (decode(object_type,'materialized_view_log'), object_name, owner)
from dba_objects
where owner = < ABC >;
< code >
above fails, any ideas?
Thank you>
Oracle db: 11gI am trying to generate / excerpt from script MVIEW Logs from prod to be applied on the test.
I tried
dbms_metadata.get_ddl(decode(object_type,'materialized_view_log'), object_name, owner)
from dba_objects
where owner=;
above fails, any ideas?
>
Please try to use the tags in code, but you need to add.on the line before and the line after your code instead of what you are using. The object type names are case-sensitive so you need to use
DBMS_METADATA. GET_DDL ('MATERIALIZED_VIEW_LOG', object_name, owner)
Why are you using DECODE?
-
MATERIALIZED View Log Index Tablespace
Is anyone aware of the syntax or a framework to be able to specify the index of a materialized view of the journal storage space?
We chunk our objects by tablespace - index, tables, CLOB.
Creating a materialized view log and specifying the storage space in which it should be created created the mv log in the correct location, but the index that is created uses the default tablespace for the user.
And Yes, I Googled it. LMGTFY
create materialized view log on MY_TEST tablespace my_tablespace ;
select table_name, tablespace_name from user_tables where table_name like 'MLOG%';
TABLE-NAME TABLESPACE_NAME MLOG$ _MY_TEST MY_TABLESPACE select table_name, index_name, tablespace_name from user_indexes where table_name like 'MLOG%';
TABLE-NAME INDEX_NAME TABLESPACE_NAME MLOG$ _MY_TEST I_MLOG$ _MY_TEST USERS I found these documents:
Index on MLOG$ (materialized view Log): difference in behavior between 11.2.0.3 and 11.2.0.4 (Doc ID 1959657.1)
Materialized View Log (Mlog$) Index not created in its default Tablespace (Doc ID 1959658.1)
I guess you are running 11.2.0.4, right?
In previous versions, no index has been created automatically for the journal of MV.
Kind regards
Bashar
-
Create Materialized view and Materialized view log.
I wanted to create a materialized view with option "REFRESH QUICKLY YOU COMMIT".
(1) table 1 - it is partitioned range + list - added primary key
(2) View1 - having primary keys on the base table of view
Steps to follow:
(1) create the materialized on Table1; view journal -primary key by default
(2) create the materialized on view1 view log. -It gives below error.
ORA-00942: table or view does not exist
I wanted to create Materialized view as below
create a materialized view
Quickly REFRESH ON validation
as
Select...
........
... from table1
where c1 (select c1 from View1 which...);
Question:
(1) because I am getting above error when creating journal of MV on the view. Can one create log view MV or we create a MV newspaper on the base table of view?
(2) to create the MV with "REFRESH QUICKLY YOU COMMIT' option, we need to have the primary key on the main tables?
Pointers on this will be really useful.
Thank you
Prasad
"When a materialized view is maintained by the
ON
COMMIT
method, the time required to perform the validation can be slightly longer than usual." This is because the refresh operation is performed as part of the validation process. This is why this method may not be suitable if many users at the same time change the tables on which is based the materialized view. »See: basis of materialized views (refreshment options) for all the other options and how they work.
-
Overhead of triggers VS materialized view log files
If I need to log UPDTEs, insertions and deletions on a table - is there a difference in charge through newspapers vs MV triggers?
Thank youYou said that MV newspaper is slightly more effective than a trigger. I'm curious to know why. How they work differently under the hood?
If the essence of the debate is only why MV newspaper is more effective than the trigger that I think that Justin has stressed that is below good technical points
1. you don't have to order at the PL/SQL engine.
2. you also write the binary data that you will put in the newspapers of recovery instead of column-level data.
And below the text in the documentation:Trigger internal for the materialized view log
When changes are made to the master table or master materialized with DML view, an internal trigger records information about the affected rows in the materialized view log. This information includes the values of the primary key, rowid, or id of the object or both, as well as the values for the other columns in the materialized view log. It is an intern AFTER trigger LINE that runs automatically when you create a journal of materialized to view table main target or master materialized view. It inserts a line in the materialized view log, whenever an INSERT, UPDATE, or DELETE statement modifies data in the table. This trigger is always the last to fire.
http://docs.Oracle.com/CD/B28359_01/server.111/b28326/repmview.htm#i30732
3 trigger, i.e. we are coding for the track changes, newspaper MV i.e. tool/technology, which is provided by Oracle itself; So certainly "we are not that much able to write code that is equal to or better than the Oracle itself right?
Feature of MV's trigger INSTEAD of, but under the hood, with close to internal components of Oracle.
Concerning
Girish Sharma -
ORA-12096: error in materialized view log
Hi all
I had created a display of fast refresh materialized. Log was also created.
Now, I dropped the mv and newspapers.
But now, every time I update or insert into the customer table I receive the error message.
ORA-12096: error in materialized view log on the client
ORA-00942: table or view does not exist
There are entries in the DBA_MVIEW_LOGS for the customer table.
Please suggest.Hello
Which version of the database, you are on?
And you have access to the Oracle Metalink/My Support?Found this, by the way:
ORA-12096: error in materialized view log
If problems occur when you try to access a log of a materialized view, the system issues an error ORA-12096 which is followed by the actual error. If the error ORA-12096 is accompanied by a message ORA-00942, the problem may be due to a reorganization in line which was only partially cancelled. In this case, you can remove the log file for manually materialized view (after checking that it is no longer necessary):
DROP NEWSPAPER MATERIALIZED VIEWS
;
Published by: hoek on July 29, 2009 14:15
-
The materialized view log and user...
Hello
Suppose a user, we will call him A has a table and another user B must create a log of materialized view on the table that a user has.
While user B have all the privileges of object (direct priv insert, update, delete... not through a role) on the table to the user may not create a log of mv on this table on its schema...
Thus, the insert/update/delete stmts on < table_name > are run successfully (after having logged on as user B).
The error message ' ORA-00942: table or view does not exist ' appears when I run the command:
Connect B/B;
create log view materialized on table_name with sequence including new values;
Note: I use ORADB 10.2.0.4 and it stands for table-name to user B (which tries to create the log of mv on)...
The req. above is possible somehow?
Thank you
SIMThe documentation says the following:
The materialized view log is created in the same schema as the master of the target.
HTH!
-
effect of pump or etl data on the materialized view logs
Hi, we are mobile/upgrading an instance of 10g to 12 c, where one materialized view logs and expect to do one of the following:
(1) extract/import the meta, only using data pump data and move data using an etl tool
(2) comprehensive database extract/import using the data pump in
are there questions that we must be aware of when the displacement of these with either scenario materialized view logs?
Thanks for any information you can provide.
> are there questions that we should be aware of when the displacement of these materialized view logs with either scenario?
No problem
-
'Invalid metadata objects' when creating materialized views
Hi experts,
I ran into some trouble. I had an analytic workspace that has grown too quickly (see 11.2.0.2 size AW grows regularly with each generation of cube so I deleted and created a new.)
He seemed to do very well with the tip David Greenfield, gave us in the mentioned forum post, but when I try to activate materialized views (that I had activated in the previous workspace) I am gettig the following error:
-----
Your metadata changes have been saved, with the following errors
Invalid metadata objects:
Invalid object "TABLESPACE. LECTURAS': 'CREATE A MATERIALIZED VIEW 'TABLESPACE' '. "CB$ LECTURAS.
ORGANIZATION OF CUBE ON THE TABLESPACE. () TABLESPACE_AW
MADE "LECTURAS_STORED"("LECTURAS_MEASURE_DIM" "LECTURA") IS "LECTURA"
DIMENSION "TIEMPO" IS "TIEMPO", WITH THE HELP OF "TIEMPO_TIEMPO_HOUR_ID_UNIQUE_KEY."
DIMENSION 'GEOGRAPHY' IS 'GEOGRAPHY' WITH THE HELP OF 'GEOGRAFIA_GEOGRAFIA_CONTADOR_ID_UNIQUE_KEY')
POSTPONED BUILD
UPDATE ON REQUEST
FORCE
WITH THE HELP OF CONSTRAINTS OF TRUST
AS
(
SELECT
TO_CHAR (T1." FEC_LECTURA', "dd/mm/yyyy hh24:mi:ss") "TIEMPO"
T1. "" COD_METERID ""GEOGRAPHY. "
SUM (T1." VAL_AI_HOR') "LECTURA".
Of
TABLESPACE. "' LECTURA_HORARIA_FINAL ' T1
GROUP BY
(TO_CHAR (T1." (FEC_LECTURA"," hh24:mi:ss dd/mm/yyyy '), T1. ("' COD_METERID")
)
ORA-00942: table or view does not exist
"
-----
This same script running in SQLDeveloper gives the same error in line 17, which is the FROM clause. BUT I can run the select by itself and returns the expected result. If the table exists in the correct storage space.
I must be missing something big...
Thanks in advance.
Joan
P.S.: In the above code I use 'SPACE' to replace the real name from username and a tablespace (which is the same) for reasons of confidentiality.When you run the select statement, you connect to the same user you are trying to activate the VM?
You can create a standard (No cube) MV with the same select statement? (Connected to the same user that you used in AWM).
"CREATE MATERIALIZED VIEW "TABLESPACE"."MV_TEST" BUILD DEFERRED REFRESH ON DEMAND FORCE USING TRUSTED CONSTRAINTS AS ( SELECT TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') "TIEMPO", T1."COD_METERID" "GEOGRAFIA", SUM(T1."VAL_AI_HOR") "LECTURA" FROM TABLESPACE."LECTURA_HORARIA_FINAL" T1 GROUP BY (TO_CHAR(T1."FEC_LECTURA", 'dd/mm/yyyy hh24:mi:ss') , T1."COD_METERID") ) {code}
-
Create Materialized View ORA-01723: columns of length zero are not allowed
I am trying to create a materialized view that derives from a column of a function and I get: ORA-01723: columns null are not allowed.
I use 10 gr 2 with the following definition (simple version):
CREATE MATERIALIZED VIEW ACES
SELECT
function_name (column_name) alias_de_colonne
FROM table_name;
I even tried to cast it as below:
CREATE MATERIALIZED VIEW ACES
SELECT
Cast (function_name (column_name) AS VARCHAR2 (200)) alias_de_colonne
FROM table_name;
My function has an exception to return a value, even if no value are.
I looked everywhere for the solution. Someone at - there a way around this problem? I really need my function to calculate the column because it has business rules that I can't join in my definition of the materialized view. My only hope around this is to insert values into a table and then create a materialized table view, I don't want to do that if someone has a solution around this.
Any help would be greatly appreciated.
Thank you
Kyle
Published by: Kyle Miller on April 19, 2011 08:28Have you tried to create a table with the correct structure and then by creating the view materialized, based on the predefined table as described here...
http://www.oaktable.NET/content/ultra-fast-MV-alteration-using-prebuilt-table-option
?
See you soon
Ben
-
With as subquery block in create MATERIALIZED view or bulk pl/sql
Hi all
Can I use the with as subquery block in create MATERIALIZED view?
or in pl/sql
-Thank you
Published by: xwo0owx on March 31, 2011 11:23
Published by: xwo0owx on March 31, 2011 11:23Have you tried to test it? :)
SQL > SELECT * FROM V$VERSION; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for 32-bit Windows: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production SQL > CREATE VIEW TEST_VIEW 2 AS 3 WITH d AS 4 ( 5 SELECT * FROM DUAL 6 ) 7 SELECT * 8 FROM d 9 ; View created. SQL > SELECT * FROM test_view; D - X SQL > DECLARE 2 x DUAL.DUMMY%TYPE; 3 BEGIN 4 WITH d AS 5 ( 6 SELECT * FROM DUAL 7 ) 8 SELECT dummy 9 INTO x 10 FROM d 11 ; 12 13 DBMS_OUTPUT.PUT_LINE(x); 14 END; 15 / X PL/SQL procedure successfully completed.
-
Hello
I found that when oracle executes the create materialized view statement it must be longer than the duration of execution of the actual query.
I do an IMMEDIATE CONSTRUCTION.
Is there a reason for this?
For example. the query in the create statement took 25 minutes and did not create the MV for 2 hours.
The following query, which took 10 seconds was not created during more than 11 minutes and is still ongoing.
So I want to know what the reason is behind this? pls share if you know... Thank you.
PS:
I have advice in the select query. Oracle uses it advice during the creation of MV too or is this the reason why it's taking the time to build the MV?
any suggestion is appreciated. thnks!
Published by: user254668 on January 11, 2011 08:08How do measure you queries?
http://jonathanlewis.WordPress.com/2010/08/29/fair-comparison/
Re: Question Performace and Order by
Re: receiving ORA-01722 invalid number mistake while creating a materialized view
Re: long term with ORDER by clause
Re: Improve the performance of the query with the order of -
Create table works, create materialized view only - long column names?
Hello.
I have no probs creating a table as well: -.
CREATE TABLE blah
(
DEVICE_ID
)
in select
"Device_ID" AS DEVICE_ID
"of"sum" Device"@ed_link_3
where "Device_ID" < 5;
But when I try to create a materialized view:
Blah1 CREATE MATERIALIZED VIEW
(
DEVICE_ID
)
< various materialized view parms >
in select
"Device_ID" AS DEVICE_ID
"of"sum" Device"@ed_link_3
where "Device_ID" < 5;
It fails with errors: -.
ORA-04052: error occurred when searching to the top of the remote object Aggregate.Device@ED_LINK_3
ORA-01948: length of the name of the identifier (31) exceeds maximum (30)
Is there a way to get around this?
Is the problem with the columns of the remote table of device, which I do NOT need to import to have column names that are longer than 30 characters?
For now, I want only the Device_ID column which is a simple 9 characters long.
Oh, and the remote database is MySQL.
I'm uncomfortable with the < parms of materialized view > as they work fine when I choose a different remote table with only short column names.
Thank you.To my knowledge, you have the option
(a) create view (with shortened column names or only with desired columns if they are already less than 30 char limit) side of mysql
(b) use dbms_passthrough to force the analysis to be done on mysql (as in the example provided by SY here use dbms_passthrough to create a view )
However, I prefer to stick to one), because with dbms_passtrhough, you retrieve row by row.Best regards
Maxim
Maybe you are looking for
-
Tree with mulitple columns control
How do you retrieve data from multiple columns? I can only recover data from the first column in the tree. THX
-
Watch icon battery connected and charge, if I remove AC adapter computer stops. remove card ACPI for recharging and reinstalled watch icon full battery abuot 4 cycles and then stop, the battery icon indicates always plugged and charge, replaced batte
-
Hi all After reformat C drive and reinstall win7, internet and the wireless problem face with about a week after the activation has been require and can not activate on my laptop. I was bought the DVD version of win7 licensed of the Thailand. Before
-
The differences Multisite and Multiway conference
Hi all Can you tell me what are the multi-site and multiway conferences? Also, what are the differences between these conferences?
-
Reg: Resolve the dependencies of employment-
Hi Experts,Need an idea about this scenario-Every day, I have scheduled tasks, at 3:30, and another expected at 06:00. For simplicity, we called first job as 'X' and 'Y '.Ideally X gets completed prior to the start of it, and all is well. But, the da