Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Resource governor always uses default Work Load Group


Resource governor always uses default Work Load Group

Author
Message
Thinky Night
Thinky Night
SSC-Enthusiastic
SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)

Group: General Forum Members
Points: 136 Visits: 307
When I setup resource governor with the below script, Both two user uses default Workload Group?

Where do i do some mistake?


CREATE RESOURCE POOL PoolBO
WITH(
MAX_CPU_PERCENT=100,
MAX_MEMORY_PERCENT=100,
MIN_CPU_PERCENT=80,
MIN_MEMORY_PERCENT=80
);
GO
CREATE RESOURCE POOL PoolVIP
WITH(
MAX_CPU_PERCENT=20,
MAX_MEMORY_PERCENT=20,
MIN_CPU_PERCENT=0,
MIN_MEMORY_PERCENT=0
);
GO

CREATE WORKLOAD GROUP WorkloadGroupBO
USING PoolBO

CREATE WORKLOAD GROUP WorkloadGroupVIP
USING PoolVIP
GO

USE master
GO

-- create logins to separate users into different groups
-- note that we disabled strong password checking for demo purposes
-- but this is against any best practice
CREATE LOGIN UserMarketing WITH PASSWORD = 'UserMarketingPwd', CHECK_POLICY = OFF
CREATE LOGIN UserVIP WITH PASSWORD = 'UserVIPPwd', CHECK_POLICY = OFF

CREATE FUNCTION dbo.CLASSIFIER_V1()
RETURNS SYSNAME
WITH SCHEMABINDING
AS
BEGIN
DECLARE @WorkloadGroup AS SYSNAME
IF(SUSER_NAME() = 'UserVIP')
SET @WorkloadGroup = 'WorkloadGroupVIP'
ELSE IF (SUSER_NAME() = 'UserMarketing')
SET @WorkloadGroup = 'WorkloadGroupBO'
ELSE
SET @WorkloadGroup = 'default'
RETURN @WorkloadGroup
END
GO

ALTER RESOURCE GOVERNOR
WITH (CLASSIFIER_FUNCTION = dbo.CLASSIFIER_V1)
GO

ALTER RESOURCE GOVERNOR RECONFIGURE
GO
MyDoggieJessie
MyDoggieJessie
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4862 Visits: 7363
I know this sounds weird, but try setting the classifier function = NULL beforehand, then assign it
ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = NULL);
GO
ALTER RESOURCE GOVERNOR RECONFIGURE;
GO



Then run:
ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION =dbo.CLASSIFIER_V1)
GO
ALTER RESOURCE GOVERNOR RECONFIGURE
GO

I've had a similar issue before, not sure if there's a bug in there or not

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search