paul filmalter pfe microsoft dat307 everyone is being called on to administer more servers,...

37

Upload: thomasine-benson

Post on 23-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Microsoft SQL Server Automation on Steroids, Including PowerShell Support Paul Filmalter

PFEMicrosoftDAT307

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

PowerShell By ExamplePowerShell SubsystemSQL Sentry

Execution

Using Resource GovernorMaintenance Plans Flow

Control

Agenda

Server ProvisioningDB Mail Review

Configure

Microsoft IThttp://technet.microsoft.com/en-us/library/bb687798.aspx

partner

MSIT Standard Server Provisioning

21 Day Backup PlanOne disk holds seven days of backups - one full, and six days of differentialsSwitch disks every seven daysTransaction logs go to a different diskPurge on drive rotation

On Demand JobsCleanup backup historyDBCC AllIndexDefragUpdateStatsIndexRebuild

Includes exception lists

For SharePoint Index defrag and maintenance, see: http://tinyurl.com/5snm3d

Configuring Database Mail for SQL Agentdemo

What Did We See?

Configuring DB Mail via the wizardUsing Hotmail as your SMTP serverExamples of sending mailHooking up SQL Agent to send mail

Maximizing task automation

PowerShell By ExamplePowerShell SubsystemSQL Sentry

Execution

Agenda

Using Resource GovernorMaintenance Plans Flow

Control

Server ProvisioningDB Mail Review

Configure

Resource Governor

Shared resources (CPU / Memory / IO)

ConceptsResource - Physical Resources Workload - Container for Sessions Classifier Function - Incoming request classifier

SQL Engine OnlyPer Instance

Using Resource Governor to Throttle Jobs

demo

Resource Governor Recap

Creating Pool and Workload Group for JobsUsing Classifier FunctionVerifying the results

Inside of Maintenance Plansdemo

What Did We See?

Creating Maintenance Plans in SSMSUsing sub plans for segmenting multi-server plansImporting plans into SSISDebugging plans in SSISExporting plans to another instance and cleaning up the result

Maintenance Plans Strategies

When to use themGreat for small shops – create/schedule/forgetEasy way to manage multiple instances with sub-plansEasy way to cover all user database objects with DB iteration in SSISCombined with SSIS additional functionality

When to avoid themWhen you want to share them – no scriptingWhen SQL Authentication is your only option

Maximizing task automation

PowerShell By ExamplePowerShell SubsystemSQL Sentry

Execution

Agenda

Using Resource GovernorMaintenance Plans Flow

Control

Server ProvisioningDB Mail Review

Configure

Powershell

Our new scripting way in WindowsBuild in most of our new stuffRun on / Build into Requires (.NET 2.0)CMDLETSObject based4 Most Important CMD

PowerShell Overviewdemo

What Did We See?

Shell profile customizationSQLPS launched from SSMS where server treated like a driveCommand piping, conditions, sorting, output columns, output to HTMLCalling WMI to list server instancesIntegration with .Net librariesPowerGUI.OrgChad Miller’s SQLPSX http://sqlpsx.codeplex.com/

What Did We See?

Shell profile customizationSQLPS launched from SSMS where server treated like a driveCommand piping, conditions, sorting, output columns, output to HTMLCalling WMI to list server instancesIntegration with .Net librariesPowerGUI.OrgChad Miller’s SQLPSX http://sqlpsx.codeplex.com/

Using the PowerShell Agent Subsystemdemo

What Did We See?

Review of Agent’s subsystemsUsing the PowerShell subsystemExecuting script fragments Executing script filesUsing a proxy account for script execution

Enterprise Policy Based Management on CodePlex scripts - http://www.codeplex.com/EPMFramework

NoteEach job step launching sqlps consumes ~20MB

SQLSentry for SQL Serverhttp://www.sqlsentry.net

partner

SQLSentry Chaining, Eventing, and Queuing

Check out ActiveBatch.Com

Centralized Job SchedulingSQL Job managementExecution historyJob designerPS Script integration

In the Vendor Expo Hall

Maximizing task automation

PowerShell By ExamplePowerShell SubsystemSQL Sentry

Execution

Recap

Using Resource GovernorMaintenance Plans Flow

Control

Server ProvisioningDB Mail Review

Configure

question & answer

South African SQL Server Usergroup

Meet monthly, 3rd Tuesday evening at Microsoft’s Offices in BryanstonCurrent leads: Paul Filmalter and Gail Shaw

Get your copy autographed by Lynn or StephenMonday, 3rd 17:00 to 18:00Intersoft Book Shop

www.microsoft.com/teched

International Content & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources Tech·Ed Africa 2009 sessions will be made available for download the week after the event from: www.tech-ed.co.za

Complete a session evaluation and enter to win!

10 pairs of MP3 sunglasses to be won

© 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.