Corruption of the file format .mdf

  • I had a problem. Whileworking in MS SQL Server was made to emergency restart the computer. After reboottried again to run the file, but nothing happened. There is a possibility ofdamage to the database, the program marks the file base in gray. The format ofthe file is mdf. What to do? Is it possible to get well?
  • I'm 99% positive that this has been posted before (I recall finding the idea of an MDF getting well again (it had a cold? 🙂 ) quite amusing).

    The answer was (surprise!) to download/buy a specific application to fix the problem. I've flagged this as spam in anticipation.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Found it! https://www.sqlservercentral.com/Forums/1935691/Corruption-of-the-file-format-mdf#bm1955086

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • This was removed by the editor as SPAM

  • kentsteve207 - Saturday, May 19, 2018 3:48 AM

  • I had a problem. Whileworking in MS SQL Server was made to emergency restart the computer. After reboottried again to run the file, but nothing happened. There is a possibility ofdamage to the database, the program marks the file base in gray. The format ofthe file is mdf. What to do? Is it possible to get well?
  • Solutionfor this problem is quick and it is the following (Execute SQL in Given Order):
  • 1.    Connect to yourdatabase server using Microsoft SQL Server Management Studio

    2.    Execute the followingSQL script in given order: 

    NOTE:replace [DatabaseName] with your database name

    1.    -- This query willrollback any transaction which is running on that database

    2.    -- and bring SQLServer database in a "single user" mode

    3.    ALTER DATABASEMicrosoftDynamicsAX SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    4.     

    5.    -- Marking databaseREAD_ONLY, disable logging,

    6.    -- and limitingaccess only to members of the sysadmin fixed server role

    7.   ALTER DATABASEMicrosoftDynamicsAX SET EMERGENCY

    8.    

    9.    -- Checks thelogical and physical integrity of all the objects in the specified database

    10.DBCCcheckdb(MicrosoftDynamicsAX)

    11.

    12.-- In case ofsimple failure then we can use allow data loss option to recover Database

    13.

    14.--  DBCC CheckDB (MicrosoftDynamicsAX,REPAIR_ALLOW_DATA_LOSS)

    15.

    16. -- Set databaseaccessibility to it's original state, allowing all logins

    17.ALTER DATABASEMicrosoftDynamicsAX SET MULTI_USER

    18. you can try to use mdf repair tool - 

    http://www.mdf.repair/

    19.EXECsp_resetstatus MicrosoftDynamicsAX

  • kentsteve207 - Saturday, May 19, 2018 3:48 AM

  • I had a problem. Whileworking in MS SQL Server was made to emergency restart the computer. After reboottried again to run the file, but nothing happened. There is a possibility ofdamage to the database, the program marks the file base in gray. The format ofthe file is mdf. What to do? Is it possible to get well?
  • Do you have a recent backup?
    😎

  • Followed your link, looks like the same thing with a slight variation. Well spotted.

    ...

  • This was removed by the editor as SPAM

  • Viewing 8 posts - 1 through 7 (of 7 total)

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