July 31, 2007 at 9:39 am
I'd like to grab the date since the last restore but I don't see anything obvious in the system views. Please let me know if any of you have any suggestions or sample scripts. Thanks.
July 31, 2007 at 10:15 am
This script works fine but I'm still wondering if there are SQL 2005 system views for restore info.
use msdb
select
DBRestored = destination_database_name,
RestoreDate = restore_date,
SourceDB = b.database_name,
SourceFile = physical_name,
BackupDate = backup_start_date
from RestoreHistory h
join BackupSet b
on h.backup_set_id = b.backup_set_id
join BackupFile f
on f.backup_set_id = b.backup_set_id
order by RestoreDate DESC
August 1, 2007 at 6:54 am
Tables in msdb:
restorefile
restorefilegroup
restorehistory (backup_set_id is in this one)
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply