SELECT *
FROM msdb.dbo.backupmediafamily backupmediafamily
JOIN msdb.dbo.backupset backupset ON backupmediafamily.media_set_id = backupset.media_set_id
and backupset.backup_start_date = (SELECT max(backup_start_date)
FROM msdb.dbo.backupset child
WHERE child.database_name = backupset.database_name and child.type = 'D')
and database_name = 'ReplaceWithDatabaseNameHere'
and backupset.type = 'D'```
This is based on something I found here. Thank you mrdenny.
And this works in SQL Server 2000.
This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.