4/19/2017 7:23 PM © 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.
Tech·Ed North America 2009 Paul Filmalter PFE Microsoft DAT307 4/19/2017 7:23 PM Microsoft SQL Server Automation on Steroids, Including PowerShell Support Paul Filmalter PFE Microsoft DAT307 © 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.
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?
Maximizing task automation 4/19/2017 Agenda Server Provisioning DB Mail Review Configure Using Resource Governor Maintenance Plans Flow Control PowerShell By Example PowerShell Subsystem SQL Sentry Execution Maximizing task automation
4/19/2017 7:23 PM partner Microsoft IT http://technet.microsoft.com/en-us/library/bb687798.aspx © 2007 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.
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 4/19/2017 7:23 PM demo Configuring Database Mail for SQL Agent © 2007 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.
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
Maximizing task automation 4/19/2017 Agenda Server Provisioning DB Mail Review Configure Using Resource Governor Maintenance Plans Flow Control PowerShell By Example PowerShell Subsystem SQL Sentry Execution Maximizing task automation
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 4/19/2017 7:23 PM demo Using Resource Governor to Throttle Jobs © 2007 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.
Resource Governor Recap Creating Pool and Workload Group for Jobs Using Classifier Function Verifying the results
Inside of Maintenance Plans 4/19/2017 7:23 PM demo Inside of Maintenance Plans © 2007 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.
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
Maximizing task automation 4/19/2017 Agenda Server Provisioning DB Mail Review Configure Using Resource Governor Maintenance Plans Flow Control PowerShell By Example PowerShell Subsystem SQL Sentry Execution Maximizing task automation
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
demo PowerShell Overview 4/19/2017 7:23 PM © 2007 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.
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 4/19/2017 7:23 PM demo Using the PowerShell Agent Subsystem © 2007 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.
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 4/19/2017 7:23 PM partner SQLSentry for SQL Server http://www.sqlsentry.net © 2007 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.
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
Maximizing task automation 4/19/2017 Recap Server Provisioning DB Mail Review Configure Using Resource Governor Maintenance Plans Flow Control PowerShell By Example PowerShell Subsystem SQL Sentry Execution Maximizing task automation
question & answer
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 Required Slide Speakers, www.microsoft.com/teched TechEd 2009 is not producing a DVD. Please announce that attendees can access session recordings from Tech-Ed website. These will only be available after the event. 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 International Content & Community www.microsoft.com/learning Microsoft Certification & Training Resources http://microsoft.com/technet Resources for IT Professionals http://microsoft.com/msdn Resources for Developers
10 pairs of MP3 sunglasses to be won Required Slide 10 pairs of MP3 sunglasses to be won Complete a session evaluation and enter to win!
Required Slide 4/19/2017 7:23 PM © 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. © 2007 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.