Read/Write Error

Troubleshooting SQL Server

Troubleshooting

Read/Write Error

Message Text

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

Explanation

The Read/Write Error is raised when opening or closing a file and Microsoft® SQL Server™ fails to read from or write to the specified disk location. This failure is usually a result of a physical disk problem like a bad sector on the disk drive or a failure of the disk drive or controller.

Action

Identify the device with the problem database by selecting the row from sysaltfiles that has the same disk name indicated in the error message:

USE master
GO
SELECT name, filename 
FROM master..sysaltfiles
GO

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.

After the disk drive or controller problem is resolved, restart SQL Server.

If the disk is found to be damaged, restore data from a backup database or consider using DBCC CHECKDB.

See Also

sysaltfiles