SQL Server error 825 means a disk request failed and then worked on a retry. SQL Server returned your data but the disk is failing and the database can become corrupt. Five methods resolve the error and they are a disk and driver check, DBCC CHECKDB, a backup and restore, a file move and recovery software. Start with the disk check because it costs nothing and touches no data. Copy your database files before any repair.
SQL Server error 825 is a read retry error. SQL Server failed to fetch a page on the first attempt and succeeded on a later attempt. Microsoft states that the error points to a major problem with the disk hardware.
Your query still finishes and SQL Server error 825 raises no alarm. Microsoft warns that the disk problem could cause data loss or database corruption if you do not resolve it.
Five fixes follow in order from the safest to the riskiest. You also get the checks to finish before fixing and the problems that slow the work. Damaged files get a dedicated tool.
What is SQL Server Error 825?
Error 825 appears when SQL Server fails to fetch data from a database file and then succeeds after it reissues the request. Microsoft states that the error does not indicate a SQL Server problem and that the disk system causes it.
SQL Server records a message like the sample below in the error log.
A read of the file 'E:\SQLData\FinanceDB.mdf' at offset 0x000000010a4000 succeeded after failing 2 time(s) with error: incorrect checksum (expected: 0x7c1d2e3f; actual: 0x2b4a5c6d). This error condition threatens database integrity and must be corrected.
Every part of the message answers one question.
| Message Part | Meaning |
|---|---|
| File name | The database file where the failed read happened |
| Offset | The position inside the file where the request started |
| Failing time(s) | The number of attempts that failed before one succeeded |
| Error text | The reason the failed attempts failed |
Errors 823 and 824 sit next to error 825 and signal a worse state. Compare all three before you choose a fix.
| Error | What Happened |
|---|---|
| 823 | Windows reports a failed disk operation to SQL Server |
| 824 | Windows reports success and SQL Server finds bad page data |
| 825 | A request failed and worked on a repeat after SQL Server reissued it |
SQL Server records error 825 as an informational message with severity 10 so the error passes unnoticed without an alert. Microsoft gives no severity on its error page and SQLskills gives the value.
What Causes SQL Server Error 825?
Microsoft names four parts of the disk system and adds that many factors can cause the error. Reasons that cause error 825 are:
- Failing Disks. Disks that start to fail return bad data on some requests and good data on the repeat.
- Disk Controllers. A faulty controller sends damaged data to SQL Server until a repeat request succeeds.
- Array Cards. One array card manages several disks so a fault affects every database file on the array.
- Disk Drivers. Outdated drivers mishandle the data that moves between Windows and the disk.
- Other Factors. Microsoft states that many factors cause the error so the system event log can list related events.
What to Check Before You Fix SQL Server Error 825?
Six facts need your check before you execute any query:
- File Name. Note the database file in the message because the fix starts with that file and the volume under it.
- Offset. Note the offset to see whether later messages point to the same area of the file.
- Failure Count. The count shows how many failed attempts came before the success.
- Repeats. Search the error log for more 825 messages because repeats show a disk that is getting worse.
- Event Log. Open the Windows System log and find disk events with the same time stamp as the message.
- Backup. Find your last full backup and the log backups that follow it.
Use the statement below to list every 825 message in the current SQL Server error log.
EXEC sys.sp_readerrorlog 0, 1, N'succeeded after failing';
Use 1 or 2 in place of 0 to search older error logs.
Stop the SQL Server service or set the database offline before you copy the MDF and LDF files. Save the copies on a different volume because a failing disk can damage the copy too.
5 Methods to Resolve SQL Server Error 825
There are five methods to resolve the error. Let's check the safest option first and then the options that move more data.
| Feature | Disk Check | DBCC CHECKDB | Backup and Restore | File Move | Recovery Software |
|---|---|---|---|---|---|
| Cost | Free | Free | Free | Free | Demo with 25 records in every table plus paid license |
| Fixes the cause | Yes | No | Yes | Yes | No |
| Needs | Admin access to the server | Query access | Space on a healthy volume | Downtime | Copy of the MDF file |
| Main risk | Hardware updates need manufacturer tools | Long scan on a large database | Data after the backup is lost | Files are unavailable while offline | Paid export |
Check your system's compatibility before downloading the recovery software. Software requirements are .NET Framework 4.5 or higher, 4 GB of RAM and 100 MB of free storage. Supported systems are Windows 7, 8, 10 and 11 plus Server 2008, 2012 R2 and 2016.
Method #1: Check the Disk and Drivers (Free, Start Here)
Microsoft lists the disk system as the first place to look. Checks that find the fault are:
- Open Event Viewer, expand Windows Logs and select System.
- Find disk, controller and driver events that share the time stamp of the 825 message.
- Execute
chkdsk D:in an elevated Command Prompt to see the status of the volume. Without parameters chkdsk displays the status and fixes nothing. - Execute
chkdsk D: /scanfor an online scan when the volume uses NTFS. - Add /f or /r only after you stop the SQL Server service because both options need exclusive access to the volume. Windows asks to schedule the check for the next restart when files are open.
- Contact the disk manufacturer for the latest status utilities and driver updates and install the updates.
Note. No SQL Server setting fixes error 825 because Microsoft places the cause in the disk system.
Method #2: Confirm the Damage With DBCC CHECKDB (Free, Safe Check)
Microsoft tells you to finish a full consistency check when error 825 appears. DBCC CHECKDB shows whether the failed attempts left damaged pages in the database.
DBCC CHECKDB (N'FinanceDB') WITH NO_INFOMSGS;
- Select New Query in SSMS and choose the database that logged the error.
- Execute the statement and wait for the scan to finish.
- Check the output. SSMS shows a success message and no error lines for a healthy database.
- Note the minimum repair level on the last line when CHECKDB lists errors.
- Check other databases that use the same volume because the same disk stores their files.
Note. CHECKDB scans every page so execute it outside business hours on large databases. Our Logical Consistency Error Guide explains page restores and repairs for the errors that CHECKDB lists.
Method #3: Verified Backup and Restore to Healthy Storage (Free, Safest Move)
Backups with CHECKSUM verify every page and a restore places the database on a disk that works. Microsoft documents COPY_ONLY for a backup that does not disturb your regular backup chain.
BACKUP DATABASE [FinanceDB]
TO DISK = N'F:\Backup\FinanceDB_825.bak'
WITH CHECKSUM, COPY_ONLY, STOP_ON_ERROR;
STOP_ON_ERROR ends the backup when a page checksum fails. Verify the backup file next.
RESTORE VERIFYONLY
FROM DISK = N'F:\Backup\FinanceDB_825.bak'
WITH CHECKSUM;
Restore the backup to a new database name on healthy storage.
RESTORE DATABASE [FinanceDB_Healthy]
FROM DISK = N'F:\Backup\FinanceDB_825.bak'
WITH MOVE N'FinanceDB' TO N'G:\SQLData\FinanceDB_Healthy.mdf',
MOVE N'FinanceDB_log' TO N'G:\SQLData\FinanceDB_Healthy_log.ldf',
RECOVERY;
- Save the BAK file on a volume other than the failing volume.
- Replace the logical names and the paths with the values of your database.
- Execute
DBCC CHECKDB (N'FinanceDB_Healthy')and switch your applications to the new database after the output lists zero errors. - Use Method #5 when the backup stops with a checksum error because damaged pages exist.
Note. RESTORE VERIFYONLY confirms that the backup set and its volumes are readable. RESTORE VERIFYONLY cannot verify the structure of the data inside.
Method #4: Move the Files Without a Restore (Free, Needs Downtime)
Microsoft documents a planned relocation of user database files inside the same instance. Find the logical file names first.
SELECT d.name AS database_name, f.name AS logical_name, f.physical_name, f.state_desc
FROM sys.master_files AS f
JOIN sys.databases AS d ON d.database_id = f.database_id
WHERE d.name = N'FinanceDB';
Point every file to the new path and take the database offline before you copy the files.
ALTER DATABASE [FinanceDB]
MODIFY FILE (NAME = FinanceDB, FILENAME = N'G:\SQLData\FinanceDB.mdf');
ALTER DATABASE [FinanceDB]
MODIFY FILE (NAME = FinanceDB_log, FILENAME = N'G:\SQLData\FinanceDB_log.ldf');
ALTER DATABASE [FinanceDB] SET OFFLINE WITH ROLLBACK IMMEDIATE;
- Copy the MDF and LDF files to the new folder while the database is offline.
- Give the SQL Server service account permissions on the new folder.
- Set the database online with the statement below and execute the first query again to confirm the new paths.
- Delete the old files only after CHECKDB lists zero errors.
ALTER DATABASE [FinanceDB] SET ONLINE;
Note. The relocation works inside one instance. Use Method #3 to move a database to another server.
Method #5: Recover Damaged Files With EmailDoctor Software (Paid After Demo)
Recovery software suits the case where CHECKDB lists errors and no clean backup exists. EmailDoctor SQL Database Recovery opens MDF and NDF files and previews tables, views, stored procedures and triggers before any export.
Recovery software scans the file directly so you need no T-SQL knowledge to recover the objects. Demo exports stop at 25 records in every table plus 5 other objects.
Scan the MDF Copy
- Launch the recovery software from Start after setup.
- Press Open and browse to the MDF copy that you saved on a healthy volume.
- Choose Quick Scan, enable Auto detect and let the software match the SQL Server release of the file.
- Wait for the scan report and close the note that follows with OK.
- Open a table in the left tree to preview its records.
Export the Recovered Objects
- Choose Export and then Export As SQL Server Database.
- Choose your server name. Use Windows Authentication or choose SQL Server Authentication and type the login details of the account.
- Select Create New Database and type FinanceDB_Rebuilt as the name.
- Tick the database components and select With Schema & Data.
- Click Export. Acknowledge the finished export with OK and press Close.
- Execute
DBCC CHECKDB (N'FinanceDB_Rebuilt')in SSMS and save a full backup of FinanceDB_Rebuilt after the check.Select Advanced Scan when the scan tree shows fewer tables than you expect. Our Corrupt MDF File Repair Guide explains both scan modes.
How to Set an Alert for SQL Server Error 825?
Error 825 passes unnoticed because the message sits in the error log as an informational entry. SQL Server Agent notifies you the moment the message appears. Create the operator first and execute the statements below in the msdb database.
USE msdb;
GO
EXEC dbo.sp_add_alert
@name = N'Error 825 Read Retry',
@message_id = 825,
@severity = 0,
@enabled = 1,
@delay_between_responses = 300,
@include_event_description_in = 1;
GO
EXEC dbo.sp_add_notification
@alert_name = N'Error 825 Read Retry',
@operator_name = N'DBA Team',
@notification_method = 1;
- Permission. By default only members of the sysadmin role execute sp_add_alert.
- Message ID. Set @severity to 0 when you use @message_id because Microsoft accepts only one of the two.
- Delay. The value 300 waits five minutes between responses so a burst of messages sends one email.
- Event Log. Only errors that SQL Server saves in the Windows application log cause an alert. Confirm it with the query below.
SELECT message_id, severity, is_event_logged
FROM sys.messages
WHERE message_id = 825 AND language_id = 1033;
Troubleshooting Common SQL Server Error 825 Problems
Problems that slow down the work on error 825 are:
- CHECKDB Lists Errors. Damaged pages exist so follow the repair steps in our DBCC Repair Troubleshooting Guide.
- Errors Return After the Move. The new volume shares a controller or an array card with the old volume so choose storage on a separate controller.
- Backup Stops With a Checksum Error. Pages are already damaged so use Method #5 on a copy of the database file.
- Database Refuses to Go Offline. Open connections use the database so add WITH ROLLBACK IMMEDIATE to the statement.
- Database Does Not Come Online After the Move. The service account has no permission on the new folder so grant it access.
- No Alert Arrives. The operator has no email address or the message is not in the Windows application log.
Frequently Asked Questions
Is SQL Server Error 825 Serious?
Yes. Your query finishes but the disk system failed a request and Microsoft states that the disk problem could cause data loss or database corruption if you do not resolve it. Start with the disk check and a verified backup.
Does Error 825 Mean the Database is Corrupt?
No. SQL Server received good data on the retry. Execute DBCC CHECKDB anyway because the error message asks for a full consistency check.
Do Errors 823 and 825 Mean the Same Thing?
No. Windows reports a failed operation in error 823 while error 825 shows a request that failed and worked on a repeat after SQL Server reissued it. Both errors point to the disk system.
Can I Ignore Error 825 if It Appears Once?
No. One message shows that the disk failed once and the message text states that the condition must be corrected. Search the error log for repeats and check the System log in Event Viewer.
Does Restarting SQL Server Fix Error 825?
No. Restarting the service does not repair the disk and the same failing requests return. Fix the disk system instead.
Does a Backup Fix Error 825?
No. Backups protect your data but the failing disk remains in place. Restore the backup to healthy storage as Method #3 shows.
Can DBCC CHECKDB Repair Error 825?
No. CHECKDB reports damaged pages and its repair options fix those pages but they do not repair the disk behind the failed requests. Fix the hardware first and use repair only for the errors CHECKDB lists.
Do I Need to Stop SQL Server to Move the Database Files?
No. Only the database goes offline in Method #4 and the instance continues to serve other databases. Users of the moved database lose access until you set it online again.
Can Recovery Software Handle a Database File From a Failing Disk?
Yes. Copy the MDF file to a healthy volume first and scan the copy because scanning the original adds stress to the failing disk. Both scan modes display the recoverable objects in a preview.
Does the Free Demo Export Every Record?
No. Demo exports are limited to 25 records from every table and 5 other objects. Buying a license removes the limit.
Author’s Verdict
Error 825 is the earliest warning that a disk is failing. SQL Server returned your data this time so act before a request fails for good.
Check the disk and the drivers first and confirm the pages with CHECKDB. Move the database to healthy storage with a verified backup.
Use EmailDoctor recovery software when CHECKDB lists errors and no clean backup exists. Create the alert so the next 825 message reaches you the same day.
- Error 825 means a disk request failed and then worked after a retry.
- Microsoft places the cause in the disk system.
- Execute DBCC CHECKDB after every 825 message and move the database to healthy storage.
- Recovery software processes a duplicate of the damaged MDF file and exports the previewed objects into a fresh database.
Next Read: Fix Error 824 in SQL Server
Also Read: Corrupt SQL MDF File Repair | Track Suspect Pages in SQL Server