In Part2 we discussed WORKLOAD GROUP in detail and traverse through possible number of constants we can use. Using the knowledge we will create workload with more then one resource and see how in conjunction we can limit the resource usage.
Let's start creating a workload using more then one resource
CREATE WORKLOAD GROUP grpDevWITH ( GROUP_MAX_REQUESTS = 50, IMPORTANCE = MEDIUM, REQUEST_MAX_MEMORY_GRANT_PERCENT = 30, MAX_DOP = 1 )
Next create the function so that whenever the RG runs it will call this function to retrieve our group name.
CREATE FUNCTION ResGovMgr () RETURNS SYSNAMEWITH SCHEMABINDINGASBEGIN DECLARE @grpName AS SYSNAME IF (APP_NAME = 'MANAGEMENT STUDIO’) SET grpName = 'grpDeveloper' RETURN grpDeveloperENDNow let the RG aware of this functionALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = ResGovMgr)Don't forget to reconfigure the RG;ALTER RESOURCE GOVERNOR RECONFIGUREWill be back with more on Resource Governor.
Bandagi!
Remember Me
Powered by: newtelligence dasBlog 1.8.5223.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2009, Danish Sami, et.al.
User Group Lead