Your SlideShare is downloading. ×
Evaluate Daily Checklist with PBM and CMS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Evaluate Daily Checklist with PBM and CMS

1,754

Published on

This presentation gives an introduction to evaluating a daily checklist against 100+ instances of SQL Server while you get a cup of coffee. It will be given at SQLRally 2011

This presentation gives an introduction to evaluating a daily checklist against 100+ instances of SQL Server while you get a cup of coffee. It will be given at SQLRally 2011

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,754
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
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

Transcript

  • 1. Evaluate your Daily Checklist against 100+ instances of SQL Server while you get a cup of coffee
    John Sterrett (@JohnSterrett)
    http://johnsterrett.com/go/PBM
    5/12/2011
  • 2. Thank you Attendees & Sponsors
  • 3. Titles are set to 34 pt, ArialClick to edit Master title style
    Level 1 text is 28 pt Arial
    Level 2 text is 24 pt Arial
    Level 3 text is 20 pt Arial
    Level 4 text is 20 pt Arial
    Level 5 text is 20 pt Arial
    Session Title
    3
  • 4. I am not an expert but I stayed at a Holiday Inn once….
    Founder of WVPASS (SQL UG)
    I reside in Wheeling, WV (Pittsburgh, PA)
    Work for Orrick Herrington & Sutcliffe LLP
    Responsible 100+ Instances of SQL Server
    Responsible for PeopleSoft
    About Me….
  • 5. My Story….
    BackupsCorruptionFailed mission critical SQL Jobs
    Failed Jobs
    Low Disk Space
    Urgency
    Process improvements
    Continuing education
    Projects
    Index Management
    Performance Tuning
    Pittsburgh Pirates winning the world series
    Everything else…
    Importance
    Comes from The 7 Habits of Highly Effective People by Stephen R. Covey
  • 6. Do you have a daily checklist?
    What is your daily checklist?
    Full backups
    Transactional Log backups
    Free space
    SQL Agents are enabled
    SQL Agent jobs succeeded
    How do you evaluate your daily checklist?
    Central Management Server (CMS)
    Policy Based Management (PBM)
    Daily Checklist Questions
  • 7. Daily Checklist
  • 8. Daily Checklist?
  • 9. Daily Checklist?
  • 10. Job Notifications…..
  • 11. Trust but verify…..
    Is the SQL Agent enabled for all servers?
    Does email operator exist for all jobs?
    Is the operator the same across all servers?
    Is Database Mail enabled for all servers?
  • 12. I prefer notifications and….
  • 13. Similar to local server group except it’s a repository for your team.
    Group database servers
    Environment
    Version
    Location
    Apply scripts against all servers in a group
    Not all checklist items can be validated with PBM
    Can use SQL Server 2008 R2 Express
    Central Management Server (CMS)
  • 14. Which version of SQL should I use?
  • 15. MSDB is used to store servers and groups
    Servers – msdb.dbo.sysmanagement_shared_registered_servers_internal
    Groups – msdb.dbo.sysmanagement_shared_server_groups_internal
    CMS Internals
  • 16. CMS Security
    Security –
    ServerGroupAdministratorRole role can manage the central management server.
    ServerGroupReaderRole role is required to connect to a central management server.
    Windows Authentication of the individual servers is used to execute t-sql and policies.
  • 17. First look at CMS
  • 18. Create Configuration Management Server
    Create Groups
    Register Servers
    Execute scripts against a group
    Find missing backups
    Find failed SQL Agent Jobs
    Check SQL Agent Service is enabled
    DEMO
  • 19. CMS itself cannot automate query execution.
    CMS only supports windows authentication
    Query results are ordered by server name
    Cannot include host server (Unless you use 127.0.0.1 or add port number)
    Query executes for all listed servers. (Includes duplicates)
    CMS Gotchas!
  • 20. Leverage PowerShell to automate CMS
    Aaron Nelson – SQL University PowerShell Week
  • 21. DEMO!
    Automate CMS with PowerShell
  • 22. Policy-Based Management is a system for managing one or more instances of SQL Server 2008 (* BOL).
    Some facets allow you to enforce standards with “On-Change – Prevent”
    Can import and export policies
    Apply changes when evaluation fails
    Policies can run against SQL 2000 & 2005
    Policy-Based Management (PBM)
  • 23. Prevent things from happening Apply changes
    Automate validation of checklists
    Checklists are prone to human error.
    Server configurations can change over time.
    Daily checklist items we will validate
    SQL Agent is enabled
    SQL Agent Jobs
    Full backups
    Transactional Log backups
    Free Space
    I use CMS & PBM to do two things…
  • 24. Targets
    facets
    conditions
    policy
    categories
    server restrictions
    PBM Concepts and Terms
  • 25. PBM Example – Page Verify
    http://www.littlekendra.com/2011/01/25/pageverify/
  • 26. On Demand
    Executed by user or powershell scripts
    On Schedule
    Uses SQL Agent
    On Change – Prevent
    Uses DDL Triggers
    * Nested Triggers should be enabled
    On Change – Log Only
    uses event notification
    For More: http://msdn.microsoft.com/en-us/library/bb510667%28SQL.100%29.aspx
    Evaluation Modes
  • 27. Not all facets support On-change.
    On Change – Log (17)
    On Change – Prevent (12)
    Application Role
    Asymmetric Key
    Database Role
    Endpoint
    Login Options
    Multipart Name
    On-Change Evaluation….
  • Best Practices
    SQL Server 2008 Feature Packs
    C:Program FilesMicrosoft SQL Server100ToolsPoliciesDatabaseEngine1033
    Interwebs
    http://www.mssqltips.com/category.asp?catid=89
    Blogs
    Bing or Google
    Where can I find policies?
  • 35. Policy Alerts
    * On demand cannot be enabled so there are no alerts.
  • 36. Views in MSDB database and dbo schema
    syspolicy_policies
    syspolicy_conditions
    syspolicy_system_health_state
    syspolicy_categories
    syspolicy_policy_category_subscriptions
    syspolicy_policy_execution_history
    syspolicy_policy_execution_history_details
    syspolicy_object_sets
    syspolicy_target_sets
    For more: http://msdn.microsoft.com/en-us/library/bb510742.aspx
    PBM Views
  • 37. PBM - ExecuteSQL
    The ExecuteSql() function can be used against any facet and it'll be executed once for each target in the target set.
    The proxy account is called ##MS_PolicyTsqlExecutionLogin## used for scheduled jobs
    http://blogs.msdn.com/b/sqlpbm/archive/2008/07/03/executesql.aspx
  • 38. Cannot modify or create facets
    Policies fail to read mount points as separate locations
    ExecuteSQL only supports @ObjectName and @SchemaName
    Reporting is very limited out of the box
    On Change-Prevent is limited
    Best Practice Policies may not be best practice for your shop.
    Gotchas!
  • 39. Create a Category
    Import Policies
    Export Policies
    Create Policy
    Evaluate Policy
    On-Demand
    Scheduled
    On Change – Prevent
    On Change – Log
    Apply Policy
    Evaluate Policy on Multiple Servers using CMS
    View Policy History
    PBM Demo!
  • 40. http://epmframework.codeplex.com/
    EPMF leverages
    Central Management Server
    Policy-Based Management
    PowerShell
    XML
    SQL Server Reporting Services
    Reporting - EPM Framework
  • 41.
  • 42. Show EMPF…
    DEMO!
  • 43. All reference material can be found at http://johnsterrett.com/go/PBM
    Books On Line
    Administering Servers by Using Policy-Based Management
    Book
    Pro SQL Server 2008 Policy-Based Management
    White Papers
    Enterprise Policy Management Framework with SQL Server 2008
    SQL Server 2008 Policy-Based Management
    Web
    www.mssqltips.com
    Where you should go from here?
  • 44. Notes (hidden)
    Some speakers may use this slide for hidden notes
    Please delete if you prefer not to use
    Please note you are also able to use notes section for each slide
    Session Title
    38
  • 45. Please Complete the Evaluation Form
    Pick up your evaluation form:
    In each presentation room
    Drop off your completed form
    Near the exit of each presentation room
    At the registration area
    Sponsored by Dell
    Session Title
    39
  • 46. THANK YOU!
    For attending this session and PASS SQLRally Orlando, Florida
    Sponsored by Dell
    Session Code | Session Title
    40

×