Could not continue scan with NOLOCK due to data movement

SQL Server版本是Microsoft SQL Server 2017 (RTM-CU15-GDR) (KB4505225),在执行SP时,SQL Server抛出错误,错误消息是:

Could not continue scan with NOLOCK due to data movement

错误的原因,很有可能是:SQL Server对表进行全表扫描,表带有NOLOCK锁提示,在扫描的当前位置缺少一个或多个数据页,但是缺失的数据页并不能说明数据库中存在损坏问题,此错误的根本原因是由于DML语句引起的页面拆分导致页面被删除或移动,因此SQL Server无法继续扫描操作。为了验证是否是数据页导致的,可以使用CHECKDB命令:

DBCC CHECKDB(MY_DATABASE) WITH PHYSICAL_ONLY

 

 

 

 

 

 

 

参考文档:

Error 601: Could not continue scan with NOLOCK due to SQL Server data movement

你可能感兴趣的:(Could not continue scan with NOLOCK due to data movement)