sqlpackage breaks when trying to alter a FILESTREAM column

南笙酒味 提交于 2019-12-13 01:51:50

问题


I have a SQL Database project, where I have recently amended a FILESTREAM column to allow nulls. I am trying to publish the project's dacpac to a db where the column already exists, as a filestream column, but is currently NOT NULL.

I am performing the publish using the sqlpackage.exe command line tool (version 12.0.2882.1). However, it produces the error:

Error SQL72014: .Net SqlClient Data Provider: Msg 4990, Level 16, State 1, Line 1 Cannot alter column 'document' in table 'Document' to add or remove the FILESTREAM column attribute.
Error SQL72045: Script execution error.  The executed script:
ALTER TABLE [dbo].[Document] ALTER COLUMN [document] VARBINARY (MAX) NULL;

The sql in the error looks like the generated script is trying to remove the FILESTREAM attribute on the column, which I guess is why SQL Server is complaining... but why is it doing this? My DB project still has the column marked as FILESTREAM


回答1:


Fixed by upgrading sqlpackage.exe and associated libraries from version 12.0.2882.1 to 12.0.3021.1



来源:https://stackoverflow.com/questions/33869927/sqlpackage-breaks-when-trying-to-alter-a-filestream-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!