How to fix Error 1860 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 1860 — “Task Has Been Aborted”

Why This Error Happens

Error 1860 in SQL Server 2025 typically occurs when a background task—such as a scheduled job, maintenance plan, or replication process—is forcibly terminated due to resource contention, a broken dependency chain, or an unexpected service interruption. This often stems from insufficient worker threads in the SQL Server scheduler, a deadlock that the system resolves by killing the task, or corrupted job metadata in the msdb database. On Windows Server 2025 / Windows 11, this can also be triggered by abrupt service restarts or Windows Update interrupting the SQL Server Agent service mid-execution.

Step-by-Step Resolution Guide

Step 1: Verify SQL Server Agent and Service Health

  • Open SQL Server Configuration Manager and confirm the SQL Server Agent service is running without interruption.
  • Check Windows Event Viewer under Applications and Services Logs > MSSQLSERVER for correlating shutdown or restart events.
  • Run EXEC msdb.dbo.sp_help_job to review job history and confirm whether the abort correlates with a specific job execution.

Step 2: Inspect and Increase Worker Thread Allocation

  • Open SQL Server Management Studio (SSMS) and run:
  EXEC sp_configure 'max worker threads';
  • If the value is too low relative to active connections, increase it:
  EXEC sp_configure 'max worker threads', 0; -- 0 allows SQL Server to auto-manage
  RECONFIGURE;
  • Restart the SQL Server service for changes to take effect via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER.

Step 3: Repair Corrupted Job Metadata in msdb

  • Run a consistency check against the msdb database:
  DBCC CHECKDB ('msdb') WITH NO_INFOMSGS, ALL_ERRORMSGS;
  • If corruption is found, restore msdb from a known good backup or recreate the affected job using SQL Server Agent > Jobs > New Job.

Step 4: Check for Deadlocks or Blocking Sessions

  • Query active blocking sessions:
  SELECT * FROM sys.dm_exec_requests WHERE blocking_session_id <> 0;
  • Enable the Deadlock Graph via Extended Events to capture future occurrences:
  CREATE EVENT SESSION DeadlockMonitor ON SERVER
  ADD EVENT sqlserver.xml_deadlock_report
  ADD TARGET package0.event_file(SET filename='DeadlockMonitor.xel');

Step 5: Update SQL Server 2025 Cumulative Patches

  • Navigate to Windows Update or the Microsoft Update Catalog and confirm the latest Cumulative Update (CU) for SQL Server 2025 is installed.
  • Apply the patch and restart the server during a scheduled maintenance window.

Alternative or Verification Steps

  • Re-run the previously failed job manually via SQL Server Agent > Jobs > Start Job at Step and confirm it completes without triggering Error 1860.
  • If the issue persists, enable Verbose Logging on SQL Server Agent (SQLAGENT.OUT) to capture a more detailed stack trace for deeper analysis with Microsoft Support.