Sql Schema Compare will not update after CLR object installed 'Source schema drift detected'

后端 未结 4 1673
臣服心动
臣服心动 2021-02-13 20:45

After installing a custom CLR object Sql Server Developer Tools (SSDT) VS2012 will not allow an update. The error is \"Source schema drift detected. Press Compare to refresh.

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-13 20:59

    This is not an answer but a clue to deal with this problem.

    I was to update a colum from varchar[200] to varchar[MAX] and got this problem as well. So I logged in the server and tried to update the database manually via SQL Management Studio which was installed there, and I got this error:

    "Saving changes is not permitted. The changes you have made require the folloing tables to be drpped and re-created. You have either made changes to a table that can't be re-created or enable the option Prevent saving changes that require the table to be re-created."
    

    Seems that re-creating table is something so dangerous that "block/unblock on possible data lose" cannot handle. So I think only if we can walk around this LOCAL warning, could we update the database REMOTELY.

    But, why [200] to [max] leads to re-creating table? It does not make any sense. I tried [200] to [1000], and it did not work as well. This might be the key to this problem.

    And, if you do the same update in Server explorer in VS, instead of SQL Management Studio, it works. Again, why?

提交回复
热议问题