declare @date char(8) set @date = convert(char(8),getdate(),112) select a.서버명,@date as 년월일,a.백업한횟수,b.권장백업갯수 from ( select @@servername 서버명,count(distinct database_name) as 백업한횟수 from msdb.dbo.backupset with(nolock) where database_name not in ('model','tempdb') and type = 'D' and backup_finish_date > convert(datetime,'' + @date + '') ) as a inner join ( select @@servername as 서버명,count(*) as '권장백업갯수' from sys.databases where name not in ('model','tempdb') ) as b on a.서버명 = b.서버명
ms-sql 에서 백업을 확인하는 쿼리 입니다..
출처 : http://www.sqler.com/bColumn/127922