Friday, January 31, 2014

To get the List of all Databases which are not backed up till date

SELECT
  D.NAME [DB_NAME]
FROM
  MASTER.SYS.DATABASES D
LEFT JOIN MSDB.DBO.BACKUPSET B
  ON B.DATABASE_NAME = D.NAME
WHERE
  D.DATABASE_ID IS NULL

No comments:

Post a Comment