Skip to content

Commit 33d43a2

Browse files
authored
re-format
1 parent 4871162 commit 33d43a2

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

support/sql/database-engine/startup-shutdown/sql-server-agent-crashes-upon-start.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ A SQL Server Agent fails when you try to start it, or it takes longer than you e
6363

6464
- **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`
6565

66-
You can use the following query to check for such session and text
67-
68-
```sql
69-
SELECT s.session_id, r.status, r.wait_type, r.wait_time, s.program_name, t.text
70-
FROM sys.dm_exec_requests AS r
71-
RIGHT JOIN sys.dm_exec_sessions s
72-
ON r.session_id = s.session_id
73-
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) t
74-
WHERE s.program_name = 'SQLAgent - Generic Refresher'
75-
```
76-
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.
66+
You can use the following query to check for such session and text
67+
68+
```sql
69+
SELECT s.session_id, r.status, r.wait_type, r.wait_time, s.program_name, t.text
70+
FROM sys.dm_exec_requests AS r
71+
RIGHT JOIN sys.dm_exec_sessions s
72+
ON r.session_id = s.session_id
73+
OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) t
74+
WHERE s.program_name = 'SQLAgent - Generic Refresher'
75+
```
76+
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.
7878

7979
## Cause 1: Multiple job entries
8080

0 commit comments

Comments
 (0)