Unanswered: Error 9003: The LSN passed to log scan in database is invalid
SQL server 2000 SP4
Databasefiles *.MDF (~10gb) and the *.LDF (~180gb)
Due to obvious problems with space, I wanted to copy these files to a Terrabyte USB harddrive.
After copying (I stopped SQL) I did the following:
Detach the copied database
Then attached the copied database from the new hardrive.
The following message appears:
Error 9003: The LSN passed to log scan in database is invalid
1. harddive is write cache disabled
2. The original files are good
My guess is that copying of these huge files causes some corruption.
Hans, by the size of your ldf file, it seems your db is using the full recovery model with no log maintenance routines in place. Either put the routines in place, or switch your db to the simple recovery model and truncate and shrink your log. 180GB Wow, on a 10GB database file, you will eventually run out of space on the drive since the log file is not being truncated of inactive transactions.
To Shrink Log:
backup log databasename with truncate_only
dbcc shrinkfile(logdevicename, NewSizeInMB)
ie dbcc shrinkfile(securitymaster_log, 2048)
you can obtain the log file name via select name from sysfiles for the current database, or via Enterprise Manager.
switch your db to simple recovery model if you do not need recovery outside of the last full backup, or put jobs in place to backup the database log periodically.