SQL Server with Mr. Denny

March 30, 2009  5:01 AM

Did you know?

Denny Cherry Denny Cherry Profile: Denny Cherry

Hopefully you have seen one of the “Did you know” videos that are on the web.  If you haven’t I highly recommend that you do.  I’ve included the four versions which I’ve found below.

I’ve found these videos quite interesting to watch, especially as you watch the different versions and see the numbers being updated and changing over time.  After you watch theses I invite you to talk with people about the message that you got from these videos.  I look forward to your comments either here, on Twitter, via email, or in person.

For those that don’t know the first of these videos was created by Karl Fisch for use at a beginning of the school year meeting.  You can read up more about Karl on his site and more about Shift Happens.

The original (which I uploaded to YouTube to make it easier to view).  In this video he refers to AHS which is the school he teaches at, or at least he did at that time.

[kml_flashembed movie="http://www.youtube.com/v/4FplchaOeuQ" width="425" height="350" wmode="transparent" /]

To this 4 minute and 55 second version.

[kml_flashembed movie="http://www.youtube.com/v/UIDLIwlzkgY" width="425" height="350" wmode="transparent" /]

To this 2007 version which is 8 minutes and 19 seconds long.

[kml_flashembed movie="http://www.youtube.com/v/pMcfrLYDm2U" width="425" height="350" wmode="transparent" /]

To the most recent 2008 version which is 5 minutes and 16 seconds long.

[kml_flashembed movie="http://www.youtube.com/v/jpEnFwiqdx8" width="425" height="350" wmode="transparent" /]

UPDATE: (Yeah I know 4 minutes after I published the origional)

Some other video’s by the same group of teachers.  The first is What If

[kml_flashembed movie="http://video.google.com/googleplayer.swf?docid=-2855786550703993653" width="400" height="326" wmode="transparent" /]

And the second is 2020 Vision

[kml_flashembed movie="http://video.google.com/googleplayer.swf?docid=7281108124087435381" width="400" height="326" wmode="transparent" /]

March 29, 2009  12:05 AM

Viewing the domain groups that are used to get into SQL

Denny Cherry Denny Cherry Profile: Denny Cherry

Last week Linchi Shea wrote a posted a blog entry entitled “How does that AD user account get access to the database?“.  In it Linchi shows a method of finding out the domain groups that a SQL Server user uses to access the database.

There is however an easier, method you can use.

There is a system extended stored procedure called xp_logininfo.  Microsoft was even kind enough to document the procedure for us.  You can use this procedure to see what group a use belongs to, or what users are in a domain group, all from T/SQL.

For example, on my sandbox instance if I run

EXEC xp_logininfo 'CORP\dcherry'

I get a result set which says that I gained my access to the SQL Server via the “BUILTIN\Administrators” group.

This is a nice quick and easy method to see what domain group a user used to access the SQL Server.


March 27, 2009  3:04 AM

Making SSMS Beep

Denny Cherry Denny Cherry Profile: Denny Cherry

Today I read a post from my good friend Colin Stasiuk (aka @BenchmarkIT) where he talked about making SSMS beep when a query has completed.

I didn’t know this was such a well guarded secret.  Which leads me to a story to share.  I had a supervisor (Ed) back at EarthLink who made it a point to have story time during his pre-shift meetings, those were the best days to be working.  I remember that Ed was on vacation once and our assistant supervisor Dennis was running the team.  Well instead of telling us a story, he brought in a kids picture book to read to us.  It was awesome, there were about 80-90 tech support reps all sitting in the break room hanging on every word from a book for 2 year olds.  Funniest sight ever.

But that’s a whole different story than the one I wanted to share.

One one particularly long night at EarthLink, back in 2001 or so (I was using SQL 2000 at the time), I had a lot of database data changes to make (I have no idea why at this point).  Probably business rules had changes so data needed to be changed, and indexes needed to be changed, or something.  Needless to say SQL was going to be running queries all night long.

Well, having already worked 12-16 hours that day, I didn’t really want to stay up all night watching SQL run.  So I cranked up the speakers on the PC as load as they would go (I had some nice speakers so they got loud), and set Windows to as load as it would go (I’m a heavy sleeper) and started the first of the T/SQL Scripts.  I promptly curled up on the floor with my pillow and blanket that I had brought in and went to sleep.  About three hours later I was woken up by the loudest “Windows ping” ever.  It really scared the crap out of me, but it did the job.  I checked what ever it was that needed checked and started the next script.

This happened probably three or four times through out the night.  The next morning I took a shower (we had showers on site for just such nights), and changed my clothes (my wife was kind enough to bring me a change of clothes before she went to bed) and went on with my new work day, after technically pulling an all nighter that I slept through about 99% of.

If only all, all nighters were that easy.


March 26, 2009  3:00 AM

So really, how many clustered indexes can I create on a table?

Denny Cherry Denny Cherry Profile: Denny Cherry

This used to be a very easy question to answer as the answer was 1. However these days, with some creativity you can get some extra ones.

Continued »

March 21, 2009  11:26 PM

What does the community want to see at PASS?

Denny Cherry Denny Cherry Profile: Denny Cherry

So, as you may have heard the SQL PASS 2009 Call for Speakers has gone out.  I’ve submitted a couple of sessions already, but I was hoping to get some feedback from the community at large about what you think I should submit topics on.

I’ve submitted a couple of SQL Service Broker sessions, as well as a session on Storage, and a session on planning a database migration.  I’ve got all sorts of stuff that I could submit, but if no one is interested in it, then there isn’t much point on trying to present those topics.

So I pose this question to you: If you were going to the PASS Summit this year in Seattle what would you like to see presentations on?  Should I leave these sessions up there, or replace them with others?

If you don’t have an account on this site feel free to respond to me on Twitter, my username is @mrdenny.


March 17, 2009  10:50 PM

Slide Decks and Sample code from Quest Day with the Experts

Denny Cherry Denny Cherry Profile: Denny Cherry

The slide decks and sample code that Brent and I presented with have been uploaded.  The recordings have to be edited down, as Live Meeting uses a single large recording, and no one wants to sit through a 5 hour recording, so it’s being broken down into smaller chunks.

The slide decks are hosted via Slide Share and the sample code from my presentation is up on the SQLServerPedia.com servers.


March 17, 2009  11:00 AM

Slide Deck for LA SQL User Group Meeting

Denny Cherry Denny Cherry Profile: Denny Cherry

For anyone that will be attending this weeks LA SQL User Group Meeting over at UCLA, here is the slide deck that I’ll be presenting from.  Feel free to check it out in advance.  If you aren’t attending and have questions feel free to post them here and I’ll get them answered for you as quickly as I can.

See you there.


March 12, 2009  11:00 AM

Back To Basics: Reading an Execution Plan

Denny Cherry Denny Cherry Profile: Denny Cherry

All to often when helping people look at query performance problems I’ll ask them to look at the execution plan, and see what it says.  Most query performance problems can be resolved simply by looking at the execution plan and seeing where you need to add an index.

All to often I (and others) then get asked, how to I look at the execution plan, and what does it mean?

Continued »

March 11, 2009  9:05 PM

What the hell is wrong with people?

Denny Cherry Denny Cherry Profile: Denny Cherry

I ran across the post A Culture of (Potential) Assholes: Sexual Harassment in IT on twitter today, and all I could think was “What the hell is wrong with people?”

Before I go on, I’d like to go on the record with a few things.  I’m a guy, and have on occasion been called a pig (I try and keep these occasions as few and far between as I can).  So I’m not above treating people like crap, but this is just so far beyond acceptable.

They story which is given on the thread is that a drunk “douche bag” (my words not his) walked up to a woman (which I assume he didn’t know) and gave her his room key telling her that she better he up to his room later.

I just can’t imagine doing this to someone.  Now maybe I’m a more evolved form of caveman, I don’t know.  Now, the original poster didn’t say which conference this was in his post, but I will because I think that it makes it even more pathetic that the creep said what he said to this woman.  This was the MVP Summit in Seattle.  For those that don’t know what the MVP Summit is, this is when Microsoft invites all the members of the MVP program for that year up to Seattle and show them all the shinny new things that they are working on.

Now I know that this is the first year that I’ve been an MVP, so some may think that I’m talking out of turn here, but too bad. I’m pretty sure that someone being an ass at the hotel isn’t covered by the NDA.

Why do I mention that this is the MVP Summit?  Because we were all invited by Microsoft to come meet our peers in the program, and the product groups.  One of the many things that you have to agree to when you become an MVP is a code of conduct.  While this code of conduct is pretty basic, and hard to enforce in the real world, when you are at the Microsoft Summit, its pretty easy for Microsoft to enforce it.  Rule #1 on the code of conduct is “No disrespectful behavior”.  There’s a breakdown which I won’t bother to go into, since that is pretty self explanatory.  (Don’t get me wrong I don’t think this sort of poor behavior would fly at any other event or time either.)

Everyone at the Summit is an MVP or a Microsoft Employee, so one would assume that the level of peer respect would be high.  Don’t get me wrong, there is a health banter between MVPs of different products.  The members of my product group (SQL Server) like to pick on the FoxPro and Access but we certainly have a respect for the MVPs of those products.

Becoming an MVP is hard work, no matter the product you represent.  Some of the MVPs catch a lot of crap for the products that the represent (XBox, Zune and Office probably catch the most crap from people).  Everyone who is an MVP got there for the same reason, they support their respective community and user base.  Without knowing any of the Zune MVPs (as an example) I know that they got to be a Zune MVP by providing steller support to the Zune user base.

I think that its just horrible to speak like this to anyone, especially someone you should be considering a peer.

I think, I’ve gotten off point, and I’m starting to ramble so I’ll wrap up with this.  The person who gave her his room key should be ashamed of himself.  And the guy who was sitting next to her who tried to make a funny comment and ended up WAY over the line should also be ashamed of himself.

I’ll leave you with this though.  If you can’t be bothered to respect people in public, then don’t show up.  If you insist on showing up, then consider this before you make an ass out of your self; someone who saw you may be a customer of yours, or a future customer of yous, or a future boss of yours.  Wouldn’t that suck to loose a big sale, or your that promotion because of some dumb ass thing you did when you were drunk on a company trip.  And no being drunk isn’t an excuse.  If you act like that when you are drunk, then you shouldn’t be drunk in public.


March 9, 2009  11:00 AM

Handy script for use when looking at blocking

Denny Cherry Denny Cherry Profile: Denny Cherry

A while back I was looking at a clients database and we were looking at why the ASPState database was having blocking issues.  So I through this script together to show not only the blocked processes, but also the blocking processes, but also include the name of the stored procedure as well as the statement within the stored procedure which was causing the blocking. Continued »

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: