SQL Server Performance Forum – Threads Archive
Database attaching problem LSNCan anyone help me in resolving a problem to attach a databse files MDF and LDF as its giving problem "Error 9003: The LSN (1719:16:2) passed to log scan in database ‘DISTRIBUTION’ is invalid" The database seems to be corrupted, can anyone tell me how to recover it.
Thanx and Regards chaudhry2000
Error 9003 confirmsthat 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. Try following workaround to recover :
1. Try attaching only the mdf file with the command sp_attach_single_file_db.
2. Create a dummy database with the same name, same logical file names and same physical file names.
Stop SQL server. Replace the files with the files you got.
Start SQL Server. The database will be marked suspect.
Place it in Emergency Mode. Restart SQL Server.
Use DTS to transfer its contents out. HTH Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.