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 开发者_StackOverflow社区its contents. Any thoughts?
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
精彩评论