Generally to get the meta data from SQL Server backup files, we need to use TSQL commands like restore headeronly
or restore filelistonly
. However, there are some third party tools can read this information directly from the backup files, like this one http://www.yohz.com/sqlbakreader_details.htm. Since this tool don't have a command line version, which makes it less useful. I want to know whether there are some ways that I can read this data directly.
Thanks.
The .bak file is a Microsoft Tape Format file. Here's a PDF that contains the format.
Of interest to you will be:
For a quick dump (if you are on the SQL Server in question that created the backup), you can do select from the [msdb].[dbo].[backup*] tables.
See this article for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With