Create materialized view with ora-12054 error
Oracle 10g R2 on AIX 5.3L
I create a script (with help of EM) for a materilaized view
CREATE MATERIALIZED VIEW "BAANDB"."R2_MV"
TABLESPACE "USERS" NOLOGGING STORAGE ( INITIAL 128K) USING INDEX TABLESPACE "BAANIDX" STORAGE ( INITIAL 256K)
REFRESH FORCE ON COMMIT
ENABLE QUERY REWRITE AS
SELECT CM.ROWID c_rid, PC.ROWID p_rid, CM."T$CWOC", "T$EMNO", CM."T$NAMA", CM."T$EDTE", PC."T$PERI", PC."T$QUAN", PC."T$YEAR", PC."T$RGDT" From BAANDB.TTPPPC235201 PC RIGHT OUTER JOIN BAANDB.TTCCOM001201 CM Using (T$EMNO)
but I got error
ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
acooding to the oerr
// *Cause: The materialized view did not satisfy conditions for refresh at
// commit time.
// *Action: Specify only valid options.
what dose it mean? both my master tables are not IOT and are locale ones. It seems that only changing to ON DEMAND works. If I use the "REFRESH FORCE START ..NEXT", it also failed.
I have created the materalized view logs with rowid on each master table. I think my script met every prequirement of ON COMMIT.
table owner has "on commit refresh" privilege
After googling on line, someone mentioned that for "ON COMMIT" on join tables, we have to use th old OUTER JOINT syntax (+) on WHERE. The new "outer joint" in FROM clause won't work.
I tested it, it seemed to be true.
Similar Messages
-
Create materialized view get ora-00998 error cause by subquery
hi all,
my create statement as follow,
create materialized view MV_DM_DIM_DEALER01
Build deferred
Refresh complete
ON DEMAND
Enable query rewrite
as
select a.dealer_no,a.sk_period from DM_DIM_DEALER a
where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
ORA-00998: must name this expression with a column alias
so what's the problem?
thx all>
my create statement as follow,
create materialized view MV_DM_DIM_DEALER01
Build deferred
Refresh complete
ON DEMAND
Enable query rewrite
as
select a.dealer_no,a.sk_period from DM_DIM_DEALER a
where A.SK_PERIOD=201210 and a.dealer_no in (select dealer_No from dm00_fav_dealer)
ORA-00998: must name this expression with a column alias
so what's the problem?
>
Well since the error is 'ORA-00998: must name this expression with a column alias' you might try naming your expressions with aliases
select a.dealer_no dealer_no,a.sk_period sk_period from DM_DIM_DEALER a -
Creating Materialized View with the Distinct key word
Hi
I need help to create Materialized View with the Distinct key word.
my query is
select distinct col1, col2 from t1;
is there any alternate of DISTINCT because I can not refresh the MV as fast on demand if I am using it and Fast on Demand is a must for me.hi
check out this link
http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10736/basicmv.htm#i1007299
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref183
hope this helps
CHeers -
Error Creating Materialized View With a Job
Oracle 9ir2
I've created a job like this in a java class:
...Java Code ...
cs = conn.prepareCall ("DECLARE v_job NUMBER; BEGIN DBMS_JOB.SUBMIT(v_job,'begin CTH_REGENERA_VM; end;', TRUNC(SYSDATE+1) + (3/24)); END;");
...Java Code ...
The Procedure called in the Job:
CREATE OR REPLACE PROCEDURE CTH_REGENERA_VM
AUTHID CURRENT_USER IS
existe NUMBER(1);
cur BINARY_INTEGER := DBMS_SQL.OPEN_CURSOR;
fdbk BINARY_INTEGER;
BEGIN
SELECT count(*) INTO existe FROM user_mviews WHERE mview_name = 'CTH_PRESENTA_A_VM';
IF existe > 0 THEN
DBMS_SQL.PARSE(cur, 'DROP MATERIALIZED VIEW CTH_PRESENTA_A_VM', DBMS_SQL.NATIVE);
fdbk := DBMS_SQL.EXECUTE(cur);
INSERT INTO CTH_HISTORIAL VALUES('ELIMINADA VM CTH_PRESENTA_A_VM', SYSDATE);
COMMIT;
END IF;
DBMS_SQL.PARSE(cur, 'CREATE MATERIALIZED VIEW CTH_PRESENTA_A_VM
TABLESPACE DAT1_CTH
STORAGE(INITIAL 16M NEXT 8M MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0)
XMLTYPE XML STORE AS CLOB ( TABLESPACE DAT1_CTH
STORAGE(INITIAL 16M NEXT 8M MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0))
AS select FICHA, XML,
extractvalue(xml, ''/FICHE/Encab_de_nombre_geogr�fico_a'') as MUNICIPIO,
extractvalue(xml, ''/FICHE/Encab_de_nombre_geogr�fico_c'') as CALIFICACION,
extractvalue(xml, ''/FICHE/Encab_de_nombre_geogr�fico_b'') as PROVINCIA,
extractvalue(xml, ''/FICHE/Encab_tem�tico_de_materia_a[1]'') as MATERIA,
extractvalue(xml, ''/FICHE/Fecha_cronol�gica_b[1]'') as FECHA,
extractvalue(xml, ''/FICHE/Datos_matem�ticos_a[1]'') as ESCALA
from cth_xmltable', DBMS_SQL.NATIVE);
INSERT INTO CTH_HISTORIAL VALUES('ASIGNO EL PARSE DE MATERIALIZED', SYSDATE);
fdbk := DBMS_SQL.EXECUTE(cur);
INSERT INTO CTH_HISTORIAL VALUES('EJECUTO EL PARSE DE MATERIALIZED', SYSDATE);
INSERT INTO CTH_HISTORIAL VALUES('CREADA VM CTH_PRESENTA_A_VM', SYSDATE);
DBMS_SQL.PARSE(cur, 'CREATE INDEX CTH_INDEX1
ON CTH_PRESENTA_A_VM(XML)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS (''storage cth section group ctxsys.auto_section_group'')', DBMS_SQL.NATIVE);
fdbk := DBMS_SQL.EXECUTE(cur);
INSERT INTO CTH_HISTORIAL VALUES('CREADO INDICE ORACLE TEXT CTH_INDEX1', SYSDATE);
DBMS_SQL.PARSE(cur, 'CREATE INDEX CTH_IDX_MUNICIPIO3
ON CTH_PRESENTA_A_VM(UPPER(MUNICIPIO))
TABLESPACE IDX1_CTH
STORAGE (INITIAL 1M NEXT 512K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0)', DBMS_SQL.NATIVE);
fdbk := DBMS_SQL.EXECUTE(cur);
INSERT INTO CTH_HISTORIAL VALUES('CREADO INDICE CTH_IDX_MUNICIPIO2', SYSDATE);
DBMS_SQL.PARSE(cur, 'CREATE INDEX CTH_IDX_FICHA2
ON CTH_PRESENTA_A_VM
(FICHA)
TABLESPACE IDX1_CTH
STORAGE(INITIAL 1M NEXT 512K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0)', DBMS_SQL.NATIVE);
fdbk := DBMS_SQL.EXECUTE(cur);
INSERT INTO CTH_HISTORIAL VALUES('CREADO INDICE CTH_IDX_FICHA2', SYSDATE);
DBMS_SQL.CLOSE_CURSOR(cur);
COMMIT;
END;
I got always an error in the created materialized view. If I call the procedure with SQL Plus, it run ok. The user
has CTXAPP, DBA roles, so I supouse it is not a privileges problem. I also tried to create a simple materialized view or a table, and always got an error ora-12011
Thanks in advance.If I call the procedure with SQL Plus, it run ok. Are you using the same user to run it in SQL*Plus as runs it from Java.
The normal reason for procedures to fail like this is privileges. Particularly, we cannot run procedures using privileges we have been granted through roles.
The user has CTXAPP, DBA roles, so I supouse it is not a privileges problem. Try granting the system privilege CREATE MATERIALIZED VIEW to the user and see what happens.
I drop the materialized and create again, cause it's the fastest way I've found. With a DBMS_MVIEW.REFRESH is too slow.I find that surprising as drop & create has to do all the work that a refresh has to do plus some more - maybe it's something to do with XML. Did you try adding a snapshot log and going for FAST? I don't know whwther the XML procesing would render the view complex - have you explained it?
Cheers, APC -
Create materialized view with specific column sizes
Hi all,
I'm trying to create a materialized view with a specific a column size. Something like
create materialized view test_mv
refresh force on demand
as
select id,
cast(my_compound_field as nvarchar2(50))
from ( select id,
field1 || field2 my_compound_field
from my_table);But Oracle seems to ignore the cast and takes the maximum size it finds for field1 || field2 in the select query. The resulting table has a column nvarchar2(44) instead of nvarchar2(50).
This can give a problem when the view is refreshed... there could be new data that exceeds the current size, i.e. where length(field1 || field2) > 44.
How can I override the column size of a field in a materialized view?
Edit: Some additional info to clarify my case:
field1 and field2 are defined as nvarchar2(25). field1 || field2 can theoretically have a length of 50, but there is currently no data in my table that results in that length, the max is 44. I am afraid that there will be data in the future that exceeds 44, resulting in an error when the MV is refreshed!
Edited by: Pleiadian on Jan 25, 2011 2:06 PMCannot reproduce what you are saying is happening.
SQL> create table t (a nvarchar2(50), b nvarchar2(50));
Table created.
SQL> create materialized view tmv as
2 select a, b, a || b c from t;
Materialized view created.
SQL> desc tmv
Name Null? Type
A NVARCHAR2(50)
B NVARCHAR2(50)
C NVARCHAR2(100)
SQL> drop materialized view tmv;
Materialized view dropped.
SQL> create materialized view tmv as
2 select a, b, substr(a || b, 1, 10) c from t;
Materialized view created.
SQL> desc tmv
Name Null? Type
A NVARCHAR2(50)
B NVARCHAR2(50)
C NVARCHAR2(10)
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
SQL>Edited by: 3360 on Jan 25, 2011 8:10 AM
And with data
SQL> insert into t values ('3123423423143hhshgvcdcvw', 'ydgeew gdfwe dfefde wfjjjjjjj');
1 row created.
SQL> commit;
Commit complete.
SQL> desc tmv
Name Null? Type
A NVARCHAR2(50)
B NVARCHAR2(50)
C NVARCHAR2(10)
SQL> select * from tmv;
A
B C
3123423423143hhshgvcdcvw
ydgeew gdfwe dfefde wfjjjjjjj 3123423423 -
Create Materialized View with GROUP BY
I have a table
treecluster NUMBER(3)
treenumber NUMBER(3)
treedate DATE
nestnumber NUMBER(3)
eggs NUMBER(3)
nestlings NUMBER(3)
fledglings NUMBER(3)
nestfate VARCHAR2(10)
nestfailurecode NUMBER(2)
I want to group the data by treecluster, treenumber, year, and nest number and get a max eggs, nestlings, fledglings. I am doing this with the following:
SELECT treecluster, treenumber, to_char(nestchecksdate, 'YYYY'), nestnumber,
max(eggs), max(nestlings), max(fledglings)
FROM nestchecks
GROUP BY treecluster, treenumber, to_char(nestchecksdate, 'YYYY'), nestnumber;
This works fine.
The last record for a year has a nestfate and nestfailurecode value.
I need to group all information and then also get the nestfate and nestfailurecode for the year. How do I go about getting this information?
I am really trying to create a summary materialized view based on a data table so the select I am trying to craft would be a part of a create materialized view as SELECT...
so I want to be able to group the info and add in the nestfate and failurecode in one step.
Thanks!try this:
SQL> select * from table_tree;
TREECLUSTER TREENUMBER NESTCHECK NESTNUMBER EGGS NESTLINGS FLEDGLINGS NESTFATE NESTFAILURECODE
4 167 17-MAY-00 2 0 0
4 167 24-MAY-00 2 3 0
4 167 30-MAY-00 2 3 0
4 167 12-JUN-00 2 0 1 FAILURE 2
select a.treecluster, a.treenumber, to_char(a.nestyear,'YYYY') nestyear,
a.nestnumber, a.eggs, a.nestlings, a.fledglings, a.nestfate, a.nestfailurecode
from (select max(treecluster) treecluster, max(treenumber) treenumber,
max(nestchecksdate) nestyear,
max(nestnumber) nestnumber, max(eggs) eggs, max(nestlings) nestlings,
nvl(max(FLEDGLINGS),0) FLEDGLINGS, max(NESTFATE) NESTFATE,
max(nestfailurecode) nestfailurecode
from table_tree) a
TREECLUSTER TREENUMBER NEST NESTNUMBER EGGS NESTLINGS FLEDGLINGS NESTFATE NESTFAILURECODE
4 167 2000 2 3 1 0 FAILURE 2hope this helps -
Creating materialized view with variables - help
Greetings,
I want to create an materialized view (MV) from the external public db link. Below is my full query:
CREATE MATERIALIZED VIEW PROJECTS_MV
REFRESH WITH ROWID
AS
SELECT prj.Project_id, prj.desc,
prj.parent_project_id, f_year, f_month
FROM sysadm.prj@EFUYEEDW_DB_LINK.MSDB prj
WHERE prj.pf_scenario_id = '708KDD'
AND prj.ph_id = 'SHAREDP'
AND f_year = (SELECT EXTRACT(year FROM current_DATE) FROM dual)
AND f_month = (SELECT EXTRACT(month FROM current_DATE) FROM dual)
Question: In the query there are two variables that capture the month and year and requery it. Does the data get updated automatically when a new month or new year changes?
If there is a change, how would I change so it would update the data accordingly?
Thanks for your help
john9569Hi Christian,
Thanks for your response. Your codes return the date as 01-JAN-09 which is not what I'm looking for. Maybe my question is not clear.
So far, the MV is executed correctly what I want. My concern is when it updates the MV, does it get the new data (f_month & f_year) when the MV is updated automatically?
Other words, the MV is updated nightly to get the incremental data from the db link. Once it passes to the new month, I am not sure how this MV handles since the f_month is now changed to differrent number.
Thanks for your help.
Bests,
John9569 -
How to create materialized view with parameter and index ?
Hi all,
i am using oracle 11g.
i want to create parameter materialized view with two parameter (STORED_VALUE, LOV_NAME) with an index .
i have below view
CREATE OR REPLACE FORCE VIEW SR_MY_TEST(DISPLAYED_VALUE, STORED_VALUE, LOV_NAME) AS
SELECT DISPLAYED_VALUE , LOVVALUE.STORED_VALUE , lovname.lov_name
FROM (SELECT T.LOV_VALUE_ID,
T.LOV_ID,
T.ORG_ENTITY_ID,
T.STORED_VALUE,
T.DISPLAYED_VALUE,
T.ENTERPRISE_ID
FROM MS_QS_LIST_OF_VALUES_T T) lovvalue, ms_qs_lov_names lovname
WHERE lovvalue.lov_id = lovname.lov_id
AND lovvalue.org_entity_id = 1
and LOVVALUE.ENTERPRISE_ID = 100000
AND LOVNAME.ENTERPRISE_ID = 100000;
i want to create index on STORED_VALUE, LOV_NAME
Thanks
DambyNo.AFAIK, there's nothing called as "parameterized MV".
Materialized View store data like tables (and not like Views). So, does it make sense when you say - "table with parameters" ?
Could you please explain your business requirement?
What is the purpose behind those 2 parameters? -
Creating database problem with ORA-01519: error while processing file '' ne
Dear all,
I am having rough time with creating database manually. can anyone help me with the following errors.
ALERT LOGFILE:-
Sun May 31 12:00:39 2009
Errors in file d:\oracle\product\10.1.0\admin\oracle5\udump\oracle5_ora_3444.trc:
ORA-01501: CREATE DATABASE failed
ORA-01519: error while processing file '%ORACLE_HOME%\RDBMS\ADMIN\SQL.BSQ' near line 5744
ORA-00604: error occurred at recursive SQL level 1
ORA-01119: error in creating database file 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Error 1519 happened during db open, shutting down database
USER: terminating instance due to error 1519
Sun May 31 12:00:39 2009
Errors in file d:\oracle\product\10.1.0\admin\oracle5\bdump\oracle5_reco_3416.trc:
ORA-01519: error while processing file '' near line
CREATE DATABASE SCRIPT:-
create database ORACLE5
user sys identified by bala
user system identified by bala
logfile
group 1 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo01.log') SIZE 50M,
group 2 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo02.log') SIZE 50M,
group 3 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo03.log') SIZE 50M
maxlogfiles 5
maxlogmembers 5
maxloghistory 1
maxdatafiles 50
maxinstances 1
datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5\datafile\system01.dbf' size 200m autoextend on maxsize unlimited extent management local
undo tablespace UNDOTBS1 datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf' size 10m autoextend on maxsize unlimited
sysaux datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5\datafile\sysaux01.dbf' size 100m autoextend on maxsize unlimited
default temporary tablespace temp tempfile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\temp01.dbf' size 10m autoextend on maxsize unlimited
character set US7ASCII
NATIONAL CHARACTER SET AL16UTF16
INIT.ORA FILE:-
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Archive
log_archive_format=ARC%S_%R.%T
# Cache and I/O
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=oracle5
# Diagnostics and Statistics
background_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\bdump
core_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\cdump
user_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\udump
# File Configuration
#db_create_file_dest=D:\oracle\product\10.1.0\oradata
db_recovery_file_dest=D:\oracle\product\10.1.0\flash_recovery_area
db_recovery_file_dest_size=2147483648
# Job Queues
job_queue_processes=10
# Miscellaneous
compatible=10.1.0.2.0
# Pools
java_pool_size=50331648
large_pool_size=8388608
shared_pool_size=83886080
# Processes and Sessions
processes=150
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Shared Server
dispatchers="(PROTOCOL=TCP) (SERVICE=oracle5XDB)"
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=65536
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_tablespace=UNDOTBS1
control_files=("D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORACLE5\CONTROLFILE\control01.CTL", "D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORACLE5\CONTROLFILE\control02.CTL")Hi,
undo tablespace UNDOTBS1 datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf' size 10m autoextend on maxsize unlimited
After ORACLE5 there is a space character. Typo? Create proper directory or delete this character.
Bartek -
Create Materialized View with Compress clause
Hi,
Oracle 9i R2 has an option to use compress clause while creating table, materialized view or etc. Just wanted some help on tips to be followed during creating a materilized view with compress clause and refresh the same.do i need to follow any special procedures ??? Any help greatly appreciated.
Thanks,
Chak.I read in the book that while inserting user /+append+/ otherwise table with compress will fail. I am doing materialized view refresh with fast mode and data will be inserted as per logs residing at master site.. while inserting into materialized view, do i have to setup specially since fast refresh is going to insert data into existing materialized view.
Thanks, -
Create material view with MATERIAL_MAINTAIN_DARK
Hello !
I have done a material migration program with FM MATERIAL_MAINTAIN_DARK. The program integrate the basic data, and then each view one by one.
It works fine except with material with internal number. It creats the basic data but when i use the number generated to create the other view i get this message :
No external number assignment possible for mat. type GENERIC MATERIALS
I found this field in mara_ueb : KZ_MAT_RES
But when i put X in it, it returns that i forgot mandatory data. So I tried to select the data already in MARA and MAKT, but now the message is that the material already exist ! It is true but I want to create another view.
Here's a piece of my code to help you to understand, the commentary part is what I tried to do to resolved my problem :
ADD 1 TO v_count.
ADD 1 TO v_line.
MOVE v_line TO v_line_c.
*---MARA
MOVE sy-mandt TO t_mara_ueb-mandt.
MOVE 'MM01' TO t_mara_ueb-tcode.
MOVE v_count TO t_mara_ueb-tranc.
MOVE k_purcha TO t_mara_ueb-vpsta.
SELECT COUNT(*) FROM t134 WHERE mtart = t_data_pur-mtart
AND envop = space.
IF sy-subrc = 0.
TABLES : mara, makt.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = t_data_pur-matnr
IMPORTING
OUTPUT = t_data_pur-matnr.
SELECT SINGLE * FROM mara WHERE matnr = t_data_pur-matnr.
MOVE-CORRESPONDING mara TO t_mara_ueb.
SELECT SINGLE * FROM makt WHERE matnr = t_data_pur-matnr.
MOVE-CORRESPONDING makt TO t_makt_ueb.
MOVE 'X' TO t_mara_ueb-KZ_MAT_RES.
ENDIF.
MOVE t_data_pur-matnr TO t_mara_ueb-matnr.
MOVE t_data_pur-mbrsh TO t_mara_ueb-mbrsh.
MOVE t_data_pur-mtart TO t_mara_ueb-mtart.
MOVE t_data_pur-ekwsl TO t_mara_ueb-ekwsl.
APPEND t_mara_ueb.
*---MARC
MOVE sy-mandt TO t_marc_ueb-mandt.
MOVE v_count TO t_marc_ueb-tranc.
MOVE t_data_pur-matnr TO t_marc_ueb-matnr.
MOVE t_data_pur-werks TO t_marc_ueb-werks.
MOVE t_data_pur-ekgrp TO t_marc_ueb-ekgrp.
MOVE t_data_pur-mmsta TO t_marc_ueb-mmsta.
MOVE t_data_pur-mmstd TO t_marc_ueb-mmstd.
MOVE t_data_pur-webaz TO t_marc_ueb-webaz.
MOVE t_data_pur-kordb TO t_marc_ueb-kordb.
MOVE t_data_pur-usequ TO t_marc_ueb-usequ.
APPEND t_marc_ueb.
*---!!! Call FUNCTION MODULE !!!
CALL FUNCTION 'MATERIAL_MAINTAIN_DARK'
EXPORTING
FLAG_MUSS_PRUEFEN = 'X'
SPERRMODUS = 'E'
MAX_ERRORS = 0
p_kz_no_warn = 'X'
kz_prf = space
KZ_VERW = 'X'
KZ_AEND = 'X'
KZ_DISPO = 'X'
kz_test = lv_test
NO_DATABASE_UPDATE = ' '
call_mode = ' ' "OR RMD OR space OR BAP
CALL_MODE2 = ' '
user = sy-uname
SUPPRESS_ARRAY_READ = ' '
FLG_MASS = ' '
IMPORTING
matnr_last = lv_matnr
number_errors_transaction = lv_nb_error
TABLES
amara_ueb = t_mara_ueb
amakt_ueb = t_makt_ueb
amarc_ueb = t_marc_ueb
amard_ueb = t_mard_ueb
AMFHM_UEB =
AMARM_UEB =
AMEA1_UEB =
ambew_ueb = t_mbew_ueb
asteu_ueb = t_steu_ueb
ASTMM_UEB =
amlgn_ueb = t_mlgn_ueb
amlgt_ueb = t_mlgt_ueb
AMPGD_UEB =
ampop_ueb = t_mpop_ueb
AMVEG_UEB =
AMVEU_UEB =
amvke_ueb = t_mvke_ueb
ALTX1_UEB =
AMPRW_UEB =
AMFIELDRES =
amerrdat = t_amerrdat
EXCEPTIONS
kstatus_empty = 1
tkstatus_empty = 2
t130m_error = 3
internal_error = 4
too_many_errors = 5
update_error = 6
OTHERS = 7.
I really need you help !
thank you in advance.OK I found the answer !
It is because the matnr generate add 00000... before the number. So I have to add it for the other view. But it is not the case for material number define externally. And the message was not comprensive.
*---MARA
MOVE sy-mandt TO t_mara_ueb-mandt.
MOVE 'MM01' TO t_mara_ueb-tcode.
MOVE v_count TO t_mara_ueb-tranc.
MOVE k_purcha TO t_mara_ueb-vpsta.
SELECT COUNT(*) FROM t134 WHERE mtart = t_data_pur-mtart
AND envop = space.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = t_data_pur-matnr
IMPORTING
output = t_data_pur-matnr.
ENDIF.
MOVE t_data_pur-matnr TO t_mara_ueb-matnr.
MOVE t_data_pur-mbrsh TO t_mara_ueb-mbrsh.
MOVE t_data_pur-mtart TO t_mara_ueb-mtart.
MOVE t_data_pur-ekwsl TO t_mara_ueb-ekwsl.
APPEND t_mara_ueb.
*---MARC
MOVE sy-mandt TO t_marc_ueb-mandt.
MOVE v_count TO t_marc_ueb-tranc.
MOVE t_data_pur-matnr TO t_marc_ueb-matnr.
MOVE t_data_pur-werks TO t_marc_ueb-werks.
MOVE t_data_pur-ekgrp TO t_marc_ueb-ekgrp.
MOVE t_data_pur-mmsta TO t_marc_ueb-mmsta.
MOVE t_data_pur-mmstd TO t_marc_ueb-mmstd.
MOVE t_data_pur-webaz TO t_marc_ueb-webaz.
MOVE t_data_pur-kordb TO t_marc_ueb-kordb.
MOVE t_data_pur-usequ TO t_marc_ueb-usequ.
APPEND t_marc_ueb.
Edited by: Louis-Arnaud Bouquin on Mar 5, 2008 3:04 PM -
Error on creating Materialized view.
Hi,
I don't understand why it happens...
When I tried to creating materialized view, it shows a error "ORA-01013: User requested cancel of current operation".
I don't understand why it happens. I just waited it successfully created. But I didn't press any button.
Does it matter of size of joining table? I had same issue before. At that time I just removed some tables from the joining condition, this error was gone.
But at this time, I cannot exclude any other tables the select statement
Can anyone help me this issue, please?Hi,
11g ( 11.2.0.3 ) has a problem with materialized views based on ROWID, resulting in the problem you mentioned.
A workaround is creating the MV's based on primary keyl.
There is also a patch available on MOS, to solve the problem ( thanks to a very long SR from me :-) )
It is known as bug 13657605 and the patch for it has the same number.
Remember to read the README, as this patch is only for 11.2.0.3 !!
Cheers
FJFranken -
Materialized view problem ORA-00904: "from$_subquery$_ error
Hello everyone,
I've created data warehouse star schema and I'm trying to set up materialized view. DBMS_MVIEW.EXPLAIN_MVIEW passes and also the select query passes and is executed with no problems but when I try to CREATE MATERIALIZED VIEW... then error ORA-00904: "from$_subquery$_003"."SERVICE_ID_2_2": invalid identifier pops-up. How does Oracle 9i (9.2.0.1.0) managed to do this ? How to make it to work ?
This is the query, and the schema:
CREATE MATERIALIZED VIEW analiza_profitabilnosti
BUILD IMMEDIATE
REFRESH FAST
ON COMMIT
AS
select
GROUPING_ID(t.y,t.q,t.m,t.w,t.d,s.service_type,s.service_id,c.customer_category) as g_id,
t.y, t.q, t.m, t.w, t.d,
s.service_type , s.service_id ,
c.customer_category ,
COUNT(*) as c_star,
SUM(cost) cost, COUNT(cost) c_cost,
SUM(number_of_units) number_of_units, COUNT(number_of_units) as c_number_of_units
from fact f
inner join timeline t on f.datum = t.datum
inner join service s on f.service_id = s.service_id
inner join customer_category c on f.customer_category=c.customer_category
group by
ROLLUP(t.y, t.q, t.m, t.w, t.d),
ROLLUP(s.service_type, s.service_id),
ROLLUP (c.customer_category)
and the schema:
FACT (
DATUM DATE,
HOST_ID NUMBER,
SERVICE_ID NUMBER (5),
CALLED_PREFIX_ID NUMBER (10),
CUSTOMER_CATEGORY NUMBER,
TRAFIC_PERIOD_ID NUMBER (5),
CALL_DURATION NUMBER,
COST NUMBER,
NUMBER_OF_UNITS NUMBER,
NUMBER_OF_CALLS NUMBER)
TIMELINE (
Y VARCHAR2 (5),
Q VARCHAR2 (5),
M VARCHAR2 (5),
W VARCHAR2 (5),
D VARCHAR2 (5),
DATUM DATE NOT NULL)
SERVICE (
SERVICE_ID NUMBER (5) NOT NULL,
SERVICE_CODE VARCHAR2 (15) NOT NULL,
SERVICE_NAME VARCHAR2 (63),
SERVICE_TYPE NUMBER (5),
SERVICE_TYPE_CODE VARCHAR2 (4) NOT NULL,
S_ID NUMBER (5))
CUSTOMER_CATEGORY (
CUSTOMER_CATEGORY_NAME VARCHAR2 (65) NOT NULL,
CUSTOMER_CATEGORY NUMBER NOT NULL)
Thanks,
IgorYes, thank you. I suspected that version is problem, and patch 9.2.0.6 helped. It works under 9.2.0.6
-
Error while creating Materialized Views
I tried creating Materialized views with set operator, and Oracle throws up an error message
ORA-30370: set operators are not supported in this context
The script,
CREATE MATERIALIZED VIEW ORADBA2.MV_GP_AGG_00055_MMR1
PCTFREE 0 TABLESPACE GPMTSPOC
STORAGE (INITIAL 128K NEXT 128K MAXEXTENTS UNLIMITED)
BUILD IMMEDIATE
REFRESH COMPLETE
ENABLE QUERY REWRITE
AS
SELECT * FROM tb_gp_agg_00055r1_01
WHERE srce_sys_cd = 15
UNION ALL
SELECT * FROM tb_gp_agg_00055r1_02
WHERE srce_sys_cd = 15
UNION ALL
SELECT * FROM tb_gp_agg_00055r1_03
WHERE srce_sys_cd = 15;
Will Oracle support UNION clause in Materialized Views?? Any work arounds ?? Thanks.
nullSET operators cannot be used in MATERIALIZED VIEWS.
A workaround is that you create a table AS SELECT using the SET operators and then create the materialized view from that table.
But then you'll not be able to take advantage of QUERY REWRITE AND AUTOMATIC REFRESH.
But if you would still like to have the materialized view then this will work!! -
Error creating materialized view log using DBlink
Hi guys,
I have 2 databases in diferent machines . (machine A and B)
Machine A is my production database and I have a database link in machine B accessing Machine A
CREATE MATERIALIZED VIEW vm_test
BUILD IMMEDIATE
REFRESH FAST ON commit as
select * from test@A
-- no problem in this first operation the materialized view was created sucessfully
Now I need to create the LOG
SQL> CREATE MATERIALIZED VIEW LOG ON test
2 PCTFREE 5
3 TABLESPACE prodemge_2006
4 STORAGE (INITIAL 10K NEXT 10K);
CREATE MATERIALIZED VIEW LOG ON test
ERROR at line 1:
ORA-02050: transaction 5.21.8771 rolled back, some remote DBs may be in-doubt
ORA-02068: following severe error from A
ORA-03113: end-of-file on communication channel
What could be causing this error ?
Thank you,
FelipeORA-02050 transaction string rolled back, some remote DBs may be in-doubt
Cause: Network or remote failure during a two-phase commit.
Action: Notify operations; remote databases will automatically re-sync when the failure is repaired.
ORA-02068 following severe error from stringstring
Cause: A severe error (disconnect, fatal Oracle error) was received from the indicated database link. See following error text.
Action: Contact the remote system administrator.
M.S.Taj
Maybe you are looking for
-
My external hard drive won't show up on the desktop!!
Alright! I bought a 250Go external hard disk at the same time as my alumnium iMac around september 2007. Since then I had no problems. I also created partitions on my hard disk: 1 - Mac = Mac OS extended (Journaled) 202 Go 2 - PC = MS-DOS (Fat) 30 Go
-
IN bapi- how to provide spool report with messages
in BAPI, how to provide spool report with messages?
-
I know this error message is discussed on other topics on several different forums including TechNet but I ended up opening this as the suggestions that solved the problems with the previous threads dos not work on mine. We have a ticketing software
-
Service wrapper for a web service
Hi All, How can I create a service wrapper for a web service. Thanks Gopal
-
Folio Producer: Scheduling can only be applied to private folios
Um, why is there this limitation? we have our work done, but now i need to get to my computer at midnight (i can't use any iOS device) and clik update. Why?