Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server error "Could not continue scan with NOLOCK due to data movement."

Tags:

sql

sql-server

I am having an issue when running queries or stored procedures. Every time I run a query I get the following error:

Could not continue scan with NOLOCK due to data movement.

If I remove the WITH NOLOCK command, I get a different error:

Msg 824, Level 24, State 2, Line 1

SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:19818941; actual 1:19818957). It occurred during a read of page (1:19818941) in database ID 9 at offset 0x000025cd37a000 in file 'E:\SQLDATA\MSCRM.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

What should I do to resolve this error?

like image 291
Mike Avatar asked Jun 02 '13 04:06

Mike


1 Answers

First, obviously, try DBCC CHECKDB.

If that cannot resolve the issue, you may need to restore from a backup and then manually copy over the most recent changes. Hopefully you have been doing nightly backups... ?

like image 86
StilesCrisis Avatar answered Oct 14 '22 06:10

StilesCrisis