views:

517

answers:

2

Hi all, My Dell pc failed;it was blue screen.I fixed that problem by formatting and reinstalling OS and other software that i have been using.Then I recoved my db designed using sqlserver 2005 and other files using recovery tools ;Easy Recovery 6.0.

The problem is : When I try to attach the recovered file(lpdb.mdf),It can not attached.The operation fails with the following message :

TITLE: Microsoft SQL Server Management Studio

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

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: torn page (expected signature: 0x55555555; actual signature: 0x4c093c91). It occurred during a read of page (0:0) in database ID 0 at offset 0000000000000000 in file 'F:\Recovered\lpdb_log.LDF'. 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. (Microsoft SQL Server, Error: 824)

Is there any who can help me?

I thank you!

Dejene.

Edit

By gbn from other closed question:

Hi mrdanny,

I tried the way you suggested me. The problem is unresolved.

Error is reported : Message One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.

Is there an alternative solution that i should try? I am going to redesign the database.Please save my time!

+3  A: 
  1. Have you a good backup?

  2. Given it says page (0:0), then I refer you to point 1

  3. Use emergency mode and hope for the best. Paul Randall wrote DBCC CHECKDB...

gbn
Excellent advice here. We had this exact problem, did the repair and found we lost records. Had to go back to slightly stale backups.
Jay Riggs
+1  A: 

The torn page is in the log file, so rename the log file and use the sp_attch_single_file_db procedure to attach the mdf and generate a new transaction log file.

mrdenny