SQL Server error 823: Operating system returned an I/O error
Windows or Linux reported an error when SQL Server read or wrote a database file. Treat it as a storage failure and check database integrity.
- Error number
823- Severity
- 24
- Category
- Corruption and I/O
What it means
Error 823 means the read or write call itself failed at the operating system level, and the message includes the OS error code. Unlike 824, where data came back but was wrong, here the I/O request didn't complete. It is severity 24 and threatens database integrity.
Common causes
- Disk or storage hardware failures, bad sectors, or a disconnected SAN or network volume.
- Driver or firmware problems in the storage stack.
- The volume holding the files went offline or was dismounted.
How to fix it
-
Check the operating system and hardware logs for disk errors at the same time.
-
Run a consistency check once storage is stable.
DBCC CHECKDB (N'SalesDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;
-
Restore damaged pages or the database from backup if CHECKDB reports errors, and move the database to healthy storage.
Related errors
824Logical consistency-based I/O error825Read retry succeeded after failing9001The log for database is not availableSQLITE_IOERRSQLite: disk I/O error
The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.
Work on SQL Server in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.