Restore history Details for sql databases.....

How do we find restore history details for all databases in the server?
Or single database?

—-for all databases
USE MSDB

GO

SELECT TOP 1 *

FROM RESTOREHISTORY WITH (nolock)
--for individual database include below commands

WHERE (DESTINATION_DATABASE_NAME = ‘dbname’)

ORDER BY RESTORE_DATE DESC

Let me know any other ways?

Comments

Popular posts from this blog

SSIS2008R2 Error: 0xC0209303 at Package:

SQL2008R2 Error: The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)