You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A SQL Server Agent fails when you try to start it, or it takes longer than you expect to start. Additionally, you might experience one or both of the following scenarios:
18
+
A SQL Server Agent fails when you try to start it, or it takes longer than you expect to start. Additionally, you might experience one or more of the following scenarios:
19
19
20
-
-**Scenario 1**: The following error message is logged in the System event log:
20
+
-**Scenario 1**: The following error message is logged in the [System event log](/host-integration-server/core/windows-event-viewer1):
21
21
> The SQL Server Agent (MSSQLSERVER) service failed to start due to the following error:
22
22
> The service did not respond to the start or control request in a timely fashion.
23
-
-**Scenario 2**: The status of the agent appears as "Starting" in Control Panel, and the following error message is logged in the *SQLAgent.log* file:
23
+
-**Scenario 2**: The status of the agent appears as "Starting" in Control Panel, and the following error message is logged in the _SQLAgent.log_ file:
24
24
> An idle CPU condition has not been defined - OnIdle job schedules will have no effect.
25
25
26
-
Additionally, the following entries might be logged in the *SQLAgent.log* file:
26
+
Additionally, the following entries might be logged in the _SQLAgent.log_ file:
-**Scenario 3**: The database engine displays a session_id from the "SQLAgent - Generic Refresher" service and the following job is displayed as query text running in for that session:`EXECUTE msdb.dbo.sp_sqlagent_refresh_job`
64
+
-**Scenario 3**: The database engine displays a session_id from the "SQLAgent - Generic Refresher" service and the following job is displayed as query text running in that session: `EXECUTE msdb.dbo.sp_sqlagent_refresh_job`
65
65
66
-
You can use the following query to check for such session and text
66
+
You can use the following query to check for such session and text:
When this issue occurs, the session is in a RUNNABLE state, and regularly waits for the `PREEMPTIVE_OS_LOOKUPACCOUNTSID` wait type. Or, the session is in a waiting state for the `ASYNC_NETWORK_IO` wait type.
77
+
When this issue occurs, the session is in a _RUNNABLE_ state, and regularly waits for the `PREEMPTIVE_OS_LOOKUPACCOUNTSID` wait type. Or, the session is in a waiting state for the `ASYNC_NETWORK_IO` wait type.
78
78
79
79
## Cause 1: Multiple job entries
80
80
81
-
This issue can occur if a large number of jobs have been configured in SQL Server Agent and with many schedules. This can trigger the Generic refresher task to be continuously activated and thus busy.
81
+
This issue can occur if you configure a large number of jobs in SQL Server Agent with many schedules. This configuration can continuously activate the Generic refresher task, keeping it in busy state.
82
82
83
-
For example, the issue can also occur if you unintentionally set up multiple subscriptions for your reports in the SQL Server Reporting Services Configuration Manager.
83
+
For example, the issue can occur if you unintentionally set up multiple subscriptions for your reports in the [SQL Server Reporting Services Configuration Manager](/sql/reporting-services/install-windows/reporting-services-configuration-manager-native-mode).
84
84
85
85
### Workaround
86
86
87
87
To work around this issue, delete the jobs that you don't need.
88
88
89
-
If there are many job entries because you unintentionally set up many subscriptions, delete the unnecessary subscriptions by using Reporting Services Configuration Manager.
89
+
If there are many job entries because you unintentionally set up many subscriptions, delete the unnecessary subscriptions by using the [Reporting Services Configuration Manager](/sql/reporting-services/install-windows/reporting-services-configuration-manager-native-mode).
90
90
91
91
## Cause 2: ODBC driver missing or corrupted
92
92
93
-
This issue can occur if the SQL Server Open Database Connectivity (ODBC) driver is removed or becomes corrupted (often after system updates). SQL Server Agent uses the SQL Server ODBC driver to connect to SQL Server and if the driver is missing or not functioning, a SQL Server Agent fails to start.
93
+
This issue can occur if the SQL Server [Open Database Connectivity (ODBC)](/sql/odbc/microsoft-open-database-connectivity-odbc) driver is removed or becomes corrupted (often after system updates). SQL Server Agent uses the SQL Server ODBC driver to connect to SQL Server. If the driver is missing or not functioning, a SQL Server Agent fails to start.
94
94
95
95
For information about the ODBC driver requirements for different versions of SQL Server, see [Hardware and software requirements for SQL Server](/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-2025).
96
96
97
97
### Solution
98
98
99
99
1. To check if the SQL Server ODBC driver is missing, run one of the following commands in an elevated Command Prompt window or PowerShell:
100
-
1. Command prompt to launch ODBC Data Source Administrator:
100
+
1. Command Prompt:
101
101
102
102
```cli
103
103
odbcad32.exe
104
104
```
105
105
106
-
1. PowerShell cmd-let:
106
+
This command opens the [ODBC Data Source Administrator](/host-integration-server/core/odbc-data-source-administrator).
107
+
108
+
1. PowerShell:
107
109
108
110
```powershell
109
111
Get-OdbcDriver
110
112
```
111
113
112
-
1. Check if the expected SQL Server ODBC driver is there by comparing to the following table [SQL Server versions and ODBC and OLE DB drivers](/sql/connect/connect-history#sql-server-versions-and-odbc-and-ole-db-drivers). The table lists the SQL Server ODBC driver version shipped with each SQL Server engine and used by SQL Server Agent to connect to SQL Server engine.
113
-
114
-
115
-
1. Check if the ODBC driver for SQL Server is present
116
-
1. If the expected ODBC driver version is present, then you can attempt to repair it's installation. For steps on how to do that, go to [ODBC Driver is present](#sql-server-odbc-driver-is-present)
117
-
1. If the driver is missing, go to [ODBC driver is missing](#sql-server-odbc-driver-is-missing)
114
+
This command outputs a list of the installed ODBC drivers.
118
115
119
-
#### SQL Server ODBC driver is present
116
+
1. Check if the required SQL Server ODBC driver is present by comparing it to the table found in [SQL Server versions and ODBC and OLE DB drivers](/sql/connect/connect-history#sql-server-versions-and-odbc-and-ole-db-drivers). The table lists the version of the SQL Server ODBC driver shipped with each SQL Server engine and used by SQL Server Agent to connect to SQL Server engine.
117
+
1. If the required ODBC driver version is present, repair it by following the steps in [ODBC Driver is present](#odbc-driver-is-present).
118
+
1. If the ODBC driver is missing, install it by following the steps in [ODBC driver is missing](#odbc-driver-is-missing).
120
119
121
-
1. If the ODBC driver is present, open **Add or Remove Programs** in Windows and locate the **Microsoft ODBC Driver XX for SQL Server** where XX is the expected version for your SQL Server.
122
-
1. Click on the three dots and choose **Modify**
123
-
1. In the wizard that start choose the **Repair** option and finish the steps to repair the driver.
124
-
1. After you complete the repair steps, you can test a connection to SQL Server by configuring a test DSN with the repaired SQL Server driver. For more information, see [ODBC Data Source Administrator DSN options](/sql/connect/odbc/windows/odbc-administrator-dsn-creation)
120
+
#### ODBC driver is present
125
121
122
+
1. Open **Add or Remove Programs** and select **Microsoft ODBC Driver \<Driver_Version\> for SQL Server**.
123
+
1. Select the three dots (**...**) and choose **Modify**.
124
+
1. In the wizard that opens, choose the **Repair** option and follow the steps to repair the driver.
125
+
1. After you complete the repair steps, you can test the connection to SQL Server by configuring a test DSN with the repaired SQL Server driver. For more information, see [ODBC Data Source Administrator DSN options](/sql/connect/odbc/windows/odbc-administrator-dsn-creation).
126
126
127
+
#### ODBC driver is missing
127
128
128
-
#### SQL Server ODBC driver is missing
129
129
1. [Download the ODBC Driver for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server).
130
130
1. Install the driver by using the GUI or a silent installation.
131
131
1. To perform a silent installation, run the following command:
0 commit comments