list of scheduled backup paths

  • Does anyone know of a way to list out all of the directory paths for backups that are currently scheduled? I know I can look in the registry for the default directory but I want a listing of all paths for some code I am working on.

    Many thanks.

  • This code should help get what you want. It will should the disk\share locations from backup history.

    select

    a.database_name,

    a.Type,

    c.physical_device_name

    from

    msdb.dbo.backupset a

    join

    msdb.dbo.backupmediafamily as c

    on a.media_set_id = c.media_set_id

  • Thanks Michael,

    The backupset and media tables will have history for the backups. But if I go in and change the destination of all of my backups today - that path is not reflected in these tables until the backups run again tonight. There has got to be someplace that has the scheduled path information and not just history.

  • hmmm ... how are you executing your database backups ?

    - transact SQL as a scheduled task ?

    - SQL Maintenance Plans ?

    - the Ola procs ?

    I ask specifically since the information you seek has to be extracted from different locations.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

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

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