none
The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset..

    Question

  • Just started to get this error. Anyone know how to fix this?

    "The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x000000000e8000 in file '...\accessreports.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."


    nothing for members to see
    • Moved by Kris Wagner - MVPMVP Friday, August 12, 2011 1:37 AM Moved to SQL Forums.. Mod please move to correct area. (From:SharePoint 2010 - General Questions and Answers)
    • Edited by cecilita Friday, August 12, 2011 3:19 PM misspelling corrected
    Thursday, August 11, 2011 7:32 PM

All replies

  • Could be a bunch of things as 21 is a really generic system error code, not a SQL error , it literally is "Device not ready" but usually can be down to a disk not being readable or reachable, or any disk sector not being readable.  That can be caused by full disks, full tempdb for example, firmware for disk controllers needing an update etc etc,

    Get your DBA to runxp_ReadErrorLog to try an narrow it down

    http://www.sqlteam.com/article/using-xp_readerrorlog-in-sql-server-2005


    Regards John Timney http://www.johntimney.com
    Thursday, August 11, 2011 10:48 PM
  • From what I know of this error it does not look good.  I would be checking my backups and see if there are some disks which have errors on them, you might want to read over this post.

    http://blog.sqlauthority.com/2007/04/25/sql-server-error-messages-sysmessages-error-severity-level/

    also

    http://www.tek-tips.com/viewthread.cfm?qid=1206004&page=1

    Good luck,

    Gary

    blog www.sharepoint2010now.com

     


    Gary Newman MCSE, MCT, CCNA MCDBA, MCAD, MCSA MCTS SharePoint 2007 Dev & Admin MCPD SharePoint 2010 Development My Blog www.sharepoint2010now.com
    Thursday, August 11, 2011 11:44 PM
  • will restoring the 'accessreports.mdf'' work?

    nothing for members to see
    Friday, August 12, 2011 3:20 PM
  • It depends on how long you have been getting the error, and if your backups go back far enough to the point where that file wasn't corrupted, but that's even assuming it is a DB error passed suggesting a corruption and not a hardware error.  So it also critically depends on whether you do or do not have a disk failure as you might be wasting your time without fixing the root cause but it would likely do little harm if you did restore it.
    Regards John Timney http://www.johntimney.com
    Friday, August 12, 2011 9:48 PM
  • This error will occur, when the service account doesn't have access onto the file location for MDF/LDF. Usually this happens, when we detach a DB and attach the same DB files from a different folder.

    Thursday, September 03, 2015 9:29 AM
  • Hi,

    Dear All I faced the similar problem today morning. In my case I just extended my storage capacity in which the database instance is residing from that point onwards those instances were developers working unfortunately got corrupted @ first i just did the DB restore it works for that particular instance. Tested the other instances dint work. I suggested the team ,I would do a restart to the server. When I do the restart all the Instances is Up and running . For God sake don't do the below step for this issue.it corrupted my database.

    alter database [database name] set offline
    

    ...wait a few seconds...

    alter database [database name] set online 


    Sunday, January 31, 2016 1:20 PM
  • Hi

    I had the same problem and doing below steps solved my problem: 

    1- Copy database files to another location

    2- Delete main files

    3- Restart SQL Service.

    4- In management studio the database will be shown with "Recovery Pending" in front of its name, delete it.

    5- Attach your database with copied files of the first step.

    Tuesday, June 21, 2016 7:24 AM
  • Perfect!!! Thanks

    Wednesday, March 21, 2018 3:06 PM