• rynmthw3 (1/14/2013)


    I do not think so. SUSER_NAME() does not have a restriction related to Database Users. The function is poorly named. It returns Server Login information.

    What if rather than SUSER_Name()= I use USER_NAME()=

    SUSER_NAME() should be fine.

    In looking at your code a little closer...is SPECIALIZED\SG_DataManagementNormalAccounts a Windows Group? If you are you trying to use a Windows Group name to do the classification that will not work with SUSER_NAME() alone. You would need to use SUSER_NAME() in conjunction with sys.xp_logininfo to verify group membership (assuming SPECIALIZED\SG_DataManagementNormalAccounts had a login in the SQL Server).

    Also when I declare my workloadGroup as SysName I feel like this is causing an issue.... I have played around with it for sometime and it doesnt seem that it is realizing that I'm telling it that these users belong in these Workload Groups...after I configure this I am running queries that are really CPU intensive to lock the server up and come back with an error message to see which pool it is placing me in and it has been the 'default' everytime

    You do not have to run a query to check that the classifier function is working, you just need to log in.

    edit: establish assumption for using sys.xp_logininfo

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato