Get Last Database Restore Date and Time in SQL Server

Knowing when a database was last restored is useful during incident response, audits, and general environment validation.

This is not about backup schedules or restore progress.
It is a simple historical check that answers one question:

When was this database last restored?

This post shows a reliable way to retrieve the most recent restore date and time for each database.


Why Last Restore Time Matters

Checking restore history is useful when:

  • Investigating unexpected data changes
  • Validating recent recovery activity
  • Confirming whether a restore actually completed
  • Reviewing activity on inherited or shared environments

A restore leaves a footprint. This query helps you find it.


Show Last Restore Date and Time for Each Database

The query below returns the most recent restore date for each database recorded in SQL Server restore history system tables.

This query returns the most recent restore event recorded for each database.

sql server last database restore time

Important Notes and Limitations

A few things to be aware of:

  • Databases that were never restored will not appear
  • Databases created manually may not have restore history
  • Restore history can be lost if system databases are rebuilt
  • This does not show restore progress or duration

If you need to estimate how long a restore is taking while it is running, that is a different query entirely.

👉 Estimate Backup and Restore Completion Time in SQL Server

Understanding Restore Types

Restore history includes different restore operations:

  • 'D' – Full database restore
  • 'I' – Differential restore
  • 'L' – Transaction log restore

Each restore event is logged separately. The query above only returns the most recent restore per database, regardless of type.

👉 Microsoft Docs: restorehistory (Transact-SQL)


Related Checks

Restore history pairs naturally with backup validation:

👉 Get Last Database Backup Times in SQL Server

Together, these checks answer:

  • Do we have backups?
  • Have we restored recently?

Final Thoughts

Restore history is easy to overlook, but it often explains more than expected.

When troubleshooting data issues or validating recovery actions, knowing when a database was last restored can save a lot of guesswork.

This is a simple check, but it earns its place in baseline DBA tooling.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *