SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


601: Could not continue scan with NOLOCK due to Data movement


601: Could not continue scan with NOLOCK due to Data movement

Author
Message
christy.umoren
christy.umoren
Old Hand
Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)

Group: General Forum Members
Points: 397 Visits: 115
SCENARIO 1

Hi, i'm getting the error msg 601: Could not continue scan with NOLOCK due to Data movement‎ - from a job scheduled to run. This is how the error comes about;

I have two sql servers, (both 2000) lets say A and B. server A is my production server while server B is my standby server. I scheduled a database and log backup on server A in which the destination for the backup files are on server B where its to be recovery (sort of like the log shipping we have in sql 2008).

Now I have two jobs( say job1 and job2) scheduled on server A. Job1 is a procedure which is to perform a full backup and then a log backups to server B. Job2 is a procedure that is to recovery(restore) the backups from server B onto the standby server B in the order they were backed up.
Pls note that job2 will also fail if job1 fail because there are no backup files for job2 to recovery.

One day i noticed job1 had been failing causing job2 to also fail. On checking the job history and log files i saw that full backup will complete but log backup will fail with the above error causing the the job to fail...

I have no NOLOCK statement in my procedure
I have upgraded my service pack to SP4 because i was told its a service pack issue but still nothing
I have ran DBCCC CHECKDB and no error was displayed

SCENARIO 2

This scenario is exactly like Scenario 1, the only difference is that i get the above error when recovery of the 'log files' is being performed on server B (that means full database recovery is successful but log recovery fails) . So in the case, job1 is fine but job2 is failing.

Pls can anyone help??!
David Webb-CDS
David Webb-CDS
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4076 Visits: 8586
The first question would be: What's the purpose of the NOLOCK? Can you just take it out?



And then again, I might be wrong ...
David Webb
christy.umoren
christy.umoren
Old Hand
Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)

Group: General Forum Members
Points: 397 Visits: 115
i have no NOLOCK statement in my procedure
David Webb-CDS
David Webb-CDS
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4076 Visits: 8586
Sorry, I mis-read that. What command in the job is actually issuing the error? Do you have the complete error log from the package execution?



And then again, I might be wrong ...
David Webb
christy.umoren
christy.umoren
Old Hand
Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)Old Hand (397 reputation)

Group: General Forum Members
Points: 397 Visits: 115
Thank you very much for your response.
Here is the actual procedure that recovers the log file;

use master

if exists (SELECT * from sysobjects where id = object_id('dbo.sp_ApplyStandByLog') and sysstat & 0xf = 4)
drop procedure dbo.sp_ApplyStandByLog
GO

CREATE PROCEDURE sp_ApplyStandByLog
@DBName sysname,
@BackupFileName nvarchar(256),
@UndoFile nvarchar(256)
AS
DECLARE @RestoreCmd nvarchar(510)
DECLARE @ErrDesc nvarchar(510)
SET @RestoreCmd =
'RESTORE LOG ' + @DBName
+ ' FROM DISK=''' + @BackupFileName
+ ''' WITH STANDBY=''' + @UndoFile
PRINT 'Executing ' + @RestoreCmd
RESTORE LOG @DBName FROM DISK=@BackupFileName WITH STANDBY=@UndoFile
IF @@ERROR <> 0
BEGIN
SET @ErrDesc =
'sp_ApplyStandByLog Error ' + convert(varchar(9),@@Error) + ' occurred on '
+ 'database %s restoring backup file %s'
RAISERROR (@ErrDesc,19,1,@DBName, @BackupFileName)
END
RETURN


Here is the error message from the job history;

Executed as user: BRANCHSERVER1\BackupAdmin. ...TE 42000] (Error 601) Processed 1 pages for database 'failsafe', file 'failsafe_Log' on file 1. [SQLSTATE 01000] (Error 4035) Processed 696 pages for database 'failsafe', file 'failsafe_Data' on file 1. [SQLSTATE 01000] (Error 4035) Executing RESTORE FULL BACKUP failsafe FROM DISK='\\branchserver2\e$\backup\failsafe_001_000003768_20130218_1014_FULL.bak' WITH STANDBY='e:\backup\failsafe_undo.dat, REPLACE [SQLSTATE 01000] (Error 0) RESTORE DATABASE successfully processed 697 pages in 4.316 seconds (1.321 MB/sec). [SQLSTATE 01000] (Error 3014) Could not continue scan with NOLOCK due to data movement. [SQLSTATE 42000] (Error 601) Processed 1 pages for database 'ngricao', file 'NGRICAO_Log' on file 1. [SQLSTATE 01000] (Error 4035) Processed 287544 pages for database 'ngricao', file 'NGRICAO_Data' on file 1. [SQLSTATE 01000] (Error 4035) Executing RESTORE FULL BACKUP ngricao FROM DISK='\\branchserver2\e$\backupgricao_001_000003395_2013... The step failed.

Thank you
David Webb-CDS
David Webb-CDS
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4076 Visits: 8586
The package you're running does more thasn the stored proc you've shown. Looks like a full DB restore was doen, then something ran that caused this error, then the proc you've shown ran. What does the whole package do? What happens just before this proc runs?



And then again, I might be wrong ...
David Webb
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search