Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x0000000001c000 in file 'E:\SQL Database\S***d\NewAdvWorks.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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.

share|improve this question

migrated from stackoverflow.com Jan 19 '10 at 3:53

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

    
0 of 7 answers accepted...... Please get in the habit of accepting the best answer provided, the one solving your problem. It's the right and polite thing to do on StackOverflow and serves as an incentive for others to continue to help those looking for answers. See: meta.stackexchange.com/questions/5234/… –  marc_s Jan 18 '10 at 18:08
    
I presume that this is n error message and that you would like some help debugging, no? However, I'm having to guess here because you haven't actually written a question or request for help. Please clarify. –  dmckee Jan 19 '10 at 2:52
add comment

3 Answers 3

What worked for me:

alter database [database_name] set offline

...wait a few seconds...

alter database [database_name] set online 

This is better than restarting SQL Server since restarting SQL Server takes all databases offline (not just the database that is inaccessible).

share|improve this answer
add comment

I encountered this same error today. Restarting the SQL Server service fixed it.

The SQL Server Error log and the Windows Event Log showed the same error:

The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x00000000026000 in file 'blah.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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.

And:

Error: 823, Severity: 24, State: 2

share|improve this answer
add comment

First read the logs that were indicated in the error message.

Then try resetting the server, then run the DBCC CheckDB again.

share|improve this answer
add comment

Your Answer

 
discard

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