Resource Governor CLASSIFIER_FUNCTION

  • How do I create CLASSIFIER_FUNCTION in MS SQL 2008 Resource Governor using Windows NT groups (not SQL users)

  • CREATE FUNCTION [dbo].[LAFclassifier] ()

    RETURNS SYSNAME WITH SCHEMABINDING

    AS

    BEGIN

    DECLARE @GroupName SYSNAME;

    SET @GroupName = 'default';

    IF IS_MEMBER ( 'ACCOUNTING\SQLAdministrators' ) = 1

    SET @GroupName = 'GroupMax';

    ELSE IF SUSER_SNAME() = 'TestFull'

    SET @GroupName = 'GroupMax';

    ELSE IF SUSER_SNAME() = 'Test1Half'

    SET @GroupName = 'Group1Half';

    ELSE IF SUSER_SNAME() = 'Test2Half'

    SET @GroupName = 'Group2Half';

    RETURN @GroupName;

    END;

    GO

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply