doubt on backups

  • Hi all

    Here we are having 100 databases ,for 30 databases are backed up in first shift they are not prepared the document.

    i cam on second shift how can i know which database is backed up and which is not.

    As per my knowledge we can use the restore header only

    is there any other option for this

    Thanks in advance.

  • use the backup details in msdb - this query will tell you when a database was last backed up (full backup)

    select a.name, b.backup_finish_date, a.crdate

    from master..sysdatabases a left join msdb..backupset b on a.name = b.database_name

    where b.backup_finish_date IS NULL or b.backup_finish_date = (select max(backup_finish_date)

    from msdb..backupset where database_name = a.name and type = 'D')

    ---------------------------------------------------------------------

  • it will give the complete information of those are backed up or single database information

  • all databases on the sql instance

    ---------------------------------------------------------------------

  • Here after execution the above query it is showing some error

    Msg 208, Level 16, State 1, Line 1

    Invalid object name 'master.sysdatabases'.

  • must be an error in copy and paste - you are missing a '.' - it should read master..sysdatabases

    this code is compatible with all versions of sql from sql2000, you could also use master.sys.databases

    ---------------------------------------------------------------------

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply