0 pts.
 Transaction Log – SQL Server 2005
How do i find out what transaction log file was last applied to a database?

Software/Hardware used:
ASKED: June 16, 2009  4:11 PM
UPDATED: June 23, 2009  8:06 PM

Answer Wiki:
Which backups have been restored is kept in the msdb database. Look in the database for tables that start with backup or restore. That's where the information is kept. You can also look in the ERRORLOG file as each restore should be logged in there.
Last Wiki Answer Submitted:  June 17, 2009  3:17 am  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

what i want to do is pull the last lsn number applied to the database to view with a tsql statement, is there a way to do that? And also i want to pull the lsn to view from the transaction log using tsql

 0 pts.

 

Thanks Mr. Denny, I used the msdb.
select bs.backup_start_date,
bs.first_lsn,
bs.last_lsn,
bs.checkpoint_lsn
from dbo.backupset bs
where bs.database_name = ‘YourDatabaseNameHere’
and bs.backup_set_id > (select max(backup_set_id) from dbo.backupset where database_name = bs.database_name and type = ‘D’)

 0 pts.