flywaydb:MView刷新失败

时间:2014-12-13 03:52:02

标签: oracle11g flyway

我正在尝试使用Flyway DB刷新物化视图,但会出现错误 帮助....这是否支持?

在SQL下面

ALTER MATERIALIZED VIEW TEST.TBL_M_V REFRESH COMPLETE ON DEMAND;

EXECUTE DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C');

ALTER MATERIALIZED VIEW TEST.TBL_M_V NEVER REFRESH;

出现错误

ERROR: Migration of schema "TEST" to version 4.1 failed! Please restore backu
ps and roll back database and code!
ERROR:
Migration V4_1__MViewRefresh_Test.sql failed
--------------------------------------------------
SQL State  : 42000
Error Code : 900
Message    : ORA-00900: invalid SQL statement

Location   : C:/dev/flyway-3.1/sql/V4_1__MViewRefresh_Test.sql
Line       : 8
Statement  : EXECUTE DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C')

1 个答案:

答案 0 :(得分:0)

正如错误所说,这不是一个Flyway问题。 Oracle JDBC驱动程序拒绝了您的声明。

这是您应该使用的正确语法: BEGIN DBMS_MVIEW.REFRESH('TEST.TBL_M_V','C'); END;