我尝试在下面运行此命令:
mvn -Dflyway.user=myusername -Dflyway.password=mypassword -Dflyway.url=jdbc:sqlserver://host:port;databaseName=mydbname flyway:info
它失败了:
Unable to obtain Jdbc connection from DataSource
Cannot open database "mydbname" requested by the login. The login failed.
然而,相同的db登录在flyway之外工作正常:
sqlcmd -S host -Q "select getdate()" -U myusername -P mypassword -d mydbname
提前致谢。