1

I'd like to create a Policy that checks, on demand, one database in an instance for tables that have no index. I can see how to create a Condition, linked to the 'Database' Facet and checks for my database's GUID. I can also see how to create a Condition, linked to the 'Table' Facet that checks for the presence of an index. When I create a Policy, however, I seem to be able to only check one Condition. I know you can add clauses to Conditions, which would be fine if I didn't have to specify a Facet and so limit my options. Can you not have multiple Conditions in a Policy?

  • The Semantics: A Target is the entity to be managed. A Facet is a predefined set of properties to be managed. A Condition is a property expression that evaluates true or false. A Policy specifies the checking and / or enforcement of a Condition. A Condition can therefore be made up of one or more logical conditions joined by AND / OR. – RoKa May 10 '13 at 12:35
4

You can certainly limit the set of databases that are checked, using a condition, and have that condition be separate from the actual condition the policy is using to check. Pull down the "Every" drop-down in the UI:

enter image description here

Create a new condition:

enter image description here

Then you should be able to use that condition:

enter image description here

Note that this is using the SQL Server 2012 version of Management Studio (which is now completely free, as of SP1). If the UI does not behave this way in the 2008 R2 version of the tools, upgrade your tools.

0

Note that you can use the following expression when setting the condition rule using the Expression grid by specifying:

@Name LIKE ‘ACME_%’

in order to limit the condition to those databases whose names starts with ACME string

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.