Bruce dBA
Answering my own post... I guess what I asked for could go in the WISH LIST, so a database trigger event of RESTORE_DATABASE ciould exist. But I found this data in MSDB tables. Here's a query that will show the last restores and which backup they were restored from, assuming things were done thru the GUI, not in SQL commands.
How can I ask for a new event on a database trigger even of RESTORE_DATABASE Thanks, Bruce
select
bu.server_name, bu.database_name, rh.restore_date,
rh
.user_name as 'Restored_By_User_Name',-- rh.backup_set_id, bu.media_set_id,
bu
.name, bu.user_name as 'Backup_by_User_Name', bu.backup_finish_date,bu.backup_size
from msdb.dbo.restorehistory rh
left outer join msdb.dbo.backupset bu
on rh.backup_set_id = bu.backup_set_id
-- where rh.destination_database_name = 'databaseNameGoesHere'
order by rh.restore_date desc