To get the list of all backup operations performed on the current database instance:
SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
ORDER BY sdb.name, bus.backup_finish_date DESC
To get the list of all restore operations performed on the current database instance:
SELECT
[d].[name] AS database_name,
[r].restore_date AS last_restore_date,
[r].[user_name],
[bs].[backup_finish_date] AS backup_creation_date,
[bmf].[physical_device_name] AS [backup_file_used_for_restore]
FROM master.sys.databases [d]
LEFT OUTER JOIN msdb.dbo.[restorehistory] r ON r.[destination_database_name] = d.Name
INNER JOIN msdb.dbo.backupset [bs] ON [r].[backup_set_id] = [bs].[backup_set_id]
INNER JOIN msdb.dbo.backupmediafamily bmf ON [bs].[media_set_id] = [bmf].[media_set_id]
ORDER BY [d].[name], [r].restore_date DESC