Editorials

Application of PowerShell Technologies…

Application of PowerShell Technologies…
David has been using PowerShell to great advantage – take a look at some of his feedback, and of course his blog:

"I been using Powershell for about 18 months now. A lot of what I’ve done is on my blog: http://www.sqlautopowershell.blogspot.com/ . I’ve had the good fortune of being able to unleash Powershell at SAB Miller, the largest brewer of beer in the world. They have just over 200 SQL servers nationwide in South Africa and about 580 servers in total. I use powershell to gather information about these servers that is not readily available in SCCM or SCOM. Besides info gathering I use it to deploy code to multiple servers, fix configuration problems and a number of other tasks. With Powershell, 200 servers, is just a text file with 200 entries and a foreach loop. J

Above I mentioned information gathering. One such piece of info I gather is database growth over time. I use powershell to deploy the stored procedure that gets this information from the msdb system tables. I then use powershell to gather this information daily by calling the SP on each server and inserting this information into a DBA management database. From one report, I can view database growth over time for over 1500 databases. http://sqlautopowershell.blogspot.com/2009/04/tracking-database-growth-over-time.html .

So in most of my scenario’s I use powershell as the glue. It deploy’s the magic, which for the db growth over time, is the T-SQL code. It then gathers this information and inserts it into a table from which I can run reports. In some scenario’s though it is also the magic, like in my article on retrieving disk space, disk size, and fragmentation percentage. These three metrics are almost never reported on together. So what if a 500GB partition has 200GB(40%) free. If the partition is heavily fragmented, SQL performance and disk IO will suffer. My article http://sqlautopowershell.blogspot.com/2009/05/retrieving-partition-size-freespace-and.html describes how I gather this information. I then also insert this information into my management db and report off it using reporting services."

Featured Script
Using SQL DML to Script HTML Markup
Use SQL DML to script HTML markup, such as, options for an HTML select box and or a comma delimited strings for use as a Java… (read more)