Restored Database current as of which txn-log backup?

  • How does one get the precise timestamp of the latest txn log restored on a database?

    I have restored my db with NORECOVERY from a FULL backup and then sequentially applied a bunch of txn-log backups, finally RECOVERING the database.

    Is there a system-view query I can run to confirm which txn-log backup was last applied?

    Or any other way to achieve the same goal?

    The SSMS GUI does not provide this info...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • By timestamp do you mean the date and time of the last transaction? Wouldn't it be the timestamp on the file?

  • I have a database restored from a full backup + txn logs.

    Is there a way to find out what was the latest txn log applied (from system views)?

    Actually I can see this info under Last Database Log Backup in the Database Properties dialog, General panel on SSMS. I was just wondering how I can get that through querying system views.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

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