I need to examine a user database with a corrupted logfile ("the logscan number ... is not valid"). This database is in full recovery mode. Due to this error, no backup can be taken. However, data is replicated and still working fine (so no data loss). Instead of doing a restore will this work: 1. put database in emergency / single user mode 2. set database in SIMPLE recovery mode 3. run DBCC CHECKDB 4. fixed (?) thanks!
Update: database was already in SIMPLE. Here's what I did: 1. scripted the replication (SSMS feature) 2. dropped the replication, this "released" the logfile 3. ran DBCC CHECKDB, no errors 4. made a backup (not done since 2 months ...) 5. shrinked and resized the logfile 6. re-created the replication
If you have the last backup of the T-Log and you know the LSN then run the following: RESTORE LOG FROM DISK = 'path:\backupfilename' WITH STOPATMARK = 'lsn:lsnnumber' GO Your replication will continue to work as long as the system can write to the T-Log, but is the data being committed to the database? Replication works from the T-Log.