CREATE PROC dbo.procLastRestoreDates
AS
SELECT
destination_database_name,
MAX(restore_date) AS LastRestoreDate,
restore_type
FROM
msdb.dbo.restorehistory
GROUP BY
destination_database_name,
restore_type
A forum created 01/17/2005 to facilitate communication between database developers and users.
Saturday, December 22, 2007
Last Restore Date in MSSQL
I regularly take backups of three databases from a production SQL Server 2005, and restore to as many as four different development servers, for testing with different OS's and hardware configurations. I created this procedure in the master database on each dev server that will display the last restore dates for all the databases:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment