22
You need rules? You need PBM!

You want rules? You need Policy-Based Management!

Embed Size (px)

Citation preview

Page 1: You want rules? You need Policy-Based Management!

You need rules?You need PBM!

Page 2: You want rules? You need Policy-Based Management!

@BorisHristov

Me and My Experience

Page 3: You want rules? You need Policy-Based Management!

Here’s how this will go…

What? How? WOW!

Page 4: You want rules? You need Policy-Based Management!

What’s PBM?

Page 5: You want rules? You need Policy-Based Management!

Policy-Based Management is…

Way to define rules

SQL Server 2008/R2/2012/2014 Feature

Express Edition and higher

(in Express – Limited functionality)

Can be used against 2000 and 2005

… kind of

Page 6: You want rules? You need Policy-Based Management!

How does it work?

Page 7: You want rules? You need Policy-Based Management!

Main components

Facets

Conditions

Targets

Evaluation Modes

PolicyOn demand

On schedule

On change: log only

On change: prevent

Page 8: You want rules? You need Policy-Based Management!
Page 9: You want rules? You need Policy-Based Management!

Nested Triggers

EXEC sp_configure 'nested triggers', 1RECONFIGUREGO

Page 10: You want rules? You need Policy-Based Management!

Microsoft – our Friend

C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Policies

Page 11: You want rules? You need Policy-Based Management!

Advanced policies

Script as a condition!

ExecuteSql(‘Numeric’,

‘SELECT COUNT(*) FROM sys.databases’)

ExecuteWql

('String', 'root\CIMV2',

'SELECT State

FROM Win32_Service

WHERE Name = "SQLAgent$SECOND"')

Page 12: You want rules? You need Policy-Based Management!

Centralized Management Server(your time saver)

Introduced in SQL Server 2008

Available even in Express

Allows you to:

• Run scripts

• Evaluate policies

From one, centralized place…

Page 13: You want rules? You need Policy-Based Management!

Monitoring Policies with Agent Alerts?

Page 14: You want rules? You need Policy-Based Management!

Views

syspolicy_policies

syspolicy_policy_category_subscriptions

syspolicy_policy_execution_history

syspolicy_policy_execution_history_details

syspolicy_system_health_state

syspolicy_conditions

syspolicy_target_sets

syspolicy_object_sets

syspolicy_policy_categories

Page 15: You want rules? You need Policy-Based Management!

DEMOWorking with Policies, Alerts and CMS

Page 16: You want rules? You need Policy-Based Management!

Reporting on PBM!

Page 17: You want rules? You need Policy-Based Management!

The EPM Framework

(yes, it is free!)

Page 18: You want rules? You need Policy-Based Management!

DEMOEnterprise Policy Management Framework

Page 19: You want rules? You need Policy-Based Management!

Shall we end?

Page 20: You want rules? You need Policy-Based Management!

PBM is all about managing your environments even better!

Page 21: You want rules? You need Policy-Based Management!

More resources:

Book: Apress Pro SQL Server 2008 PBM

Pluralsight Course: Auditing SQL Server with PBM

Whitepaper: http://tinyurl.com/7b2w2ug

Enterprise Policy Management Framework:

http://epmframework.codeplex.com/

Page 22: You want rules? You need Policy-Based Management!

Thank you.@BorisHristov

[email protected]

www.borishristov.com