使用 vsdbcmd 部署数据库项目时,出现错误“为数据库启用了 Vardecimal 支持,但为项目禁用了”
我得到:SQL01265 Vardecimal 支持已为数据库启用,但已为项目禁用
我尝试将 .sqlsettings 文件更改为:"
"
但我仍然收到错误。
这是 VS2010 DB 项目,项目设置为 2005,正在升级的数据库是 2008。
我们还有另一个 2005 DB 项目,即使在 .sqlsettings 文件中将 VardecimalStorageFormatOn 设置为 false 并且不部署数据库属性,它也可以很好地更新 2008 数据库。
知道为什么一个可以工作而另一个不行吗?
谢谢
I get: SQL01265 Vardecimal support is enabled for the database but disabled for the project
I've tried changing the .sqlsettings files to have: "<VardecimalStorageFormatOn>True</VardecimalStorageFormatOn>"
and the .sqldeployment file to have: "<DeployDatabaseProperties>True</DeployDatabaseProperties>"
But i'm still getting the error.
It's VS2010 DB Project with the project set to 2005, the database being upgraded is 2008.
We've got another 2005 DB project which will update a 2008 db fine, even with VardecimalStorageFormatOn set to false in the .sqlsettings file and not deploying db properties.
Any idea why one would work and the other wouldn't?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了同样的问题,直到我更改了“Properties\Database.sqlcmdvars”文件中的这一行...
有趣的
是,如果您将其改回来,它仍然有效。它可能是一个 XML 模式缓存。
I had the same problem until I changed this line in the "Properties\Database.sqlcmdvars" file...
to
Funny thing is that if you change it back, it still works. It may be an XML schema caching thing.
遇到了同样的问题,直到我将 GDR 项目中的兼容性级别更改为 SQL 2000(错误地),然后再次返回到 2005。重建后,项目部署正常(到 2008 服务器)。
去算算...
Had same problem, until I changed the compatability level in the GDR project down to SQL 2000 (by mistake) then back up to 2005 again. After a rebuild, the project deployed ok (to the 2008 server).
Go figure...
另一个要检查的地方是数据库项目文件。
对于 VS2012,对我来说,Visual Studio 使用 sqlproj 文件中的相同设置覆盖 sqlsettings 文件中的 VardecimalStorageFormatOn,并将项目设置复制到 Model.xml 部署设置文件。这会导致错误消息并阻止部署,即使我部署到兼容性级别 100 的 SQL Server 2008 也是如此。
Another place to check is in the database project file.
For VS2012, for me, Visual Studio was overriding the VardecimalStorageFormatOn in the sqlsettings file with the same setting in the sqlproj file and copying the project setting to the Model.xml deployment setting file. This then caused the error message and prevented the deploy, even when I was deploying to SQL Server 2008 with compatibility level 100.