trigger em view materializada
Bom dia!
Alguém já teve problemas com a criação de trigger para uma view materializada ?
Eu criei uma TRIGGER para guardar um resumo dos dados da view materializada em uma tabela histórico. Porém após a criação da TRIGGER a VIEW MATERIALIZADA não atualiza mais.
segue erro ao tentar força a view com a trigger habilitada:
Erro ao iniciar na linha 240 no comando
BEGIN DBMS_SNAPSHOT.REFRESH( 'BACKLOG_INC_SLM'); END;
Relatório de erro:
ORA-12008: error in materialized view refresh path
ORA-04091: table KPIOPS.BACKLOG_INC_SLM is mutating, trigger/function may not see it
ORA-06512: at "KPIOPS.ATUALIZA_HISTORICO_INC", line 3
ORA-04088: error during execution of trigger 'KPIOPS.ATUALIZA_HISTORICO_INC'
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2426
ORA-06512: at line 1
12008. 00000 - "error in materialized view refresh path"
*Cause: Table SNAP$_<mview_name> reads rows from the view
MVIEW$_<mview_name>, which is a view on the master table
(the master may be at a remote site). Any
error in this path will cause this error at refresh time.
For fast refreshes, the table <master_owner>.MLOG$_<master>
is also referenced.
*Action: Examine the other messages on the stack to find the problem.
See if the objects SNAP$_<mview_name>, MVIEW$_<mview_name>,
<mowner>.<master>@<dblink>, <mowner>.MLOG$_<master>@<dblink>
still exist.Discussão (3)
Carregando comentários...