Baze fara backup

Configurare noua (How To)

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

Tip solutie

Permanent
Etichetare:

Voteaza

(6 din 8 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?