lwb_hao 发表于 2010-7-26 13:58:48

从一英文网站上搞过来的关于 MS SQL 2000 MDF 格式

本帖最后由 lwb_hao 于 2010-7-26 14:16 编辑

Unraveling MS SQL 2000 MDF Format (Part 1)
By ekasiswanto
This time, I would like to discuss about the physical format of Microsoft’s SQL 2000 Database. As you probably already know, each MS SQL 2000 database corresponds to one or more file. The file has the default extention of .MDF.

The raw data of MDF file is logically divided by blocks of size 8192 bytes and it is called page. In each block, the first 96 bytes is the header, and the rest of it, is the data, depends of the page type that is defined in the page header.

Now, let’s see the first block, which corresponds to the page 0 (zero) in some sample physical SQL 2000 database, using hex editor program :


Please by reminded that I will not explain further about each variable in each bytes (for instance, I will not explain what is m_type, etc.). You can consult other documentation regarding these property.

Offset 0 which is Hex 01 is headerVersion
Offset 1 which is Hex 0F is Page Type (m_type)
Offset 2 which is Hex 00 is m_typeFlagBits
Offset 3 which is Hex 00 is m_level
Offset 4 which is Hex 08 is m_flagBits
Offset 5 which is Hex 01 is at the time of writing is still not yet identified
Offset 6-7 which is Hex 00 00 is m_indexId
Offset 18-1B which is Hex 63 00 00 00 which is 00000063 Hex which is 99 Dec is m_objId
Offset 20-23 which is Hex 00 00 00 00 is second part of m_PageId
Offset 24-25 which is Hex 01 00 is first part of m_PageId or m_FileId

lwb_hao 发表于 2010-7-26 13:59:15

怎么图片贴不上来??

lwb_hao 发表于 2010-7-26 14:01:57

算了,我发个doc格式的文档上来

lwb_hao 发表于 2010-7-26 14:08:51

本帖最后由 lwb_hao 于 2010-7-26 14:11 编辑

与一个俄罗斯大老写的软件MDFview相结合对MDF分析(这是我在俄罗斯网站上下载的,用于虚拟DOS32模式下,可与winhex的标注功能相结合进行分析),对以后面SQL MDF数据库结构的了解学习有很大的促进作用

lwb_hao 发表于 2010-7-26 14:15:57

关于SQL 的MDF文档格式,不仅微软封闭其技术,国内的MDF数据分析高手也封杀,均没有对外公布相关内容。这是我们大家的悲哀!!!!欢迎大家讨论    QQ:44399063

rainhe 发表于 2010-7-26 14:20:38

下载翻译看看。

rainhe 发表于 2010-7-26 14:20:39

下载翻译看看。

wushi 发表于 2010-8-21 00:33:44

学习了呵呵,下了

cjteam 发表于 2010-10-18 01:51:56

谢谢lwb_hao 提供。

xiongdeyuan 发表于 2010-10-18 08:15:22

谢谢分享啊

honghu79 发表于 2010-11-30 02:17:21

看看,怎么不能看呢

友情 发表于 2010-11-30 09:46:41

支持楼主~~~~~~·

中国芯 发表于 2010-12-4 01:13:10

好文章多谢分享

中国芯 发表于 2010-12-4 01:14:55

谢谢分享啊

中国芯 发表于 2010-12-4 01:15:17

谢谢分享啊
楼主
页: [1] 2
查看完整版本: 从一英文网站上搞过来的关于 MS SQL 2000 MDF 格式