Tuesday, March 27, 2012

Enumerate backup files

How do you enumerate database backup files? I see Server has an EnumDirectories but no EnumFiles. I'd like to show the user a list of database backups and have them choose the one they want to restore.SELECT DISTINCT physical_device_name FROM msdb.dbo.backupmediafamily returns the list.

No comments:

Post a Comment