New SQL Server versions upgrade with new Declarative Management Framework (DMF) which policy based system managing one or more server instances, Databases or other Database objects called managed targets. A policy is a DMF condition together with the corresponding behavior and it can contain only one condition.
First before create policy we must have to create condition for policy.
Open SQL Server Management studio and expand Policy Management
Now go to the Policies folder in Policy Management
To test the policy
Expand the Policy Folder and select policy that we created and Evaluate policy(In SQL Server 2008 and previous select Run now) The dialog box notifies you whether the policy fails for existing DB's.
First before create policy we must have to create condition for policy.
Open SQL Server Management studio and expand Policy Management
- R-Click on the condition and select New Condition
- In wizard type condition name and choose facet that you need.In my case I want to apply this condition to all server instances therefore I choose Server Configuration from drop down menu.
- In field select that field that you want and operator and value as you wish.Or else you can use variable as a value. Click Ok and create condition.
Now go to the Policies folder in Policy Management
- R-click Policies and select New Policy
- Type name and select condition from drop down Menu.
- In evolution field select on demand (in My Case) and make other fields as it is on default. and clock OK
To test the policy
Expand the Policy Folder and select policy that we created and Evaluate policy(In SQL Server 2008 and previous select Run now) The dialog box notifies you whether the policy fails for existing DB's.
0 comments:
Post a Comment