flyway init oracle权限不足

时间:2014-08-21 15:01:06

标签: oracle flyway

我正在从Maven构建执行Flyway。我有使用Flyway的经验,但几年没有使用过Oracle。当它尝试运行init目标时,我收到此错误消息:

    [INFO] --- flyway-maven-plugin:3.0:clean (prepare-schema-using-flyway) @ my-project ---
    [INFO] Database: jdbc:oracle:thin:@my-oracle-host:1521:dev (Oracle 11.2)
    [INFO] Cleaned schema "MY_SCHEMA" (execution time 00:03.483s)
    [INFO]
    [INFO] --- flyway-maven-plugin:3.0:init (prepare-schema-using-flyway) @ my-project ---
    [INFO] Database: jdbc:oracle:thin:@my-oracle-host:1521:dev (Oracle 11.2)
    [INFO] Creating Metadata table: "MY_SCHEMA"."schema_version"
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 16.991s
    [INFO] Finished at: Thu Aug 21 09:44:09 CDT 2014
    [INFO] Final Memory: 20M/160M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:3.0:init (prepare-schema-using-flyway) on project my-project: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Error executing statement at line 17: CREATE TABLE "MY_SCHEMA"."schema_version" (
    [ERROR] "version_rank" INT NOT NULL,
    [ERROR] "installed_rank" INT NOT NULL,
    [ERROR] "version" VARCHAR2(50) NOT NULL,
    [ERROR] "description" VARCHAR2(200) NOT NULL,
    [ERROR] "type" VARCHAR2(20) NOT NULL,
    [ERROR] "script" VARCHAR2(1000) NOT NULL,
    [ERROR] "checksum" INT,
    [ERROR] "installed_by" VARCHAR2(100) NOT NULL,
    [ERROR] "installed_on" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    [ERROR] "execution_time" INT NOT NULL,
    [ERROR] "success" NUMBER(1) NOT NULL
    [ERROR] ): ORA-01031: insufficient privileges
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

当我尝试通过JDBC连接执行相同的SQL时(我使用了IntelliJ的DBHelper),我得到了相同的错误消息。当我删除所有双引号时,它成功执行。

我无法想象Flyway 3.0与Oracle不兼容,但我怀疑可能有一个服务器设置指定了创建过程中围绕数据库对象的字符。例如,“my_table”。“my_id”或[my_table]。[my_id]

或者,有没有办法在Flyway的配置中关闭双引号?

0 个答案:

没有答案