SQL Server 2005: T-SQL to query when the database was last restored?

Can this only be done using T-SQL? What query could you write against system tables?

+3
source share
1 answer

Use the restore_date field in the restorehistory table in the msdb database.

MSDN - restorehistory

SELECT
MAX(restore_date)
FROM
msdb.dbo.restorehistory
WHERE destination_database_name = 'SomeDB'
+3
source

Source: https://habr.com/ru/post/1755247/


All Articles