MDF & LDF

  • Hi Experts,

    I have got an MDF and LDF file.Is there any way to check which version is those files? Whether its from a 2005 server or 2000.

    TIA

  • Short of opening the mdf in a hex editor and finding the version code in the header page, no.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Why don't you try attaching it to sql 2005 test instance and check the compatibility level of db after attach?

    MJ

  • Can you please explain? I tried opening in notepad but i didnt find anything..

  • Ratheesh.K.Nair (3/2/2009)


    Can you please explain? I tried opening in notepad but i didnt find anything..

    Notepad is not a hex editor.

    Unless you are intimately familiar with the structure of database pages, don't try. Easier to try and attach and see if it succeeds or fails. Start with SQL 2000, then 2005, then 2008. The first one it will attach to tells you the version.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I tried that and found the version.But i just want to know is there any other way to find the version.

    I tried using a Hex editor but I am not able to figure it out.

  • Ratheesh.K.Nair (3/2/2009)


    I tried using a Hex editor but I am not able to figure it out.

    There probably aren't more than a handful of people who know the page structure well enough to do that. It is the only way to know for sure though.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Gail,

    What do we need to search for in case we manage to open the .mdf file in any HEXEditor?

    Thanks in advance,

    MJ

  • MANU (3/2/2009)


    What do we need to search for in case we manage to open the .mdf file in any HEXEditor?

    Offhand I don't know. I know it's somewhere in the DB's header page, but I don't know the offset within the page.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for answering it Gail.

    Manu

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply