Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created May 11, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martin9700/f9f12d5cb8d8666cf5f5 to your computer and use it in GitHub Desktop.
Save martin9700/f9f12d5cb8d8666cf5f5 to your computer and use it in GitHub Desktop.
SELECT bs.database_name AS Name,
bs.backup_finish_date AS LastBackup,
bmf.physical_device_name AS BackupFile
FROM msdb.dbo.backupmediafamily AS bmf
JOIN msdb.dbo.backupset AS bs
ON bmf.media_set_id = bs.media_set_id
WHERE bs.type = 'D'
ORDER BY bs.backup_finish_date DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment