Situatie
Mai jos este o procedura ce se ruleaza pe serverul de sql si returneaza bazele de date ce nu au backup facut.
Solutie
create procedure BazeFaraBackup_prc
as
select distinct
d.name
from msdb.sys.databases d
left join msdb.dbo.backupset bs
on bs.database_name = d.name
where bs.database_name is null
and d.name <> ‘tempdb’
order by d.name
Leave A Comment?