Primary Data file currpted

  • Appears to have been truncated by operating system. the expected size

    is X but acctual size is y.

    Could not open new database(Z:\MyData.mdf). create database is aborted(error:5125)

  • Do you have a backup of this database? if yes then you can restore it:)

    Razi, M.
    http://questivity.com/it-training.html

  • Dear Raziuddin,

    Thanks for reply, Acctually i don't have backup of this database. This problem occured may power failuer or virus in the system.

  • If you don't have any backup (why not?) then you are very likely out of luck.

    You can try the following.

    Create a new database with the same number of that the corrupt DB has. Shut SQL down

    Replace the files of the newly created DB with the ones from the corrupted DB

    Restart SQL

    It's not guarenteed to work. I seem to recall reading somewhere that the size check is done every time the database is opened.

    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

Viewing 4 posts - 1 through 3 (of 3 total)

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