March 18, 2015 at 8:06 am
Hi all,
I am getting following error:
"The log in this backup set terminates at LSN 9566000024284900001, which is too early to apply to the database. A more recent log backup that includes LSN 986000002731000001 can be restored."
If I am missing to restore previous log backup file, how to find which LSN mapped to which log backup file (.trn file name)? Another word looking at LSN can we tell which log backup file is missing?
March 18, 2015 at 8:42 am
use msdb
go
select s.backup_set_id,
s.first_lsn,
s.last_lsn,
s.database_name,
s.backup_start_date,
s.backup_finish_date,
s.type,
f.physical_device_name
from backupset s join backupmediafamily f
on s.media_set_id = f.media_set_id
where s.backup_finish_date > '03/15/2015' -- or any recent date to limit result set
and s.database_name = 'YOUR_DB_NAME'
order by s.backup_finish_date
March 18, 2015 at 5:26 pm
Thanks for your reply SQL guy 1. when I run your query I get date, first LSN, Last Lsn....etc. my question was if I have log shipping configured to run every 15 minutes and and some reason I miss a log file, How do I find out which .trn file is missing? How do you know which LSN # belong to which .trn file (window file)?
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply