I’m encountering the following error in the SQL Server error log:
2024-12-03 11:21:01.860 spid568 Error: 10982, Severity: 16, State: 1.
2024-12-03 11:21:01.860 spid568 Failed to run resource governor classifier user-defined function 'dbo.fn_Classifier'. Last error 3602, state 118. See previous errors in SQL Server error log from session ID 568 for details. Classifier elapsed time: 0 ms.
Observations:
- The classifier function is used in Resource Governor.
- Error 3602 typically relates to invalid conditions or state in SQL Server.
- The error suggests that the function failed during classification, preventing proper processing.
My Questions:
What are the common causes for a classifier function to fail in Resource Governor?
Are there any best practices I should follow to ensure classifier functions execute correctly?
What steps can I take to troubleshoot this issue? Are there specific diagnostic tools or approaches to isolate the root cause?
Defenition :
CREATE FUNCTION fn_Classifier
()
RETURNS sysname
WITH SCHEMABINDING
AS
BEGIN
DECLARE @ReturnValue AS sysname;
IF (SUSER_NAME() NOT IN (N'##MS_PolicyTsqlExecutionLogin##',N'aaaaa',N'bbbbb',N'bbbbbb',N'ccccc',N'fffff'
)
AND SUSER_NAME() NOT LIKE N'%App%'
)
SET @ReturnValue = 'Productionuser_WLG';
ELSE
SET @ReturnValue = 'default';
RETURN @ReturnValue;
END;
GO
Any guidance would be greatly appreciated. Thank you!
dbo.fn_Classifier
master
database? Which exact build number of SQL Server is thisselect @@version
Are you having any other issues, such as memory pressure, hardware issues, issues logging in, etc? Are there any other logs that might be relevant or unusual?Microsoft SQL Server 2022 (RTM-CU12-GDR)(KB5036343)Core-based (64-bit)
. This server is the primary AG node and there is also a secondary node. This server has about 300 2GB style databases. Often this error is also thrown:The client was unable to reuse a session with SPID 136, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
@Charlieface