Tuesday, March 27, 2012

Attach database problem

Hi,

I have got database files from sql server 2000 which i'm trying to attach to sql server 2005 database. During the attach process, I'm getting the following erros:

EXEC sp_attach_db @.dbname = N'Dev',
@.filename1 = N'F:\SQL2005\Data\LAWSONDatabase\DEV.MDF',
@.filename2 = N'F:\SQL2005\Data\LAWSONDatabase\Dev_log.LDF';

Msg 601, Level 12, State 3, Line 1
Could not continue scan with NOLOCK due to data movement.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'Dev'. CREATE DATABASE is aborted.

Any idea what this refers to?

Regards,
D2

This usually happens with DML operations. I'm guessing you retried the operation a few times and they all failed with the same error. Can you attach this database back to SQL Server 2000?

Another thing you can try is to run SQL Server in console mode with traceflag 3630:

Start->Run->cmd->Enter

cd "%ProgramFiles%\Microsoft SQL Server\<instance_name>\mssql\binn"

sqlservr.exe -c -T3630

Then try to attach the database again and watch for this message on the console:

spid <id> ex_raise <nn>:<nn> (sev=<nn>,state=<nn>), called from 0x<nnnnnnnn>

This is the error original error which caused 601. Cut&Paste that line here and that will give us more information. <nn>:<nn> will be the error number, e.g. 6:01 -> error 601

Thanks,

Fabricio.

No comments:

Post a Comment