SQL Server: How to attach / repair a detached / damaged database?
07:53 17 Aug 2016

A database server crashed. I was able to get the mdf and the log file and I am trying to mount it on another server. I don't have backup as it was a development database.

When I try to attach the mdf and ldf files, Sql Server Management Studio give me this error:

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Attach database failed for Server

    ------------------------------

    Could not redo log record (457:14202:19), for transaction ID (0:478674), on page (1:519205), database 'WSS_Content_5555' (database ID 15). Page: LSN = (370:463:113), type = 1. Log: OpCode = 2, context 2, PrevPageLSN: (298:40524:64).
    Restore from a backup of the database, or repair the database.
    During redoing of a logged operation in database 'WSS_Content_5555', an error occurred at log record ID (457:14202:19).
    Typically, the specific failure is previously logged as an error in the Windows Event Log service.
    Restore the database from a full backup, or repair the database.
    Could not open new database 'WSS_Content_5555'.
    CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 3456)

I don't know how to repair the database. Does it need to be attached before beeing repaired? In that case, how can I attach it?

sql-server ssms