SQLvariations: SQL Server, a little PowerShell, maybe some Hyper-V Rotating Header Image

SQL Server 2008

Quick Blog: What’s Missing From SQLPS

imageLast week Norm Kelm ( blog | twitter ) asked me on twitter ‘What cmdlets/features are missing from SQLPS.exe? Get-Snapin, etc. Where’s a doc that explains?’   To get the cmdlet half of this answer is somewhat easy in PowerShell using Compare-Object but it made me realize this is one of the many PowerShell tips that I have failed to blog about yet!  I plan to fix that next year with a deluge of blog posts but why wait until next year right?

To get a very fast answer to this answer I opened up PowerShell.exe because while I normally demo in PowerShell_ISE.exe, I don’t use a profile in PowerShell.exe (more on that in a later post).  I ran this command to get the count of just the cmdlets.

(get-command -CommandType Cmdlet).count

image

Then I fired up SQLPS.exe (typically found in C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn) and ran the same command (after switching out of SQL Server and over to the C drive; no idea why that was necessary).

image

The only problem here is that it’s not really 236 – 130 = 106 because SQLPS.exe adds 5 cmdlets that I made sure to exclude (along with everything else I normally use) from PowerShell.exe. 

To get a more accurate list of the cmdlets and which one has what I decided to write a script that everyone con run on their own machine.  One of the many cool features of PowerShell is that you call call it’s executable and pass it a -command or even a –file.  I went ahead and threw together this simple command below so that you can see the differences yourself.

Note: I assume you are running Windows 7 which comes with PowerShell 2.0

$SQLPS=SQLPS.exe -command "CD C:\; get-command -CommandType Cmdlet | select CommandType, Name; exit";
$PSTwo=powershell.exe -command "get-command -CommandType Cmdlet | select CommandType, Name; exit";

Compare-Object -ReferenceObject $SQLPS -DifferenceObject $PSTwo|
Export-CSV C:\temp\SQLPSCommandDifferences.csv -NoTypeInformation

Now all that you have to do is open up that csv file that was just created (C:\temp\SQLPSCommandDifferences.csv) and have a look. 

Note: I could have just displayed the info inside of my PowerShell window by leaving off the last line and the pipe but then I would have needed to do something to format the output so I went with the CSV file instead.

For more information on this topic be sure to check out Chad Miller’s post on it.

Speaking at the PASS Summit Today

IMG00373-20101109-0818I’ll be speaking at the PASS Summit at 3pm today in room 2AB. Due to the size and shape of the room I’ll be using a different slide deck than I uploaded to the PASS website a few weeks ago so I wanted to make sure that was available to everyone. I also wanted to go ahead and post the scripts that I’m planning on using so that people can follow along if they want.

IMG00372-20101109-0817

SQL MVP Denny Cherry Speaking at AtlantaMDF

We’re excited to announce that SQL Server MVP Denny Cherry ( blog | twitter ) will be speaking at our next Atlanta MDF meeting!  :-)

Topic: Database Virtualization
We’ll be looking into the pros and cons of moving SQL Servers into a virtual server environment.  Specifically we’ll be looking into when it’s a good idea and when it’s probably not a good idea.  Like all problems in the database world there are no hard set answers as to if virtualization is a good idea, but there are some times when virtualizing a SQL Server is a good idea, and can save you some money.  There are some other times when you will be shooting yourself in the foot and shouldn’t.  We’ll be focusing on when how to make this decision, and how to gather the metrics that you need in order to come to this decision.

Denny_Cherry About Denny:
Denny Cherry has over a decade of experience managing SQL Server, including MySpace.com’s over 175 million user installation, one of the largest in the world. Denny’s areas of technical expertise include system architecture, performance tuning, replication and troubleshooting.  Denny currently holds several Microsoft Certifications related to SQL Server as well as being a Microsoft MVP.  Denny is a longtime member of PASS and Quest Software’s Association of SQL Server Experts and has written numerous technical articles on SQL Server management.

When:
Monday 10/11/2010 6:30 PM

Where:
1125 Sanctuary Pkwy., Suite 300, Alpharetta, GA 30004

Map picture

SQL Saturday #46 Raleigh Code and Slides

SQLSaturday46Raleigh Well I don’t know about the attendees but I sure had a lot of fun during my PowerShell session at SQL Saturday #46 in Raleigh.  I promised some folks that I would blog out my code and slides that I used ASAP.   Here are the slides I used and more importantly here are the scripts

Grant Fritchey ( blog | twitter ) was nice enough to snap a shot of me telling a Developer in the audience what I thought about how many steps it takes in PowerShell to use ADO.Net :-)

I’ll post some more details about the event later since I want to get this code out however while I’m at it I’d like to mention that:  For the first time in my short speaking career (and quite possibly the last) I had the largest audience of any session in my room. :-D :-D

Early September Free Training from PASS VCs

pass_logoIntroduction to SQL Server Statistics
Designing High Performance I/O for SQL Server
Data Mining with PowerPivot 2010
_____________________________________________________________

Introduction to SQL Server Statistics
September 7th 12:00 PM EDT (GMT -4)

Presenter: Andy Warren

This beginner to intermediate level session will introduce you to statistics, including how to create, manage, troubleshoot, and more! Statistics are a key part of getting solid and repeatable performance and is easily just as important as having indexes. Whether you’re a DBA or trying to get by without one, this session will give you the information you need to know.

Andy Warren

Andy Warren is a SQL trainer focusing on basic administration and performance tuning, he runs the free SQLShare.com training site, is currently a SQL Server MVP, blogs daily at SQLAndy.com, started the SQLSaturday franchise, is co-President of the Orlando SQL Server Users Group, serves as a member of the Board of Directors of PASS, and was a founding partner in SQLServerCentral.com. In his remaining free time he’s working on a book for first time managers.

Live Meeting Link: https://www.livemeeting.com/cc/usergroups/join?id=2CHB5C&role=attend&pw=W%5Dw5%22K45B

_____________________________________________________________

Designing High Performance I/O for SQL Server
September 8th 12:00 PM EDT (GMT -6)
Presenter: Jimmy May

This session attempts to describe the “full story” of SQL Server I/O.  We will start at the hardware level working our way up the stack through Windows and into the SQL Server storage engine.  I aim to provide in depth information about all aspects related to the fundamentals of high performance storage design for SQL Server and best practices on this complex subject.

Jimmy May

Jimmy is a Sr. Program Manager for the SQL Server Customer Advisory Team.  He is the manager of the SQL Server Customer Lab where customers from around the world bring the biggest, fastest, & most interesting SQL Server apps for tuning.  He is a founder of both the Indiana Windows User Group (http://www.iwug.net) and Indianapolis Professional Association for SQL Server (http://www.indypass.org).  Jimmy recently moved to Redmond from Indianapolis, Indiana with his lovely bride, Phyllis, and Fannie May the Wonder Dog.  Subscribe to and read his SQL Server performance and personal productivity blog at http://blogs.msdn.com/jimmymay.  Contact him at jimmymay@microsoft.com or aspiringgeek@live.com.  Jimmy is also part of the rich & robust SQL Server community on Twitter:  www.twitter.com/aspiringgeek.

Live Meeting Link: https://www.livemeeting.com/cc/8000181573/join?id=S29G25&role=attend
_____________________________________________________________

Data Mining with PowerPivot 2010
September 8th 12:00 PM EDT (GMT -4)
Presenter: Mark Tabladillo

Excel provides a compelling and ubiquitous interface for Microsoft Data Mining. With new features available through PowerPivot, business users can apply the technology through a well-designed infrastructure of Microsoft technologies. This presentation will welcome any newcomers to data mining, and provide interactive demos which highlight data mining through these technologies.

Mark Tabladillo

Mark provides consulting and training for data mining with Solid Quality Mentors. He has taught statistics at Georgia Tech and for the graduate business school of the University of Phoenix. In addition to his Microsoft certifications (MCAD .NET and MCT), Mark has years of deep experience with the SAS System, and has presented at many local, regional, and national technical conferences.  Mark produces a data mining resource and blog at http://www.marktab.net

Live Meeting Link: https://www.livemeeting.com/cc/usergroups/join?id=2J4ZPD&role=attend&pw=8QN%40qdzgQ

Columbus and Edmonton Code and Slides

I spoke in Columbus, GA and Edmonton, um…, somewhere in Canada on back to back nights this Tuesday and Wednesday. (I’m kidding, I know it’s in Alberta, and you guys like the Jets right? ;-) ) I used the same slide deck for both sessions; well, for Edmonton I didn’t even use a slide deck, but the scripts I covered were a little different.

image I’ve recently learned that if you only have PowerPoint 2007 you’ll need to download this viewer because I built the slides in PowerPoint 2010. Here are the scripts for Columbus and Edmonton.

I think both events went really well and got a lot of people saying: ‘Hey, this PowerShell stuff could work in my environment’. I really hope they catch the fever! I’d love to speak to each of these groups next year and see what questions they come up with and see how much they’re using it. I’ve got a more advanced session that I will be debuting a little later this year so hopefully I’ll get to share it with them too.

Huge thanks to Jonathan Boulineau ( twitter ) and Colin Stasiuk ( blog | twitter ) for all they do for their groups all year long.

I'll be speaking at the Columbus, GA PASS Chapter

Next Tuesday I’ll be speaking at the Columbus, GA PASS Chapter.  This was actually supposed to be the first time for me to speak at a User Group meeting (as opposed to a SQL Saturday) but duty called in Atlanta this week. 

As always, there will be something new that I’ve never showed off before, most likely just a failed script from my Atlanta session but hey, they didn’t get to see it yet.  :-)   I’ve also been asked to include some sys-admin type stuff so I will do a walk through of Implicit Remoting and probably some important tips on working with Services.  There will also be an XML demo if there are any developers that want to check it out.

Map picture

Details:

Atlanta MDF Code and Slides

We had a great crowd of about 60 people last night at the Atlanta MDF which was really great considering it was the first day of school for a lot of the parents in the area. The crowd had a bunch of great questions and while I couldn’t handle all of them I took several notes and will hopefully blog about the answers as I find them over the next couple of weeks.

imageAs promised, here are the scripts and slides I used.

Resources:
I mentioned several different resources last night and here are the ones I remember (just comment if you’re looking for one I forgot about):