Read/Write Error

Message Text

kernel: operating system error %d (%s) encountered

Explanation

SQL Server failed to read from or write to the specified location on disk. This failure is usually a result of a physical disk problem.

Action

Identify the device with the problem by selecting the row from sysdevices that has the same virtual disk number indicated in the error message:

select name, phyname from master..sysdevices
where low/power(2,24) = virtual_disk_number

The output from this query should provide the physical name of the damaged disk. Examine the disk as soon as possible and correct any problems. You can also identify the device by using the sp_diskblock procedure described below.

To quickly assess the potential severity of the problem and decide on an appropriate action:

  1. Use the sp_diskblock procedure as described in "Useful Stored Procedures" in Chapter 24, "Additional Problem-solving Techniques." The syntax is:

    sp_diskblock virtual_disk, block_number

    For example, if the read/write error message displays a virtual disk number 4 and a block number 871, use the following:

    sp_diskblock 4, 871
    Virtual disk 4, block 871 corresponds to:
    Logical page 1895 in the "production" database (dbid=4) on device "main".
  2. Use the DBCC PAGE statement to determine which object is using that page. For information about using DBCC PAGE, see "Associating a Page with an Object" in Chapter 24, "Additional Problem-solving Techniques."
  3. Use the information from step 2 to determine if any steps must be taken to protect your data until the disk drive can be repaires or the controller problem can be resolved.