Download presentation
Presentation is loading. Please wait.
1
PowerShell is Happening FOR REAL THIS TIME!!!
Aaron Nelson
2
PowerShell for Data Professionals
By Aaron Nelson SQLvariant.com My Blog SQLPS.com PowerShell VC of PASS sqlps.io/video PoSh VC YouTube channel Copyright 2016 By Aaron Nelson
3
PowerShell VC of PASS Join the conversation with us on Trello
sqlps.io/vote If you want to make SSMS better you can do that too! sqlps.io/ssms
4
The SQL Provider is Object Explorer, just at the command line
Object Explorer Details (F7) is a wonderful compliment to Object Explorer itself. Lets Traverse and look at indexes
5
Trying out a new session today
A whole lot has changed in the ~14 weeks. Your feedback is extremely important to me
6
Today is about inspiration
I’m not going to trot out every awesome script I have I’m going to show you some cool things Then I’d like to hear what you’d like to do if you could wave a magic wand (because I know a guy… and a gal)
7
Don’t freak out about the syntax
You know T-SQL and you can still use it! (Invoke-SqlCommand) Although, that’s usually the point PowerShell has SELECT WHERE AND JOIN, just for starters
8
This next demo IS NOT ABOUT BACKUPS.
Hopefully you’re using Ola scripts to backup your databases Which you can of course deploy with PowerShell
9
Backup All Databases Get-SqlDatabase -ServerInstance localhost | Backup-SqlDatabase Get-SqlDatabase -ServerInstance localhost | Backup-SqlDatabase -CompressionOption On Get-SqlDatabase -ServerInstance localhost | Where { $_.Name -ne 'tempdb' } | Backup-SqlDatabase -CompressionOption On
10
Lets just backup the ones we like
OGV with the –PassThru parameter is your friend Let’s do that across multiple instances
11
How do I know what cmdlets are out there?
Get-Command -Module SQLPS Get-Command -Module SQLPS -ParameterName Database Get-Help Get-Help Backup-SqlDatabase -Examples
12
Who likes reading through the error log?
Who checks it every day? Who likes picking through there looking for a single word. Every. Single. Day.
13
Methods & Properties Methods are Verbs Properties are Adjectives
You Put Properties in your WHERE clause I meant Filter Properties using Where-Object You can see a ton of Properties already in Object Explorer Details
14
Want to Migrate your SQL instace?
DBAtools.io Copyright 2016 By Aaron Nelson
15
What if you want to Compact some indexes?
Great idea But what if you wanted to compact just some of those indexes? DATA_COMPRESSION_ROW.ps1
16
Use Snippets You have lots of great ideas to make things in your environment better. Use the Snippets feature in PowerShell and create Snippets for Multi-Server Multi-Database Multi-Table Multi-Index Don’t forget that you can create one snippet for Prod servers and a different snippet for QA servers
17
Microsoft is Listening
They have listened to the community They have hired a full time engineer for PowerShell in SQL Server They are still listening We setup a Trello board to help organize the community’s thoughts & voices The SQL Tools team comments on that Trello board. They ask questions Give us status updates Ask us if we’d like automated fries with that.
18
PowerShell for Data Professionals
Aaron Nelson SQLvariant.com My Blog SQLPS.com PowerShell VC of PASS Copyright 2016 By Aaron Nelson
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.