views:

74

answers:

1

Hello all, In SQL Server Management Studio (I have 2008), I can see the contents of the media i have backed up to, be it disk or tape. I can see information such as what files it currently includes, the dates they were backed up, etc... Is there a way to do this in T-SQL? I would like to specify a device (which is linked to a file location) and query it for its contents. Any thoughts?

A: 

You can start SQL profiler, then carry out the actions in Management Studio to display the information you require, then look in the profiler output to see what has been executed in the background to get you that info.

My guess is that these tables/catalogs are being queried:

sys.backup_devices

davek
great idea, didnt think of that. I will post results.
Kyle
I followed davek's suggestion, and found the following statement being executed which provided me with what i was looking for.RESTORE HEADERONLY FROM [KylesFakeBackupDevice]
Kyle