如何直接从SQL Server备份文件中读取元数据? [英] How to read the meta data out of SQL Server backup files directly?

查看:455
本文介绍了如何直接从SQL Server备份文件中读取元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常要从SQL Server备份文件中获取元数据,我们需要使用TSQL命令,如 restore headeronly restore filelistonly 。但是,有一些第三方工具可以直接从备份文件中读取这些信息,比如这个。

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.

这篇关于如何直接从SQL Server备份文件中读取元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆