Pular para o conteúdo

Fóruns Banco de dados Oracle Falha ao atualizar view materializada com REFRESH FAST ON DEMAND Responder a: Falha ao atualizar view materializada com REFRESH FAST ON DEMAND

#157979
Anderson Ribeiro
Participante

    Oi Chiappa, estou fazendo algumas tentativas aqui.

    Primeiro modifiquei as tabelas de log das tabelas de origem:

    CREATE MATERIALIZED VIEW log ON usuario WITH primary key, rowid, sequence including new values;
    CREATE MATERIALIZED VIEW log ON emprestimo WITH primary key, rowid, sequence including new values;
    CREATE MATERIALIZED VIEW log ON livro WITH primary key, rowid, sequence including new values;
    CREATE MATERIALIZED VIEW log ON autor WITH primary key, rowid, sequence including new values;

    Depois ao criar a view como fast, obtenho esse erro:

    ORA-12015: não pode criar uma view materializada de atualização rápida a partir de uma consulta complexa
    12015. 00000 – “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.