Category Archives: Admin

The gimme question

I’m in the middle of a full-blown round of interviewing for a new DBA and I’m in the middle of the initial phone screening process. One of the things I used to do is give someone a gimme question at the end so they end on a high note. Quite often they don’t do as well as they would like so they end up saying I don’t know a lot more than they usually would. So the gimme question is a way to let them feel a little better. The problem is that quite often I’ll ask my gimme, and they’ll get it wrong. Now these are easy questions that someone whose a DBA should easily know. So it backfires on me more often than not.

However, lately I’ve got a new favorite type of gimme question. What I’ll do is let them give me the question they want me to ask them. So I’ll say something like… OK, I’ve got one more question and you get to pick it. So you come up with a question that you want me to ask you and I’ll ask it.
And once they get over the shock of what I’m actually saying they think for a minute and come up with a good tech question. So I ask them their tech question and what surprises me every single time is the amount of times these people get it wrong!!! I don’t understand that. You got to pick your own question and you picked something you can’t even answer?

The funny thing is, I really don’t even care what you pick. There are 2 ways you can go, right? You can go the really easy route and have me ask something like How do you spell T-SQL? Or you could go the complicated route and try to impress me with your knowledge and have me ask you something really advanced.

And to this day I haven’t had anyone really try to impress me, but nobody’s gone the really easy route either.

I don’t know about you, but I’d say this question is effective on a number of levels.

And I really don’t care what the question is, but you’d better be able to answer it.

How’s business?

My current gig is really starting to open up in terms of how busy we are. Users are starting to come to the DBAs more and more for things and the outlook is bright. It’s taken a while for them to start coming to us because the DBA group before wasn’t very responsive and it really turned a lot of the users off to coming to them. But now it’s like they’ve been love starved for so long and now they’re finally starting to get what they need cause we’re overflowing with requests.
Boy, what a time to be a DBA down, huh?

Why you have to be on top of your game

I just heard from a DBA at my last gig who was keeping me in the loop about things I had done while I was there.
He said that they had to take away the 2 1TB LUNs I had them put on our DB server because they caused performance problems. The SAN guys warned us that having LUNs that big would hurt us and I guess they were right. Well, not really. This was the report I got back from the DBA, so not my words. When I grilled him about it, he did say that they had given us a single spindle that was 1TB for each of them instead of giving us several drives in the array.
So let me get this right… I asked for 1TB LUNs, and instead of doing it right you gave me a single drive and used it as justification for showing me you know more about disks than I do? I find that incredible.

So guys, yeah… you really have to be on top of your game and know your stuff so that when they do stuff like this you can call them on it. And I must admit that I’m not sure it would have crossed my mind to even check that it was a single spindle. Why would that even cross my mind? These are enterprise SAN guys… they know their way around and should definitely know better. What I didn’t realize was that they were into playing games. It just goes to show that you try so hard to be effective in some places and they just won’t let you.

Database Science kicks in

OK, I’m a DBA down this week because one of my guys ‘resigned’… but I’m making time to blog because honestly I need a short break this morning.
I’d like to talk about database science today and how it’s better than throwing yourself in the middle of application knowledge.

For starters, concentrating on the DB is a skill you can carry over to the next place you go. It’s highly doubtful that you’ll be supporting the same apps at your new gig. So it really shouldn’t matter to you whether the app counts warts on a giant’s butt or processes orders for fake vomit. A DB is a DB.

At no time has that rung true more than at my current gig. And that’s one thing that the DBA I just lost couldn’t come to grips with. He wanted to have his apps that he supported and nothing else. He thought that you had to know the app team and the product intimately in order to support it well, and that’s just not the case. And in fact, I honestly believe it can hurt you. It doesn’t have to, but it can. If you get too close to an app you start to make assumptions about performance and usage and you stop relying on numbers. And you should always investigate an issue before applying a known fix. Even doctors in the heart of Africa in the middle of a TB outbreak, still run the test when someone comes in with TB symptoms. Because it might not be TB and they could really hurt the patient if they give them the wrong medicine. Of course, he could have said, I’m in the middle of TB country and everyone around me has TB, so this guy must also have it. But he doesn’t because he knows to rely on the numbers, not what he’s become familiar with. So yeah, you can get familiar with the problems an app has and it can speed you to a solution, but never stop confirming it before you do anything.

So this has helped today in another way. By not getting too close to my apps I’m able to step right in and pick up where he left off. I don’t have to know the nature of the app or how the app team likes to do things to setup a good backup routine. I don’t have to know what the app does to diagnose a blocked spid, etc. It’s all just DB work.

I don’t know why some people think that you have to be intimate with an app in order to support it. There can be some mild benefit sometimes, but in general I find it clouds my thinking.

24-hrs of PASS is Online

If you haven’t gotten your email yet, or if it’s just gone into your spam, the 24-hrs of PASS recordings are ready.

You’ll find the main page here (it’ll make you login): http://www.sqlpass.org/LearningCenter/24Hours.aspx

And don’t forget to look specifically for my session here: http://passfiles.sqlpass.org/uploads/24Hours/05_20_2010_05AM_downloadHFP/Engine/Default.htm?http%3A%2F%2Fpassfiles.sqlpass.org%2Fuploads%2F24Hours%2F05_20_2010_05AM_downloadHFP%2F

If the link above doesn’t work then mine is Session #18.

Exciting News

Hey guys I’ve got some exciting news!! As it turns out you can use powershell to admin your servers.  That’s right!

And to prove it, here’s a nice little script I wrote this morning to change the service acct and passwords on all the boxes I wanted.

Actually, I’m just going to show you the single box version, but you all know how easy it is to turn this into a multi-box script.  Here it’s the method that’s important.

I’ll show you 2 ways to do it and I think they’re both equal really.  It just depends on your preference.

$service = gwmi win32_service –filter “name=’MSDTC’”
$service | %{$_.Change($null,$null,$null,$null,$null,$null,”NewUserAcct”, “NewPassword”)}

Here’s a screenshot of the same code.

image

That’s it.  That’s all you need to change the user acct and password for a service.  But we’ve still got a few things to talk about so you understand everything that’s happening here.

  1. If you want to use this against a remote box, then just use the –computername parameter.
  2. Notice I used the –filter param also.  This filters the results on the server itself so you don’t pass all the services across the wire and then filter them.  That method would look like this: > $service = gwmi win32_service | ?{$_.Name –eq “MSDTC”}
  3. The Change() method takes a fixed number of params so you have to put in all the params at least as placeholders.  That’s why all the $null values are in there.
  4. I’ve seen other methods for doing this where they name the params and don’t actually pass in all of them physically, but I haven’t had any luck with these.
  5. Here’s a site that explains all the other parms and the error codes you can get when using this method.  http://www.scriptinternals.de/new/us/Support/Internal/WMI_Win32_Service_Change.htm

Ok, I know I promised you 2 ways to do this but I’m out of time so this one will have to do.  The other one uses the same method, it’s just a different way to script it so you’re not really losing anything.