Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Powershell for DBAs Expand / Collapse
Author
Message
Posted Saturday, May 18, 2013 11:25 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 4:00 PM
Points: 31,181, Visits: 15,627
Comments posted to this topic are about the item Powershell for DBAs






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1454282
Posted Saturday, May 18, 2013 1:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, August 25, 2013 2:09 PM
Points: 1, Visits: 11
Hi Steve,
Just want to say: don't underestimate!
Apart from Microsoft "pushing", major companies like VMWare, Cisco, Citrix, NetApp, Dell and HP have started to offer Powershell interfaces to their main products. Might grow into a real cross platform IT Administration language.
Post #1454289
Posted Saturday, May 18, 2013 2:28 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:21 AM
Points: 26, Visits: 117
In my (rarely humble) opinion, Powershell proficiency is a skill any DBA working with Windows-based servers should acquire. If you have any task that would benefit from automation, it can almost certainly be scripted using Powershell -- Powershell does more than just fill the shell-scripting gap left by Microsoft's abandonment of VBScript, it is as clear an improvement over VBScript as VBScript was over command-shell batch language.

As just one example, I am steadily replacing SSIS packages with Powershell scripts for improved maintainability. Between being able to actually read the logic in a single interface and having much clearer debugging, working with .dstx files in a Visual Studio plug-in seems positively painful in comparison.

For another example, I'm able to use Powershell to automatically synchronize the contents of several file structures on geographically dispersed servers with minimal effort (roughly 3 dozen lines of very readable Powershell code does the trick). And I'm just getting started finding production uses for Powershell.
Post #1454291
Posted Monday, May 20, 2013 9:03 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, October 16, 2014 7:48 AM
Points: 709, Visits: 397
You can add me to the list of POSH believers. I finally got around to looking at it about a year ago and I can honestly say that I regret not looking at it much sooner. I highly recommend the books Learn Powershell in a Month of Lunches and Powershell Toolmaking in a Month of Lunches by Don Jones. I found both books easy to follow and extremely helpful and they facilitated me in getting up and running in a very short period of time.

In only the last year, I've written Powershell scripts to perform the following tasks:
- Report System Inventory
- Monitor SQL Server Performance
- Scramble sensative data for use in a demo
- SQL Server Provisioning

Powershell scripting can make the life of a DBA much easier, and as an added bonus it should translate nicely to a traditional I.T. environment futher leveraging your skillset.



Post #1454579
Posted Monday, May 20, 2013 10:59 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 8:19 AM
Points: 846, Visits: 1,309
I see the potential for Powershell, but I'll admit I'm in Steve's camp. I have a lot of ad-hoc queries and processes that I run much more often than I run things that need to be repeated or run across a bunch of servers. For me, Powershell as a daily use doesn't make as much sense. However, I've used it to easily encrypt/decrypt data, move files around, FTP, launch other processes, and so on. Those are definitely the exceptions for me. It's still in my list of tools to use, but much more sparingly than I use T-SQL in SSMS because of the nature of my work.


Post #1454640
Posted Wednesday, May 22, 2013 2:29 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 22, 2014 7:02 PM
Points: 2,157, Visits: 879
I really want to learn Powershell but until I have a Problem that Powershell solves for me then it just fits into the category of a Solution waiting for a Problem.

David
Post #1455362
Posted Wednesday, May 22, 2013 4:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:50 PM
Points: 5,604, Visits: 3,457
I am a long time fan of PowerShell but we must also realise that we should be applying the right tools for the right jobs. I have seen examples of people trying to write applications in PowerShell or even ETL tasks. In my opinion neither are appropriate uses of PowerShell.

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Post #1455415
Posted Wednesday, May 22, 2013 6:13 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 21, 2014 11:21 AM
Points: 26, Visits: 117
Really? Why not? There are countless open-source applications written in other scripting languages (perl, php, Python).

And what makes ETL in particular unsuitable for scripting?
Post #1455447
Posted Wednesday, May 22, 2013 6:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:50 PM
Points: 5,604, Visits: 3,457
I am not convinced that using PowerShell for these scenarios is applying the most appropriate tool. I am certain that given any description I provide that someone could come up with at least an exception, however, in principle I do not think that it is the best tool for these cases. Of course, this is what usually counts as a guideline as opposed to a rule.

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Post #1455455
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse