a primer for keeping your environment in shape. sql server 2008 policy based management by scott...

10
A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

Upload: hilary-bishop

Post on 02-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE.

SQL Server 2008 Policy Based Management

Page 2: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Let Me Introduce Myself

Database Administrator / Developer with RSI 15 years immersed in database technologiesSpecialize in database architecture,

performance improvements, automation, and providing useful Business Intelligence solutions within various industries.

[email protected]@Finnalist on twitter

Page 3: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Goals

Understand the overall concept and benefits of Policy Based Management

Learn some key terms and definitionsHow to create and run a policy scan and

understand the outputWhat to do when a policy scan detects a

difference

Page 4: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

What is Policy Based Management

A fully integrated system within SQL Server for managing entities and settings on SQL Server instances.

Manage pre-approved settings across your SQL environment Database Mail Settings Enforcing naming conventions

Manage Microsoft Best Practices for SQL Server Default Trace Settings Guest Permissions Settings

Page 5: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Some Key Terms – The Foundation

Managed Target: An instance of the SQL Server Database Engine, a database, a table, or an index. Can be a hierarchy, for example, all the tables in the database owned by the HumanResources schema.

Facet: A set of logical properties that model the behavior or characteristics for certain types of managed targets.

Policy-Based Management condition: A Boolean expression that specifies a set of allowed states of a Policy-Based Management managed target with regard to a management facet.

Policy-Based Management policy: A Policy-Based Management condition and the expected behavior, for example, evaluation mode, target filters, and schedule. A policy can contain only one condition. Policies can be enabled or disabled.

Policy-Based Management policy category: A user-defined category to help manage policies. Users can classify policies into different policy categories. A policy belongs to one and only one policy category. Policy categories apply to databases and servers. At the database level, the following conditions apply:

Effective policy: The effective policies of a target are those policies that govern this target. A policy is effective with regard to a target only if all the following conditions are satisfied: The policy is enabled. The target belongs to the target set of the policy. The target or one of the targets ancestors subscribes to the policy group that contains

this policy.

Page 6: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Modes

There are four types of evaluation modes On Demand

As the name says – runs when needed / invoked On Change Prevent

Intercepts a change and reverts that change back to a known state

On Change Log Only Intercepts a change allows change through yet logs that

change Automated

Check process can be scheduled though SQL Server Agent Job

Page 7: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Create the process

First Step – Create the conditionConditions are items you wish to checkFor example – Names of database files or Database names1. Name the condition2. Select the facet3. Create the expression

Page 8: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

Create the process - continued

Create the policy that holds the facetSelect and refine the check conditionSelect the evaluation role

On-demand On-schedule On-change prevent On-change log only

Select server restrictionEnable the policy

Page 9: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

What Next?

Scripting Policies for multiple environmentsRobust Alerting SolutionsRefining your policiesImporting Best Practices FacetsQuestions?

Page 10: A PRIMER FOR KEEPING YOUR ENVIRONMENT IN SHAPE. SQL Server 2008 Policy Based Management By Scott Abrants

By Scott Abrants

What Have We Learned?

Discussed what Policy Based Management is and how you can benefit from it.

Learned the core terms and functions of Policy Based Management.

Created our own policies, conditions, and categories.

Reviewed how differences are alerted.