MDF header in hex

  •  

    Hi! I recovered an MDF file from a corrupted HD (MSSQL2K) and I want to know how is the MDF header in hex

    I´ve recovered an MDF file but I get the following error:

    Server: Msg 5172, Level 16, State 15, Line 1

    The header for file 'D:\MSSQL7\data\fie.mdf' is not a valid database file header. And other error talks about the file_size

    So we think that getting the correct value of the header we can solve

    the problem.

    Thank you very much.

     

    Marcelo.

     

  • I do not believe that this informaiton is documented for general public use. The only resolution may be to recover from your most recent database backup. Another possibility is that MS support may be able to assist.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Even if you could somehow find how the header looks and hex edit it in the file I do not believe you could get the file working. This seems more like a symptom of a bigger problem.

  • Bingo Chris ... time to "recover from your most recent database backup" ...

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Yep, it would seem that is the only possibility here.

  • ... lest we forget the 'final' SQL script ...

     

        exec sp_update_resume

        go

        if @database_restore = "success"

            if @data_loss = "none"

                exec sp_kudos_to_dba

            else

                exec sp_distrubute_resume

                --exec sp_pack_up_desk

        else

              exec sp_distrubute_resume

               --exec sp_packup_desk

               exec sp_escorted_exit

     

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 6 posts - 1 through 5 (of 5 total)

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