You need rules? You need PBM!

  • 1,580 views
Uploaded on

You need to enforce rules in your SQL Server environment? You need to strictly monitor who breaks or tries to break them? If so, you need Policy-based Management! Learn how this technology can help …

You need to enforce rules in your SQL Server environment? You need to strictly monitor who breaks or tries to break them? If so, you need Policy-based Management! Learn how this technology can help your resolve many of your problems!

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,580
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Be a better DBA
  • How does it work? – Facets, Conditions, Policies, Demos, CMSEPM – Enterprise policy based management frameworkWhat is coming – Denali + Azure
  • Brent Ozar:TEST - PASS OR FAIL
  • Limited functionality – CMS, on-demand only (no Agent in Express)No all facets are available for all versions. No all features are available in all version, so test! In 2000 – no DDL triggers! On change prevent – does not work! EPM – Стъпва на SQL Server, Reporting Services, MDW and Powershell (and policy-based management)
  • On change – log – only if an event is generated! On prevent – only AFTER trigger! The example of index rebuild! The trigger fires after finished :D DDL Trigger
  • Auto close will be deprecated! 
  • Execution modeMessage numberOn change: prevent (if automatic) 34050On change: prevent (if On demand) 34051 On schedule 34052On change 34053
  • Count the suspect pages – executeSQLCheck the freespace on the drive WQLCheck if a counter is below a threshold or a data file has slow response time (in ms!)
  • How to add the instance that is the Central server to the monitored -> check donev’s blog! 
  • MSDB - backup, SPs! Queries
  • On-change: prevent mode will fail or perform unexpectedly.DDL triggersCDC and Transactional replication – systanschemas no indexes
  • Do the import of all policies -> C:\\Program Files (x86)\\Microsoft SQL Server\\110\\Tools\\PoliciesDatabase Backups and CMS – ADD the central to the tree. How? – Donev’s blog! Checking table names and preventing!
  • Only microsoft can add facets! Cannot fail over with the policies – server-based objects! CMS is for that! Availability Database – Exposes properies of the Availability Database objectApplicable Target Types: AvailabilityDatabaseAvailability Group – Exposes properies of the Availability Group objectApplicable Target Types: AvailabilityGroupAvailability Group State – Exposes properies of the Availability GroupApplicable Target Types: AvailabilityGroupAvailability Replica – Exposes properties of the Availability Replica object.Applicable Target Types: AvailabilityReplicaDatabase Replica State – Exposes the properties of physical database replicas participating in an availability group.Applicable Target Types: DatabaseReplicaStateSearch Property List – обвързано е с Full-text indexes. List от свойства, които да бъдат добавени във тези индекси.SELECT Document FROM Production.Document WHERE CONTAINS(PROPERTY(Document,'Title'), 'Maintenance OR Repair'); GO Sequence – http://www.sql-server-performance.com/2011/sequence-sql-server-2011/Server Role – Exposes properties of the ServerRoleobject.Applicable Target Types: ServerRole

Transcript

  • 1. YOU NEEDRULES?YOU NEED PBM!Boris Hristov MCITP DBAIvan Donev MCITP DEV, BI, DBA©2011 Hewlett-Packard Development Company, L.P.The information contained herein is subject to change without notice
  • 2. Our agenda• What is it? Policy – based management?• How does this all work?• What is coming?• Case Study: SQL Server Health Checks• Thank you!2
  • 3. What is PBM?
  • 4. What is PBM? Way to define rules SQL Server 2008/R2/2012 Feature Express Edition and higher (in Express – Limited functionality) Can be used against 2000 and 2005 … kind of4
  • 5. How does it work?
  • 6. Main components Facets Conditions Targets Polic On demand Evaluation Modes On schedule y On change: log only On change: prevent Categories6
  • 7. 7
  • 8. More on policies…Capturing events with Alerts8
  • 9. Advanced policiesExecuteSql(‘Numeric’, ‘SELECT COUNT(*) FROMsys.databases’)http://msdn.microsoft.com/en-us/library/ms188001.aspxScript as a condition!ExecuteWql(String, rootCIMV2,SELECT StateFROM Win32_ServiceWHERE Name = "SQLAgent$SECOND")http://msdn.microsoft.com/en-us/library/bb895209.aspx9
  • 10. Central Management SystemWay to evaluate policies on the whole environment!… with few clicks!10
  • 11. Microsoft – our Friend C:Program Files (x86)Microsoft SQL Server110ToolsPolicies11
  • 12. syspolicy_policy_categorieViews ssyspolicy_policy_category_subscriptions syspolicy_object_se syspolicy_policies ts syspolicy_target_set ssyspolicy_policy_execution_historysyspolicy_policy_execution_history_details syspolicy_conditions syspolicy_system_health_stat e12
  • 13. Nested Triggers EXEC sp_configure nested triggers, 1 RECONFIGURE GO13
  • 14. DEMO
  • 15. What is coming?
  • 16. SQL Server 2012? Availability Database Availability Group Availability Group State 8 new Facets Availability Replica From 76 to 84 Database Replica State Search Property List Sequence Server Role16
  • 17. SQL Azure?Amm… not supported… in the near future!17
  • 18. Case Study:SQL Server Health Checks
  • 19. Customer requirements• Monthly based SQL Server healthcheck – Configuration – Security – Operation details• Approaches – Audit software – Manual checks – EPM Framework• The requirements – Frequency – Graphical interface and drill-down functionality – Compatible with all SQL Server Versions and editions (Standard, Enterprise, Datacenter)19
  • 20. The approach• EPM Framework• Schedule and execution specifics• SQL Server Version Specifics• Reporting20
  • 21. CASE STUDYDEMONSTRATION
  • 22. Shall we end?
  • 23. Final wordsPBM is all about managing YOUR environment even better!23
  • 24. More resources:http://www.mssqltips.com/category.asp?catid=89 – Various articleshttp://www.sqlservercentral.com/articles/Policy+Based+Management/ - Variousarticleshttp://technet.microsoft.com/en-us/sqlserver/gg508904.aspx - MCM Lecturehttp://technet.microsoft.com/en-us/sqlserver/video/gg508903 - MCM DemoBook: Apress Pro SQL Server 2008 Policy – Based ManagementWhitepaper - http://tinyurl.com/7b2w2ugEnterprise Policy Management Framework ->http://epmframework.codeplex.com/24
  • 25. Q&A
  • 26. THANK YOU