3959 - Version store is full. New version(s) could not be added. A transaction that needs to access the version store may be rolled back. Please refer to BOL on how to configure tempdb for versioning.
3966 - Transaction is rolled back when accessing version store. It was earlier marked as victim when the version store was shrunk due to insufficient space in tempdb. This transaction was marked as a victim earlier because it may need the row version(s) that have already been removed to make space in tempdb. Retry the transaction
3967 - Insufficient space in tempdb to hold row versions. Need to shrink the version store to free up some space in tempdb. Transaction (id=%I64d xsn=%I64d spid=%d elapsed_time=%d) has been marked as victim and it will be rolled back if it accesses the version store. If the problem persists, the likely cause is improperly sized tempdb or long-running transactions. Please refer to BOL on how to configure tempdb for versioning.
如果版本存储需要空间并用完,事务可能会回滚。它不会等待版本存储中的空间,而且您真的不希望它等待。
通常,版本存储由具有使用乐观锁定的隔离级别(例如快照隔离或读取提交的快照隔离)的事务使用。使用这些的目的通常是为了防止读取器阻塞高度事务性数据库中的写入器,但如果写入器必须等待版本存储空间被释放,它可能会导致其他写入器的广泛阻塞,并且可能会被无限阻塞。相反,这些事务被回滚。
版本存储的 tempdb 空间不足会导致以下错误:
如错误消息中所述,3967 表示版本存储已用完 tempdb 中的空间,并且特定事务已被标记为受害者。如果到达版本存储,该事务将被回滚。如果打开的事务没有修改任何额外的行,需要将行添加到版本存储中,那么它不会回滚。
3966 表示标记的事务(来自 3697)已尝试访问版本存储并随后被回滚。
3959 表示 tempdb 没有足够的空间来保存版本存储,但还没有标记为受害者的事务(意味着 tempdb 空间不足,但没有事务尝试访问版本存储)。现有事务将不受影响,但需要版本存储的新事务将被回滚。