SQL server error 824

Bugs_Bunny123 1 Reputation point

I have a SQL Server 2019, running on a Hyper-V machine in a Failover Cluster, with build 15.0.4261.1. I keep on getting Event ID 824:

"SQL Server detected a logical consistency-based I/O error: stale page (a page read returned a log sequence number (LSN) (104:6736:1) that is older than the last one that was written (0:0:0)). It occurred during a read of page (1:23063) in database ID 2 at offset 0x0000000b42e000 in file 'D:\SQLData\MSSQL15.MSSQLSERVER\MSSQL\DATA\tempdb.mdf'. Additional messages in the SQL Server error log or operating system error log may provide more detail. This is a severe 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."

I have tried the following:
Database consistency checks on all Databases, which come back clean

Stopping SQL Services, deleting the TempDB files and starting them again to recreate the temp DB files since this is the database always referenced

Check the SAN that is hosting the Hyper-V cluster, found a bad hard drive and replaced it, there are no longer any errors on the SAN, but the SQL server is still giving me the same error message.

Checked the ILO of the host Server and no hardware errors are being reported.

Checked the event logs for driver errors in the SQL server and cannot find any.

Long story short Event ID 824 is supposed to be either a database error, which I see no signs of or an I/O sub-system which I don't see any signs of. What else should I do what I have not tried already?

In addition, no other databases are having this error besides the tempdb, which is on the same drive as all the other databases, which indicates that it is not a hardware issue, but as I mentioned before, I have deleted and recreated the Tempdb files which indicates that it is not a database issue.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,074 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,849 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 103.5K Reputation points MVP

    The load on the tempdb files is not the same as on the database files. That could explain why you only see the issue with the tempdb files. At least so far.

    It's kind of telling that you found a bad hard drive. How come that it was in bad shape? A driver that has been doing bad things with it? Because, as you say, the error suggests that the I/O subsystem is faulty.

    One thing I would consider is to move tempdb elsewhere, maybe to a disk that is local to the Hyper-V host. If you no longer get the 824 error, that's a strong indication that the SAN has a problem.

    Obviously, doing this kind of experimentation on a production system is not always possible.

    0 comments No comments

  2. Seeya Xi-MSFT 16,451 Reputation points

    Hi @Bugs_Bunny123 ,

    Welcome to Microsoft Q&A!
    You can refer to this more complete troubleshooting.
    If you encounter error 824, you can try the following resolutions.

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Kurt Sutula 1 Reputation point

    I have performed a health check on our SAN and it says that everything is fine with it. Anything else I can check? The disk that is hosting the sql files is dynamically expanding. Could that have something to do with it?

    0 comments No comments