SELECT a.Name AS DatabaseName,COALESCE(CONVERT(VARCHAR(12),MAX(b.backup_finish_date),101),'Not Yet Taken') AS LastBackUpDate,COALESCE(CONVERT(VARCHAR(12),MAX(b.user_name),101),'NA') AS TakenBy FROM sys.sysdatabases a LEFT OUTER JOIN msdb.dbo.backupset b ON b.database_name=a.name GROUP BY a.Name ORDER BY a.Name
by: 发表于:2017-09-08 09:57:13 顶(0) | 踩(0) 回复
??
回复评论