Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2012-05-31 : 04:28:50
|
I have a question regarding Resource Governor.Scenario:-All our users are put into certain [user groups], these [user groups] are than assigned to our servers.We then assign each [user group] certain permissions against each database on the servers.-------------------------I now want to use Resource Governor to limit the CPU power for each [user group].Can I assign those [user groups] levels of MAX_CPU_PERCENT through the normal method (create resource pool, create workload group, create function (where the [user groups] will be set to the workload group) , set resource governor to function)?Or will I need to explicitly name each user within the function (instead of the [user groups])? |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-05-31 : 04:33:03
|
No, it is the outcome from the "user group assignment function" that you will use as names in RG. N 56°04'39.26"E 12°55'05.63" |
|
|
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2012-05-31 : 04:45:43
|
Ah, OKSo in my function, where i state:-.....IF SUSER_NAME() IN ('group1', 'group2', 'group3') SET @myval = 'use50percentonly'RETURN @myval....I would need to change to reflect the actual users within those groups, i.e......IF SUSER_NAME() IN ('user1ingroup1', 'user2ingroup1', 'user3ingroup1','user1ingroup2', 'user2ingroup2', 'user3ingroup2','user1ingroup3', 'user2ingroup3', 'user3ingroup3') SET @myval = 'use50percentonly'RETURN @myval....So I am picking up the actual users id and not the [user group] set up for access to the server that they are in.Hmmmmmmmmm, makes for a lengthy function if that is the case. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-05-31 : 10:18:18
|
RETURN SUSER_NAME() N 56°04'39.26"E 12°55'05.63" |
|
|
|
|
|
|
|