Error while attaching a .mdf file

  • Hello,

    i'm trying to attach a .mdf file to my SQL Server 2K8 and I get the forllowing message.

    TITLE: Microsoft SQL Server Management Studio

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

    Attach database failed for Server 'NB1245BE'. (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

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

    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

    SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:114629; actual 0:0). It occurred during a read of page (1:114629) in database ID 11 at offset 0x00000037f8a000 in file 'G:\Work\DB 2008\MDBL.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

    Could not open new database 'MDB_cleaned'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 824)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476

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

    Do you know how to solve that issue? maybe by repairing the .mdf file, but how to?

    Thank you for your help

  • You could try and hack it into the server then see what state it comes up in.

    http://sqlskills.com/BLOGS/PAUL/post/Disaster-recovery-101-hack-attach-a-damaged-database.aspx

    Once you've got it in, query sys.databases, check the state_desc for that database and post back here what it is.

    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 2 posts - 1 through 1 (of 1 total)

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