System table for transaction logs

  • How can I find out the Start LSN and End LSN for a specific transaction log? thanks

  • Use RESTORE HEADERONLY in Query Analyzer.

    Greg

    Greg

  • RESTORE HEADERONLY

    Statement that retrieves all the backup header information for all backup sets on a particular backup device.

     

    However I am not using a backup device. I am backup directly to a file on the disk.

  • "Backup device" is a synonym for either a logical or physical device.

    RESTORE HEADERONLY

    FROM DISK = 'd:\Microsoft SQL Server\MSSQL\Backups\mybackupfile.BAK'

    substituting your disk file for the stuff in quotes.

    Greg

    Greg

  • Assuming the server where the backups were generated is still good, you can also:

    select mf.physical_device_name, bs.*
    from msdb.dbo.backupmediafamily as mf
      join msdb.dbo.backupset as bs
        on mf.media_set_id = bs.media_set_id 
    where bs.database_name = db_name()

    Of course, tailoring the select list & criteria to your liking.

  • Out of curiosity why do you need this information ? If you are using a SQL Maintenance Plan for your transaction log backups the actual filenames should be sufficient for a restore to a point in time.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Well the more I understand how transaction log backup and regular backup interact while kicked off at the same time as well as prividing comprehensive coverage in case your original server goes belly up to a point in time. since there is no consistent backup in sql server.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply