使用 MS-SQL Server 设置 Liquibase
我正在 MVC3 SQL Server 2008 项目中使用 Liquibase (www.liquibase.org) 来管理数据库迁移/更改。然而,我遇到了第一个障碍:连接到 Microsoft SQL Server 实例。
我正在查看 liquibase 站点上的快速入门教程,但是将 mysql 替换为 sql server DB
我运行此命令:
liquibase --driver=sqljdbc.jar --changeLogFile="C:\Temp\ChangeLog.xml" --url="jdbc:sqlserver://localhost;databaseName=test" --username=user --password=pass migrate
并收到此错误:
Liquibase Update Failed: Cannot find database driver: sqljdbc.jar
我尝试添加 --classpath 指向 sqljdbc 驱动程序,但没有成功。
如何使用 liquibase 创建或更新 MS-SQL Server 数据库?
I am utilising Liquibase (www.liquibase.org) into our MVC3 SQL Server 2008 project to manage database migration/changes. However I'm stumbling on the first hurdle: Connecting to Microsoft SQL Server instance.
I am looking at the quick start tutorial on the liquibase site, but exchanging the mysql for sql server DB
I run this command:
liquibase --driver=sqljdbc.jar --changeLogFile="C:\Temp\ChangeLog.xml" --url="jdbc:sqlserver://localhost;databaseName=test" --username=user --password=pass migrate
And receive this error:
Liquibase Update Failed: Cannot find database driver: sqljdbc.jar
I have tried adding --classpath pointing to the sqljdbc driver with no luck.
How can I create or update an MS-SQL Server database with liquibase?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个名为 liquibase.properties 的属性文件,其中包含以下内容:
当位于同一目录中时,liquibase 将使用此文件。对于简化命令行很有用。
数据库更新如下:
注意:
Create a properties file called liquibase.properties containing the following:
liquibase will use this file when located in the same directory. Useful to simplify the command-line.
Database is updated as follows:
Notes: