What’s up SQL? – Number 6 – Last backup

One of the great things about SQL Server is the amount of information it stores about itself, so, let’s say you need to find out when your databases where last backed up. Luckily, SQL Server keeps that information in th msdb database.

And here’s a little query, to help you get that information.

SELECT database_name, user_name as ExecutedBy, –physical_device_name,
backup_start_date , backup_finish_date , backup_size
FROM msdb.. backupset bckset
INNER JOIN msdb ..backupmediafamily bckfmly
ON bckset. media_set_id = bckfmly . media_set_id order by backup_start_date DESC

Leave a Reply

Your email address will not be published. Required fields are marked *