Technical Article

Get Databases with no backup

,

This is a script I run periodically to identify databases with no backup. I started running this because I once encountered a remote application that was creating databases which, caused a failure in a log backup job. So I’ve been running this ever since just in case a database is created out of left field or maybe was omitted from a backup job.

use msdb
go
select distinct
d.name
from sys.databases d
left join backupset bs
on bs.database_name = d.name
where bs.database_name is null
and d.name <> 'tempdb'
order by d.name

Rate

3.25 (4)

You rated this post out of 5. Change rating

Share

Share

Rate

3.25 (4)

You rated this post out of 5. Change rating