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
ms.custom: sap:Startup, shutdown, restart issues (instance or database)
7
7
---
8
8
9
-
# SQL Server Agent stops responding when you try to start it
9
+
# SQL Server Agent shuts down unexpectedly when you try to start it
10
10
11
11
This article provides troubleshooting guidance for an issue in which the SQL Server Agent service stops responding or takes longer than you expect when you try to start it. Many different underlying problems can cause this issue. This article covers some of the most common scenarios.
A SQL Server Agent stops responding 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 both of the following scenarios:
19
19
20
20
-**Scenario 1**: The following error message is logged in the System event log:
21
21
> The SQL Server Agent (MSSQLSERVER) service failed to start due to the following error:
@@ -26,63 +26,67 @@ A SQL Server Agent stops responding when you try to start it, or it takes longer
26
26
Additionally, the following entries might be logged in the *SQLAgent.log* file:
-**Scenario 3**: The database engine server displays a SQL Server process ID (SPID) from the "SQLAgent - Generic Refresher" service. Additionally, the following job is displayed as running in the input buffer of the SPID:
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 for that session: `EXECUTE msdb.dbo.sp_sqlagent_refresh_job`
65
+
66
+
You can use the following query to check for such session and text
> When this issue occurs, the SPID is in the RUNNABLE state, and regularly waits for the `PREEMPTIVE_OS_LOOKUPACCOUNTSID` wait type. Or, the SPID 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.
72
78
73
79
## Cause 1: Multiple job entries
74
80
75
-
This issue can occur if multiple job entries exist in SQL Server.
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.
76
82
77
-
> [!NOTE]
78
-
> The issue can also occur if you unintentionally set up multiple subscriptions for your reports in the Reporting Services Configuration Manager.
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.
79
84
80
85
### Workaround
81
86
82
87
To work around this issue, delete the jobs that you don't need.
83
88
84
-
> [!NOTE]
85
-
> 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 Reporting Services Configuration Manager.
86
90
87
91
## Cause 2: ODBC driver missing or corrupted
88
92
@@ -92,7 +96,7 @@ For information about the ODBC driver requirements for different versions of SQL
92
96
93
97
### Solution
94
98
95
-
1. To verify that the ODBC driver is missing, run one of the following commands in an elevated Command Prompt window or PowerShell:
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:
96
100
1. Command prompt:
97
101
98
102
```cli
@@ -135,11 +139,11 @@ For information about the ODBC driver requirements for different versions of SQL
If the ODBC driver isn't listed in the output of the `Get-OdbcDriver` command, then the driver is missing.
142
+
If the SQL Server ODBC driver isn't listed in the output of the `Get-OdbcDriver` command, then the driver is missing.
139
143
140
-
1. Verify that the ODBC driver for SQL Server is missing. <!-- Need to verify with SME what the user should look for to verify the driver is missing -->
144
+
1. Check if the ODBC driver for SQL Server is present
141
145
1. If the driver is missing, go to the next step.
142
-
1. If the driver isn't missing, see [Cause 1](#cause-1-multiple-job-entries).
146
+
1. If the driver is missing, go to [ODBC driver is missing](#sql-server-odbc-driver-is-missing)
143
147
1. [Download the ODBC Driver for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server).
144
148
1. Install the driver by using the GUI or a silent installation.
145
149
1. To perform a silent installation, run the following command:
0 commit comments