Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a SQL Server 2000 database (mdf and ldf).

When I try to attach it, using SQL Server Management Studio Express 2005, I get this error:

Attach database failed for Server 'XXXXX\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

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

SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:2474; actual 0:0). It occurred during a read of page (1:2474) in database ID 30 at offset 0x00000001354000 in file 'F:\database\DB.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. During redoing of a logged operation in database 'DB', an error occurred at log record ID (1128:22250:4). 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 'DB'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 824)

Any help?

share|improve this question

migrated from Mar 20 '13 at 13:08

This question came from our site for professional and enthusiast programmers.

It would appear as if that .mdf is corrupt ... – marc_s Mar 5 '13 at 15:44
Well hopefully you have a backup. If not, you've learned a tough lesson on why .mdf and .ldf files are not backups. – Aaron Bertrand Mar 5 '13 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.