Tape backups or disk backups

  • Hi All,

    Is there any query in SQL Server to find out where the Databases are backing up to Tape or disk.
    I tried below query but it is not providing the required details.

    SELECT sdb.Name AS DatabaseName,
    COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),'-') AS LastBackUpTime, buf.physical_name
    FROM sys.sysdatabases sdb, msdb.dbo.backupset bus,msdb..backupfile buf where bus.database_name = sdb.name and bus.backup_set_id=buf.backup_set_id
    GROUP BY sdb.Name,bus.database_name, buf.physical_name

    Thank You.

    Regards,
    Raghavender Chavva

    Thank You.

    Regards,
    Raghavender Chavva

  • Raghavender Chavva - Thursday, October 5, 2017 6:22 AM

    Hi All,

    Is there any query in SQL Server to find out where the Databases are backing up to Tape or disk.
    I tried below query but it is not providing the required details.

    SELECT sdb.Name AS DatabaseName,
    COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),'-') AS LastBackUpTime, buf.physical_name
    FROM sys.sysdatabases sdb, msdb.dbo.backupset bus,msdb..backupfile buf where bus.database_name = sdb.name and bus.backup_set_id=buf.backup_set_id
    GROUP BY sdb.Name,bus.database_name, buf.physical_name

    Thank You.

    Regards,
    Raghavender Chavva

    Have a look at msdb.dbo.backupmediafamily - the column 'devicetype' is what you're after.

  • Thank You For your reply.

    Can we know when the backup was taken to virtual disk.

    Thank You.

    Regards,
    Raghavender Chavva

  • Raghavender Chavva - Thursday, October 5, 2017 7:03 AM

    Thank You For your reply.

    Can we know when the backup was taken to virtual disk.

    That would probably be a devicetype of 7, combined with the backup_finish_date that you're already referring to. Try it and see.

Viewing 4 posts - 1 through 3 (of 3 total)

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