0

Is there some documents for mdf, ndf, ldf file format?

Here the three different file types are belonged to SQL server.

I search the document on internet for a long time, but the result is disappointed. Hope someone can help me!

Tim Stone
  • 19,119
  • 6
  • 56
  • 66
snakecon
  • 23
  • 3
  • 1
    Not that I'm aware of - and you're not supposed to fiddle around with bits and bytes in those files anyway! Use the proper API's (T-SQL) – marc_s Jul 03 '11 at 06:59
  • 1
    @snakecon : perhaps you should tell us what you are actually trying to do. – Mitch Wheat Jul 03 '11 at 07:00
  • @Mitch Wheat I want to recover my invalid file in bits and bytes level. So I wander if there is proper documents like Word and Excel. – snakecon Jul 03 '11 at 07:08
  • 1
    @snakecon: no, there is no safe way to read a data file *at all*. – gbn Jul 03 '11 at 08:12

1 Answers1

0

There is information on the structures of SQL Server files, however, it's by no means as straightforward as a Word or Excel document.

You can look here for information on .MDF and .NDF (database files), and here for .LDF files (Log files).

This is MCM (Microsoft Master) level training, and that alone should give you an idea of the level of complexity involved. If you have a corrupt SQL Server database, you should look at restoring a backup, depending on how recent it was.

Nick Haslam
  • 1,512
  • 1
  • 24
  • 47