Summary: In this blog, we will discuss SQL Server error 825 that surfaces when a read operation had to be reissued at least one time. Also, we will discuss what causes the error and how it can be fixed. We will also talk about the impending risk of data loss or database corruption associated with error 825, and how you can overcome it by using Stellar Repair for MS SQL software. You can ascertain the software accuracy by downloading its free trial version from here:
When working on SQL Server database, you may receive an alert on the Server for error 825. The error message reads as follows:
Msg 825, Level 10, State 2, Line 1.
A read of the file ‘%ls’ at offset %#016I64x succeeded after failing %d time(s) with error: %ls. Additional messages in the SQL Server error log and system event log may provide more detail. This error condition threatens database integrity and must be corrected. Complete a full database consistency check (DBCC CHECKDB). Many factors can cause this error; for more information, see SQL Server Books Online.
SQL Server Error 825 – What it is and What causes it?
SQL error 825 is a read-retry (I/O) error introduced in SQL Server 2005. It occurs when a read operation fails, and SQL Server has to retry the operation until it succeeds. Essentially, the error indicates that SQL Server tried a couple of attempts (max 4) to read the data before it completed reading it.
How to Fix SQL Server Error 825?
Follow the steps provided in the sequence below to resolve the problem:
Step 1 – Diagnose SQL Error 825
To diagnose the SQL error 825, you need to find more details about it. Check the SQL Server Error Log or system event log to find more information about the error.
Step 2 – Check Health of the Disk Hardware
Check the health of your disk system, as the underlying problem could be related to storage devices such as disks, disk controllers, disk drivers, or array cards.
Step 3 – Contact Your Hardware Manufacturer
Get in touch with the disk manufacturer to check the status of your disk system and ask for latest driver updates.
Step 4 – Move the SQL Database File to a New Physical Drive
If the problem was with your disk hardware, try moving all the SQL database files to a new physical drive. To do so, perform these steps:
1. Add a new Drive to your machine (call it as E)
Note: Make sure that the new drive has sufficient disk space for storing SQL database files, just like the drive currently in use.
2. Create the same folder structure, on the new drive, as on the drive containing the database file (D drive).
3. Stop the SQL Service.
4. Move all the files from D drive to E drive.
5. Next, swap drive letters (D > Y, E > D, Y > E)
6. Start the SQL Service again.
Note: When restarting SQL Service, you might get permission errors. If so, make sure to set permissions accordingly.
The above steps-of instructions will help you fix SQL error 825. But, as discussed above, the SQL 825 error threatens database integrity. And so, you must run DBCC CHECKDB to check the logical and physical consistency of SQL db pages, index relationships, system table referential integrity, and other structural checks.
If DBCC CHECKDB reports corruption in the SQL database, you can restore the db from the last known good back-up copy. But, if the back-up is not available or corrupted, DBCC provides multiple repair options to fix SQL database corruption.
However, using DBCC CHECKDB with the REPAIR_ALLOW_DATA_LOSS command can cause data loss. Also, it may fail to repair severely corrupted database files. In that case, use a specialized SQL repair tool such as Stellar Repair for MS SQL to repair and restore the database while maintaining data integrity.
Watch the video to know the process to restore the database by using Stellar Repair for MS SQL Tool.
SQL Server I/O error 825 indicates that the read operation failed to complete in the first attempt, and the operation had to be reissued. The error occurs due to problems with the disk hardware and can be fixed by checking disk health and running the latest driver updates. If the disk is faulty, try moving all the database files to a new physical drive.
If error 825 has resulted in corruption in the SQL database, run DBCC CHECKDB and check if it reports corruption errors. If it does, try restoring your db from the back-up copy. If the back-up is not available, you will need to repair the db using DBCC CHECKDB repair options. A better alternative is to use Stellar Repair for MS SQL software to repair the corrupt database.