Welcome to SqlServer-QA.net Sign in | Join | Help

SQL Server Storage Engine & Tools (SSQA.net)

SQL Server Tools includes storage engine that includes a complete set of graphical tools and command prompt utilities that allow users, programmers, and administrators. SSMS, SSRS, SSIS & SSAS are most commonly used tools.
"Error 9003: The LSN(42:132:1) passed to log scan in database '<DBName>' is invalid

Got a distressed call from one of the database operators stating the error on the subject, instantly I suspect that the hardware of that server is not doing well. As the error ""Error 9003: The LSN(42:132:1) passed to log scan in database '<DBName>' is invalid" suggests that the LSN (log sequence number) passed during the recovery of the database (ldf) does not match the LSN number recorded in the mdf file. Therefore this error is typically a problem where the mdf is an older version of the file than the ldf file.

LSN is most important number for a database to recover immediately and any mismatch of these serial numbers will invalidate the backups too. So as a recovery of this issue is to check the disks where these files are located, as any corruption on the drivers of a RAID controller can contribute more issues. Still to recover there are some ways and these ways require a thorough testing with more work than the others:

Try attaching only the mdf file with the command sp_attach_single_file_db. If the database was cleanly shutdown SQL should be able to create a new ldf file

Alternative method is to create a dummy database with same name having similar logical & physical file names. Stop SQL Server Services and replace the files with the files you got. Start SQL Server. The database will be marked suspect. Place it in Emergency Mode by using SP_CONFIGURE and set the status as per the Books online information. Restart SQL Server that will enable the database online.

Rather taking such an action I would suggest to run through your hardware vendor to certify the hardware and perform a full health check in order to ensure the hardware is not going down the road.

 

Posted: Monday, September 17, 2007 2:44 AM by SQL Master

Comments

SSQA.net - SqlServer-QA.net said:

Got a distressed call from one of the database operators stating the error on the subject, instantly

# September 17, 2007 3:27 AM

Other SQL Server Blogs around the Web said:

Got a distressed call from one of the database operators stating the error on the subject, instantly

# September 17, 2007 6:51 AM
Anonymous comments are disabled