我们有一个带有列的 OrderLines 表:
Quantity int not null
QtyCancelled int not null
QtyBackorder int not null
QtyPicking int not null
QtyPacking int not null
QtyShiped int not null
Run Code Online (Sandbox Code Playgroud)
计算和持久化列 FulfillmentStatusId 为:
dbo.clr_GetFulfillmentStatusByLineQuantities(Quantity, QtyCancelled, QtyBackorder, QtyPicking, QtyPacking, QtyShiped)
Run Code Online (Sandbox Code Playgroud)
“clr_GetFulfillmentStatusByLineQuantities”,当然,通过标量函数映射到数据库中的 ASSEMBLY,关联方法 (C#) 标记为:
[SqlFunction(DataAccess = None, IsDeterministic = true, IsPrecise = true, SystemDataAccess = None)]
Run Code Online (Sandbox Code Playgroud)
参考这个问题,我已经多次针对这个表运行 DBCC CHECKTABLE ,它仍然保持为 has_unchecked_assembly_data=1。首次将列添加到表中时确实如此,但我相信 DBCC CHECKTABLE 命令在迁移到 SQL 2016 之前已成功。
尽管该表已使用很长时间且 has_unchecked_assembly_data=1,但似乎对该表的功能没有影响。我很关心ALTER ASSEMBLY不使用时取消选中数据时,则抛出抛出异常的另一个异常,当我没使用该选项,但出现的装配反正“根据MVID”进行更新。
对不起,如果我胡说八道,我不会问太多问题,我主要是潜伏的。
不过,提前致谢!
更新 (20180917T17:34-05:00):感谢 …