ora-12096 error in materialized view (2 threads merged by bb) [message #521986] |
Mon, 05 September 2011 05:45 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
Hi ,
I am facing one issue while doing some transaction on one table called "WORKFLOWITEMACTORMOVEMENT". The error which is coming
ORA-12096: error in materialized view log on "PMSMARTDB"."WORKFLOWITEMACTORDATA_TSMS"
ORA-00942: table or view does not exist
ORA-06512: at "PMSMARTDB.HCLT_WFIAD_TSMS", line 16
ORA-04088: error during execution of trigger 'PMSMARTDB.HCLT_WFIAD_TSMS'
The above error are not consistent , some time coming and some time not coming....
There is one trigger on WORKFLOWITEMACTORMOVEMENT table which script is mentioned below
create or replace trigger "HCLT_WFIADM_TSMS"
after insert or update or delete
ON workflowitemactormovement
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
vincludeintimesheet varchar2(10);
BEGIN
begin
proclog('A','WFIADM');
select et.includeintimesheet into vincludeintimesheet
from eformtemplate et
where et.templatetype=:new.itemtype and (et.ownertype,et.ownerid)in (
select ownertype,ownerid from workflowitemdata where itemtype=:new.itemtype and itemid=:new.itemid)
and rownum<2;
exception when others then
vincludeintimesheet:=null;
end;
proclog('B','WFIADM');
if inserting then
insert into workflowitemactordatam_tsms( ITEMID,
ITEMTYPE,
MOVEMENTID,
STAGEID,
ACTUALSTARTDATE,
ACTUALENDDATE,
USERID,
INCLUDETIMESHEET
) values (:new.ITEMID ,
:new.ITEMTYPE ,
:new.MOVEMENTID,
:new.STAGEID,
:new.ACTUALstartdate ,
:new.ACTUALENDDATE,
:new.USERID ,
vincludeintimesheet );
end if;
if updating then
update workflowitemactordatam_tsms
set ACTUALSTARTDATE= :new.ACTUALSTARTDATE ,
ACTUALENDDATE=:new.ACTUALENDDATE,
stageid=:new.stageid,
userid=:new.userid,
includetimesheet=vincludeintimesheet
where ITEMTYPE=:old.itemtype
and ITEMID=:old.itemid
and STAGEID=:old.stageid
and USERID=:old.userid
and MOVEMENTID=:old.movementid;
end if;
if deleting then
delete from workflowitemactordatam_tsms where
ITEMTYPE=:old.itemtype
and ITEMID=:old.itemid
and STAGEID=:old.stageid
and USERID=:old.userid
and MOVEMENTID=:old.movementid;
end if;
proclog('C','WFIADM');
END;
On weekly basis we do the online redefnition of workflowitemactordatam_tsms table whose script is mentioned below:
CREATE TABLE workflowitemactordatam_tsms_in AS SELECT * FROM workflowitemactordatam_tsms WHERE 1=2;
EXEC DBMS_REDEFINITION.START_REDEF_TABLE(USER,'workflowitemactordatam_tsms','workflowitemactordatam_tsms_in',ORDERBY_COLS=>'USERID,includetimesheet,ITEMTYPE,ITEMID');
DECLARE
V_OUT BINARY_INTEGER;
BEGIN
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS(USER,'workflowitemactordatam_tsms','workflowitemactordatam_tsms_in',1,FALSE,TRUE,FALSE,TRUE,V_OUT);
END;
/
EXEC DBMS_REDEFINITION.SYNC_INTERIM_TABLE(USER, 'workflowitemactordatam_tsms', 'workflowitemactordatam_tsms_in');
EXEC DBMS_REDEFINITION.FINISH_REDEF_TABLE(USER, 'workflowitemactordatam_tsms', 'workflowitemactordatam_tsms_in');
DROP TABLE workflowitemactordatam_tsms_in CASCADE CONSTRAINTS;
begin
dbms_stats.gather_table_stats(user,'WORKFLOWITEMACTORDATAM_TSMS',cascade => TRUE);
end;
/
Even there is no materialized view log on WORKFLOWITEMACTORDATA_TSMS this table for that i executed mentioned scripts.
SELECT * FROM user_tables WHERE table_name = 'WORKFLOWITEMACTORDATAM_TSMS'
One record found.
SELECT * from user_mview_logs WHERE master = 'WORKFLOWITEMACTORDATAM_TSMS'
output: No record found
SELECT *
FROM user_tables
WHERE table_name = (
SELECT log_table
FROM user_mview_logs
WHERE master = 'WORKFLOWITEMACTORMOVEMENT'
)
output: No record found
Please advice me why this error is coming.....
Thanks
|
|
|
|
|
|
|
|
|
|
|