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
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
16
-
The CPU Threshold Exceeded event class indicates that Resource Governor detects a query that exceeds the CPU threshold specified for REQUEST_MAX_CPU_TIME_SEC.
17
-
18
-
> [!NOTE]
19
-
> The detection interval for this event is five seconds. It is guaranteed that an event will be generated if a query exceeds the specified limit by at least five seconds. However, if a query exceeds the specified threshold by less than five seconds, its detection might be missed depending on the timing of the query and the time of last detection sweep.
|GroupID|**int**|Group ID where the violation occurred.|66|Yes|
29
-
|OwnerID|**int**|SPID of the process that caused the violation.|58|Yes|
30
-
|SPID|**int**|ID of the server process that fires this event.<br /><br /> Note: This can differ from the actual user SPID if a system thread validates CPU usage as a background task.|12|Yes|
31
-
|StartTime|**datetime**|The time when this event fired.|14|Yes|
The **CPU threshold exceeded** event class indicates that resource governor detected a batch request that exceeds the CPU threshold specified for the `REQUEST_MAX_CPU_TIME_SEC` argument of a [workload group](../resource-governor/resource-governor-workload-group.md). For more information, see [CREATE WORKLOAD GROUP](../../t-sql/statements/create-workload-group-transact-sql#request_max_cpu_time_sec--value).
20
+
21
+
## CPU threshold exceeded data columns
22
+
23
+
| Data column name | Data type | Description | Column ID | Filterable |
24
+
|:--|:--|:--|:--|:--|
25
+
| CPU |**int**| CPU usage in milliseconds.| 18 | Yes |
| GroupID |**int**| Group ID where the violation occurred. | 66 | Yes |
29
+
| OwnerID |**int**| SPID of the process that caused the violation. | 58 | Yes |
30
+
| SPID |**int**| ID of the server process that fires this event.<br /><br /> Note: This can differ from the actual user SPID if a system thread validates CPU usage as a background task. | 12 | Yes |
31
+
| StartTime |**datetime**| The time when this event fired. | 14 | Yes |
Copy file name to clipboardExpand all lines: docs/t-sql/includes/alter-workload-group.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
author: rwestMSFT
3
3
ms.author: randolphwest
4
4
ms.reviewer: dfurman
5
-
ms.date: 01/01/2025
5
+
ms.date: 01/13/2025
6
6
ms.service: sql
7
7
ms.topic: include
8
8
---
@@ -68,11 +68,13 @@ Starting with [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)], the value c
68
68
69
69
#### REQUEST_MAX_CPU_TIME_SEC = *value*
70
70
71
-
Specifies the maximum amount of CPU time, in seconds, that a request can use. *value* must be 0 or a positive integer. The default setting for *value* is 0, which means unlimited.
71
+
Specifies the maximum amount of CPU time, in seconds, that a batch request can use. *value* must be 0 or a positive integer. The default setting for *value* is 0, which means unlimited.
72
72
73
-
By default, resource governor doesn't prevent a request from continuing if the maximum time is exceeded. However, an event is generated. For more information, see [CPU Threshold Exceeded Event Class](../../relational-databases/event-classes/cpu-threshold-exceeded-event-class.md).
73
+
When the maximum CPU time is exceeded, the `cpu_threshold_exceeded` extended event and a trace event are generated. For more information, see [CPU Threshold Exceeded Event Class](../../relational-databases/event-classes/cpu-threshold-exceeded-event-class.md).
74
74
75
-
Starting with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] SP2 and [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)] CU3, and using [trace flag 2422](../database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf2422), resource governor aborts a request when the maximum CPU time is exceeded.
75
+
In Azure SQL Managed Instance, when the maximum CPU time is exceeded, resource governor aborts the request with error 10961.
76
+
77
+
In [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], resource governor doesn't abort the request by default. However, starting with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] SP2 and [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)] CU3, resource governor aborts a request with error 10961 when [trace flag 2422](../database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf2422) is enabled and the maximum CPU time is exceeded.
Copy file name to clipboardExpand all lines: docs/t-sql/includes/create-workload-group.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
author: rwestMSFT
3
3
ms.author: randolphwest
4
4
ms.reviewer: dfurman
5
-
ms.date: 09/15/2022
5
+
ms.date: 01/13/2022
6
6
ms.service: sql
7
7
ms.topic: include
8
8
---
@@ -69,11 +69,16 @@ Starting with [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)], the value c
69
69
70
70
#### REQUEST_MAX_CPU_TIME_SEC = *value*
71
71
72
-
Specifies the maximum amount of CPU time, in seconds, that a request can use. *value* must be 0 or a positive integer. The default setting for *value* is 0, which means unlimited.
72
+
Specifies the maximum amount of CPU time, in seconds, that a batch request can use. *value* must be 0 or a positive integer. The default setting for *value* is 0, which means unlimited.
73
73
74
-
By default, resource governor doesn't prevent a request from continuing if the maximum time is exceeded. However, an event is generated. For more information, see [CPU Threshold Exceeded Event Class](../../relational-databases/event-classes/cpu-threshold-exceeded-event-class.md).
74
+
When the maximum CPU time is exceeded, the `cpu_threshold_exceeded` extended event and a trace event are generated. For more information, see [CPU Threshold Exceeded Event Class](../../relational-databases/event-classes/cpu-threshold-exceeded-event-class.md).
75
75
76
-
Starting with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] SP2 and [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)] CU3, and using [trace flag 2422](../database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf2422), resource governor aborts a request when the maximum CPU time is exceeded.
76
+
In Azure SQL Managed Instance, when the maximum CPU time is exceeded, resource governor aborts the request with error 10961.
77
+
78
+
In [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], resource governor doesn't abort the request by default. However, starting with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)] SP2 and [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)] CU3, resource governor aborts a request with error 10961 when [trace flag 2422](../database-console-commands/dbcc-traceon-trace-flags-transact-sql.md#tf2422) is enabled and the maximum CPU time is exceeded.
79
+
80
+
> [!NOTE]
81
+
> The detection interval for CPU time usage is five seconds. An event is generated if a query exceeds the specified limit by at least five seconds. However, if a query exceeds the specified threshold by less than five seconds, its detection might be missed depending on the timing of the query and the time of last detection sweep.
0 commit comments