SQLskills is giving back to the community with a free seat to their training class in Dallas next month (Feb. 21st – 25th)
To answer Paul Randal’s question of why I should get to win a week of training from SQLskills this is what I have to say:
Plain and Simple. I’m a Second Generation DBA with over a decade of experience with SQL Server. I want some deep level ideas for some new PowerShell scripts to simply tasks for DBAs everywhere. I’ll also spend countless hours telling all my fellow DBAs here in Atlanta what all I learned until they can take it no more and demand this level of top-notch training for themselves!
I’ll get started with the PowerShell scripts right now even. This little script will search twitter for a giver hashtag, in this case: #SQLskills. It will then save everything it finds off to an XML file and then query it:
$SearchHashtag = "sqlskills" $wc = new-object net.webclient $url = "http://search.twitter.com/search.atom?q=%23$SearchHashtag" $OutFile = "c:\temp\Download_$($SearchHashtag)_$([DateTime]::Now.ToString('yyyyMMddHHmmss')).xml" $wc.DownloadString($url) | add-content $OutFile; [xml]$tweetxml = get-content $OutFile $tweetxml.feed.entry | Format-List ($tweetxml.feed.entry).count
You save the results to XML and I have the SSIS package to load it into a database for further analysis 😉
Seriously?? I mean I guess you could call the PowerShell code that I wrote inside of a Inside of an “Execute Process Task”.
… or you could just do this:
$tweetxml.feed.entry | Format-Table -Property published, title