Friday, January 31, 2014

To get a list of Databases that were backed-up and do not currently exist

SELECT
  DISTINCT B.DATABASE_NAME
FROM
  MSDB.DBO.BACKUPSET B
WHERE
  DB_ID(B.DATABASE_NAME) IS NULL

No comments:

Post a Comment