Maximizing task automation - Microsoft Center

Paul Filmalter
PFE
Microsoft
DAT307
Everyone is being called on to
administer more servers, databases,
and applications
You’re looking for ways to cope with
keeping your systems up and running
How do you go from what you know
from SQL Server 2000 and 2005…
To taking control of your environment
with the new features in SQL Server
2008 and from our partners?
Agenda
Server Provisioning
DB Mail Review
Using Resource
Governor
Maintenance Plans Flow
PowerShell By Example
PowerShell Subsystem
SQL Sentry
Microsoft IT
http://technet.microsoft.com/en-us/library/bb687798.aspx
MSIT Standard Server Provisioning
21 Day Backup Plan
One disk holds seven days of
backups - one full, and six
days of differentials
Switch disks every seven days
Transaction logs go to a
different disk
Purge on drive rotation
On Demand Jobs
Cleanup backup history
DBCC All
IndexDefrag
UpdateStats
IndexRebuild
Includes exception lists
For SharePoint Index defrag and maintenance, see: http://tinyurl.com/5snm3d
Configuring Database Mail for SQL Agent
What Did We See?
Configuring DB Mail via the wizard
Using Hotmail as your SMTP server
Examples of sending mail
Hooking up SQL Agent to send mail
Agenda
Server Provisioning
DB Mail Review
Using Resource
Governor
Maintenance Plans Flow
PowerShell By Example
PowerShell Subsystem
SQL Sentry
Resource Governor
Shared resources (CPU / Memory / IO)
Concepts
Resource - Physical Resources
Workload - Container for Sessions
Classifier Function - Incoming request classifier
SQL Engine Only
Per Instance
Using Resource Governor to Throttle
Jobs
Resource Governor Recap
Creating Pool and Workload Group for Jobs
Using Classifier Function
Verifying the results
Inside of Maintenance Plans
What Did We See?
Creating Maintenance Plans in SSMS
Using sub plans for segmenting
multi-server plans
Importing plans into SSIS
Debugging plans in SSIS
Exporting plans to another instance and
cleaning up the result
Maintenance Plans Strategies
When to use them
Great for small shops –
create/schedule/forget
Easy way to manage multiple
instances with sub-plans
Easy way to cover all user
database objects with DB
iteration in SSIS
Combined with SSIS
additional functionality
When to avoid them
When you want to share them –
no scripting
When SQL Authentication is your
only option
Agenda
Server Provisioning
DB Mail Review
Using Resource
Governor
Maintenance Plans Flow
PowerShell By Example
PowerShell Subsystem
SQL Sentry
Powershell
Our new scripting way in Windows
Build in most of our new stuff
Run on / Build into
Requires (.NET 2.0)
CMDLETS
Object based
4 Most Important CMD
PowerShell Overview
What Did We See?
Shell profile customization
SQLPS launched from SSMS where server treated
like a drive
Command piping, conditions, sorting, output columns,
output to HTML
Calling WMI to list server instances
Integration with .Net libraries
PowerGUI.Org
Chad Miller’s SQLPSX http://sqlpsx.codeplex.com/
What Did We See?
Shell profile customization
SQLPS launched from SSMS where server treated
like a drive
Command piping, conditions, sorting, output columns,
output to HTML
Calling WMI to list server instances
Integration with .Net libraries
PowerGUI.Org
Chad Miller’s SQLPSX http://sqlpsx.codeplex.com/
Using the PowerShell Agent Subsystem
What Did We See?
Review of Agent’s subsystems
Using the PowerShell subsystem
Executing script fragments
Executing script files
Using a proxy account for script execution
Enterprise Policy Based Management on CodePlex scripts http://www.codeplex.com/EPMFramework
Note
Each job step launching sqlps consumes ~20MB
SQLSentry for SQL Server
http://www.sqlsentry.net
SQLSentry Chaining, Eventing, and Queuing
Check out ActiveBatch.Com
Centralized Job Scheduling
SQL Job management
Execution history
Job designer
PS Script integration
In the Vendor Expo Hall
Recap
Server Provisioning
DB Mail Review
Using Resource
Governor
Maintenance Plans Flow
PowerShell By Example
PowerShell Subsystem
SQL Sentry
South African SQL Server Usergroup
Meet monthly, 3rd Tuesday evening at
Microsoft’s Offices in Bryanston
Current leads: Paul Filmalter and Gail Shaw
Get your copy autographed
by Lynn or Stephen
Monday, 3rd 17:00 to 18:00
Intersoft Book Shop
Resources
Tech·Ed Africa 2009 sessions will be
made available for download the week
after the event from: www.tech-ed.co.za
www.microsoft.com/teched
www.microsoft.com/learning
International Content & Community
Microsoft Certification & Training Resources
http://microsoft.com/technet
http://microsoft.com/msdn
Resources for IT Professionals
Resources for Developers
10 pairs of MP3
sunglasses to be won
Complete a session
evaluation and
enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.