Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Jason Carter

Jason Carter has spent most of his career as a .NET developer, with time spent as a development manager, accidental DBA, and most recently a full-time DBA. Having worked with large databases as a developer, he found great interest in tuning, tweaking, and making databases run faster. With the support of his wife, he gave up his managerial duties, jumped the development ship and dove head first into his new career as a Database Administrator.

Powershell Goodies

If you haven’t seen some of the other blog post, or the Microsoft Powershell Blog, Microsoft recently release Script Browser for Powershell ISE.   This little addin allows you to quickly search and import Powershell scripts directly from TechNet Script Center.    Currently the database section has 577 scripts in the repository, with over 9100 in the total repository.  There’s a pretty good chance that someone has a script for what you want to do.  Alternatively, if you are just getting started with Powershell, this is a great way to review others scripts and learn.

Try this, have you ever wanted to resize your TempDB to recommended number of files and sizes?  Search for ‘TempDB’    You should come up with Resize the TempDB database using PowerShell  from my coworker, Michael Wells (b | t).      Michael presents this as a function that will output the T-SQL to resize your TempDB.  Combine this with the better Invoke-SqlCmd2  from Powershell MVP Chad Miller (b) and you could easily loop and apply this to all your SQL Servers.  (Note: I do not recommend resizing TempDB like this on existing servers, we use this script to setup new servers to a standard base level)

Speaking of new servers, you can combine the vast array of scripts available from the script center, with the power of SPADE for SQL Server, also by Michael Wells, to automate the deployment of your SQL Servers.  With this combination and alittle time for getting things setup properly, you can easily end up fully standardized SQL Servers in a matter of minutes.  Since I work with Michael, I have used SPADE extensively, as well as wrote Powershell scripts for it to run, needless to say, I am a big fan of the project.  Guestimating the number of installs I’ve done with SPADE, I ended up somewhere around 300 installs over the last year.  It is an awesome tool, if you haven’t picked up on that from this paragraph.

If you use Powershell, check out these tools.  If Powershell isn’t currently in your tool belt, I highly recommending getting started.

Comments

Leave a comment on the original post [jason-carter.net, opens in a new window]

Loading comments...