Multi-Facetted Policies

  • Hello All,

    I have a general question on Policy Conditions... Is it feasible to create a condition that evaluates more than one Facet?

    For example, let's say I wanted to create a policy that would evaluate the max degree of parallelism setting alongside the number of CPU's present on the server. Is there a way to create a condition using both the Server Configuration (@MaxDegreeOfParallelism) and Server (@Processors) facets?

    I can't seem to do this via the "Create New Condition" wizard, and it seems I'm unable to combine two conditions within the same policy. Also, extracting the DDL for existing conditions didn't provide me insight as to whether or not this can be accomplished.

    If the version info helps, I'm testing this scenario on SQL Server 2008 R2 Developer Edition with SP1 installed.

    Thanks in advance for your responses.

    ~Rusty

  • Bumping this thread.

  • rustroot1 (4/19/2012)


    Hello All,

    I have a general question on Policy Conditions... Is it feasible to create a condition that evaluates more than one Facet?

    For example, let's say I wanted to create a policy that would evaluate the max degree of parallelism setting alongside the number of CPU's present on the server. Is there a way to create a condition using both the Server Configuration (@MaxDegreeOfParallelism) and Server (@Processors) facets?

    Not to my knowledge. For server-level facets it's pretty straightforward...the Condition is evaluated against a server and that's it. One Condition per Policy is how all mine are setup.

    For database-level facets like Table you have the option to add Conditions to the evaluations done inside the iteration process. For example I can have a policy based on the Table facet that checks to see if it is a @IsSystemObject = True, and then when I create the policy using that condition, since there is an iteration process that goes on (i.e. "for each table check this condition") I can also have a Condition added that says "only check tables in this database".

    I can't seem to do this via the "Create New Condition" wizard, and it seems I'm unable to combine two conditions within the same policy. Also, extracting the DDL for existing conditions didn't provide me insight as to whether or not this can be accomplished.

    If the version info helps, I'm testing this scenario on SQL Server 2008 R2 Developer Edition with SP1 installed.

    I also attached the definition for the Policy shown in the image in case you want to import it and check out the Conditions and Policy. I am also using 2008R2 + SP1.

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

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

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