SQL Server error 822 ("could not start I/O operation") means your database engine cannot access the disk where it stores files. This usually happens due to disk failures, corruption, or incorrect permissions. The quickest working solution is to restart Windows Services > SQL Server. If that fails, you’ll need deeper troubleshooting: check disk health, repair filegroups, and adjust I/O settings. Without immediate action, the server may remain blocked, preventing user access and replication.

What You'll Need

  • A Windows PC running SQL Server (2012+)
  • Administrator privileges (to restart services and modify permissions)
  • Disk monitoring tools (optional: Windows Disk Management, CrystalDiskInfo, or third-party tools like HDDScan)
  • SQL Server Configuration Manager (if you need to modify service properties)

Step-by-Step

  1. Restart SQL Server Services
    1. Open Services.msc (press Win+R, type "services.msc", then hit Enter).
    2. Find and right-click SQL Server (MSSQLSERVER) or your instance name
    3. Select Restart (do not stop first—this may cause data loss).

    If this fails: Error 822 returns immediately—proceed to the disk health check below.

  2. Check Disk Health and Filegroups
    1. Open Disk Management (Win+X > Disk Management) and verify all SQL Server data files (*.mdf, *.ldf) are on a healthy disk.
    2. If any disk shows red lights (failed/smart errors), note the drive letter (e.g., D:).
    3. Open Command Prompt as admin and run: chkdsk D: /f (replace D: with your drive letter).
    4. If chkdsk finds errors, run it again during the next reboot and repair files.

    If the disk is failing: Rebuild the filegroups:

    1. In SQL Server Management Studio (SSMS), expand Databases > right-click your database > Tasks > Database Properties.
    2. Go to the Files tab and select the problematic filegroup.
    3. Click Move > choose a new disk (if available) or let it stay on the original disk.

  3. Repair Corrupted Log Files
    1. If the .ldf file is corrupted, open SSMS > expand Databases > right-click your database > Restore.
    2. Select Database > New (for a full restore) or choose the log file manually.
    3. Check Options and ensure Keep the database as read-only is unchecked.

    Alternative: Delete the old log file and recreate it:

    1. Stop SQL Server services (not restart—this may lose transactions).
    2. Delete the .ldf file (e.g., C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\YourDB.ldf).
    3. Restart SQL Server services.

  4. Adjust I/O Settings (Advanced)
    1. Open SQL Server Configuration Manager > SQL Server Network Configuration > .
    2. Right-click TCP/IP > Properties > IP Addresses tab.
    3. Ensure Enable TCP/IP is checked. Under TCP Port, set to 1433 (default).

    If disk I/O is throttled: Edit SQL Server’s registry keys to prioritize I/O:

    1. Open regedit > navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp\IPAll
    2. Set EnableIODirect to 0 (if using a fast disk).
    3. Restart SQL Server.

Common Mistakes

  • Stopping SQL Server before restarting: This risks transaction log corruption. Always restart services first.
  • Ignoring disk warnings: If the drive shows smart errors, errors during chkdsk, or physical damage, the filegroup must be rebuilt or moved.
  • Deleting critical log files without stopping SQL Server: Always stop services first to avoid data loss.
  • Modifying registry keys without testing: Always back up the registry before editing SQL Server keys.

Tips

  • Prevent future issues: Enable Automatic Data Warehouse Maintenance and set up alerts for disk space.
  • For recurring I/O errors, consider a RAID array or solid-state drive (SSD) for SQL Server data files.
  • If using a separate OS disk (e.g., VM), ensure the OS and SQL Server disks are on fast, separate storage.
  • Monitor disk health with tools like CrystalDiskInfo (free) to detect failing SSDs.
  • If the error persists after disk checks, check for conflicting applications accessing the same disk (e.g., antivirus, virtual machines).

Troubleshooting

If restarting and chkdsk didn’t work:

  1. Check for pending jobs
    1. Open SSMS > Jobs tab. Look for failed jobs that might block access.
    2. Stop and delete any blocked jobs.
  2. Verify file permissions
    1. Right-click the SQL Server data folder (e.g., C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA).
    2. Open Properties > Security. Ensure SYSTEM and LOCAL SERVICE have full control.
  3. Test with a minimal database
    1. Create a blank database with minimal files (no logs or tempdb).
    2. Start SQL Server on this database to isolate the issue.

    If this works, the original database may have metadata corruption.

  4. Reinstall SQL Server (last resort)
    1. Backup your database files to an external drive.
    2. Uninstall SQL Server from Control Panel > Programs.
    3. Reboot, then reinstall SQL Server from the original media.
    4. Import the backup files after installation.

Frequently Asked Questions

Why does SQL Server error 822 keep happening?

This error repeats when the disk holding SQL Server files fails, is corrupted, or is accessed by multiple processes. Common causes include:

  • Hard drive failing or failing smart attributes.
  • Corrupted log files (.ldf) or metadata.
  • Insufficient disk space (even if free, fragmented files can cause delays).
  • Conflicts with antivirus or other applications.

How do I know if my disk is failing before SQL Server starts?

Use these tools to check disk health before the error occurs:

  • Windows Event Viewer: Look for storage or disk errors in Windows Logs > System.
  • CrystalDiskInfo (free): Scan for red lights or failing SSDs.
  • Disk Management: Red exclamation marks indicate failures.

What if I can’t restart SQL Server services?

If SQL Server refuses to restart, try these steps:

  1. Open Command Prompt as admin and run: sc stop MSSQLSERVER (replace MSSQLSERVER with your instance name).
  2. Force restart using Task Manager (right-click SQL Server process > End Task).
  3. If the process won’t end, use Taskkill /F /IM sqlservr.exe.

Can I fix this error without SQL Server Management Studio?

Yes:

  1. Use Diskpart to check file system errors (run chkdsk /f in CMD).
  2. Reboot the machine and run chkdsk during startup (it may require a manual reboot).
  3. For registry fixes, use regedit with backup precautions.

What happens if I delete the log file (.ldf) without stopping SQL Server?

Avoid this! Deleting the log file while SQL Server is running causes a transaction log corruption, leading to data loss. Always stop SQL Server services first.

How do I prevent this error in the future?

Implement these safeguards:

  • Use separate disks for OS, SQL Server data, and logs.
  • Enable SQL Server’s built-in maintenance plans (backups, index rebuilds).
  • Monitor disk space and health with alerts.
  • Avoid running SQL Server on a thin RAID 5 or RAID 10 (unless properly configured).