Вы находитесь на странице: 1из 14

Top 10 SQL Server DBA Interview Questions

Written on January 22, 2009 by Brent Ozar in Featured Interview, Interviewing, SQL Server
31 Comments - Read Comments

I·ve put together my best questions to ask during an interview when I·m hiring a senior database administrator for
Microsoft SQL Server or Oracle. I don·t expect any DBA to ace all of these ² I·m not looking for easy questions, but
rather for the top ten questions, tough challenges to let the really good DBAs shine during the job interview.

10. Solve the FizzBuzz problem with SQL code.

Here·s a quote of the FizzBuzz problem:

Write a program that prints the numbers from 1 to 100. But for multiples of three print ´Fizzµ instead of the number and
for the multiples of five print ´Buzzµ. For numbers which are multiples of both three and five print ´FizzBuzzµ.

Challenge the DBA to do this on a whiteboard with pseudocode. The code doesn·t have to be perfect syntax, but we·re
looking for the ability to solve this problem clearly and quickly. I·d ask this of any type of DBA, production or
development.

There·s countless ways to do this, but I·m almost not as concerned with their technical accuracy as I am with the way
they approach the problem itself. Do they get excited? Do they scribble out a few different ideas? Are they stunned at
the thought of having to actually write T-SQL? Do they make excuses?

9. I·m a manager, and you·re my Senior DBA. Explain to me why we shouldn·t switch to
MySQL or Oracle.

A senior DBA should have a basic grasp of the advantages and disadvantages of the major database
platforms. They·ve probably answered this question before, too ² if not from a manager, then from a developer who·s
whining because they think Platform X is better than Platform Y.

I also want to see senior DBAs that can clearly explain a very political concept without taking it personally. My ideal
DBA knows when his platform isn·t the right fit, and has no problem suggesting other ideas.

8. I·m a developer. Explain why I need a unique key on my table.

And really pretend that you·re a developer. If you·re a DBA manager, bring in one of your toughest developers to play
bad cop. Challenge them ² does it really improve performance or manageability? How do you know? Is it just your
opinion, or where·s the proof?

If they can explain it in clear, easy-to-comprehend terms, that bodes well for their ability to communicate with other
teams. Speaking of inter-team communication«

c
c
Î. A project manager needs a new SQL Server. What do you ask her?

Use a brochure from any third party application (like Microsoft Project Server or Blackberry Enterprise Server) and say
the project manager wants to set this up. I want the DBA to ask questions like:

dc How big will the database be? (Leading to questions about whether we can add the database to an existing server)

dc How critical is the database? (Leading to questions about clustering, disaster recovery, high availability)
dc hat·s the company standard on virtualization? (Can we save money by using a virtual server)

If the senior DBA candidate comes back with a shocked look and doesn·t know where to begin, then they haven·t done
a lot of deployments. That might be fine if your shop rarely does new deployments, or if you·re hiring a development
DBA, but they still should have some basic knowledge about sizing.

6. hen and where does the local user group meet?

I·m not asking if they regularly attend, I·m not asking if they speak, I·m not asking if they run for office. At the senior
DBA level, I·d just be thankful if they were at least vaguely aware that user groups existed. Huge massive bonus points
if they·ve been involved with the community, and I·d skip the next question.

5. Can you give me references from other DBAs and developers who aren·t at your
company?

I want to know that they·ve got at least a couple of people they can call when the going gets rough and the servers
catch fire. These other references could be mentors, or could be people they·ve mentored or just worked with along
the way.

I expect to get terrified looks, and I·d answer those by saying, ´I don·t want to raise any red flags by calling people at
your current employer, and I·m sure you know people who·ve left your company and moved on. I just want to talk to
people who·ve worked with you on projects or on problems. I won·t ask for your level of technical competency,
because these other guys can·t judge that. I just want to know you·ve interacted with them.µ

I know, it·s creepy, but here·s the problem: there·s a lot of fakers out there with all the right answers, but no actual
experience. At the senior level, for somebody with five or more years of experience, they have to have met other
people who can at least verify they·re database administrators.

4. How do you learn new things?

hen new versions of database servers come out, how do you prefer to learn how to use ¶em?

c
c
Ideally, I want to hear a DBA say they build their own server under the desk when the beta comes out, and start
hammering it and getting their arms around it long before it gets released. Not everybody has that much time, though
² they might be stretched to the breaking point at their current job, with barely enough time to get their work done, let
alone train on new versions. In that case, I like to level-set them by saying, ´You·re coming to work here because we·re
not that kind of shop. I want you to keep your knowledge current. How much time per month do you need to keep
current, and how would you do it?µ

Some DBAs learn best by going to offsite training classes, and can·t budget their time well enough or maintain a train of
thought to learn inside the office. As a manager, you want to know that before you hire the person, so you can build
that training budget into their salary. (You don·t want unqualified employees, do you? Yeah, you probably do ² I·ve
worked for you, ha ha ho ho.)

3. hat third party database tools are your favorites?

If somebody·s been doing database administration long enough to claim the title Senior DBA, they·ve built up a little
wish list of database management tools they·ve seen along the way. Tool types might include:

dc Data modeling
dc Change management

dc Backup compression

dc Performance monitoring

dc Alerting

If they had a $X tool budget for their workstation, how would they spend it? Forget corporate standards ² I want to
know what tools they·d use if they could pick on their own. I·m not asking what software they·ve had experience using,
because they might work somewhere so cheap that they·re restricted to native tools only. They have to have at least
seen some ads for products that looked cool, though.

I might follow up with questions about tools we were using in-house already by saying things like, ´e·re currently
using Product X for monitoring. Have you seen it? hat·d you think of it?µ

This does two things: it gives me an outside opinion about other tools out there that my DBAs could be using to do a
better job, and it tells me how much the job candidate has seen.

2. Ask stressful questions.

In one of the earlier questions, you probably found an area of weakness for the DBA·s knowledge ² heck, nobody·s
perfect. Go after that weakness. Challenge it, make them uncomfortable, and really push their buttons.

c
c
This is your one chance to see how they handle stress before the brown stuff actually hits the fan. Ideally, a senior
DBA is someone who·s had their cage rattled more than once, and they·re comfortable under the gun.

No, don·t use an actual gun during the interview ² but that reminds me of a plastic slot machine I used to keep on my
desk at the office. hen you pulled the lever, it shot water straight at you like a squirt gun. Always fun to see how
somebody handled that one, but I wouldn·t let job candidates pull the lever. That·s a little overboard!

1. hy are you here?

Zoom out to the big picture. Tell me why you·re in this chair right now.

Is this some sort of career plan? Have they heard good things about the environment from another employee? Are they
looking for an employee discount on products? (It doesn·t work at wine & spirits companies, just for the record.) Or
are they just desperate? Nothing wrong with desperation, but remember that desperate employees are desperate for
something, and you·d better find out what it is. If they·re desperate for money, it·s going to color the judgements they
make. I·m not worried about someone stealing data and selling it as much as I·m worried about someone taking the
job and then bailing out shortly thereafter for just a little more money from somebody else.

Top DBA Interview Questions That You Don·t See Here

I·ve seen DBA managers asking questions about tough challenges that had come up recently in the shop, such as,
´Pretend you have horrible TempDB contention, really seriously bad load, and you have to fix it. hat do you
do?µ The candidate would then name off all kinds of answers while the DBA manager sat back and said,
´Nope. Didn·t work. Tried that too. Nope.µ The DBA manager feels more and more smug while the candidate feels
more and more frustrated, and the end result is a DBA manager that thinks the candidate isn·t good enough for the job.

The problem with that scenario is that the DBA manager expects the candidate to be able to answer a question that had
already stumped their own staff. I always want to grab that manager and say, ´Look, if I was interviewing YOU with this
question, you·d have failed, because you couldn·t figure it out in sixty seconds either!µ

If you·re going to ask a candidate a technical question, my rule of thumb is that it should take your existing staff the
same length of time to answer the question. If a technical challenge took your staff three days to figure out, then you
should expect the job candidate to take that same length of time to answer the question!

More Articles on Interview Questions

If you liked this, here·s a few more of my posts about interview questions for job candidates:

dc Top 10 Questions to Ask During Your Own Interview

dc Interview Tip: hy The Interviewer Tries to Stress You Out

c
c
dc Getting Your First DBA Job ithout Experience
dc ¦ecommended Books for SQL Server DBAs

Read more: http://www.brentozar.com/archive/2009/01/top-10-interview-questions-to-ask-senior-dbas/#ixzz0tw1KFut8


Under Creative Commons License: Attribution Non-Commercial No Derivatives
c

Getting Into a Database Administrator Position


cc c
c
c cccc cc


ccc cc

I got a question from ¦on G asking how to go about changing positions from help desk to DBA. Here·s my thoughts:

Build on what you already know.

If you·re used to working on IBM AIX systems, for example, you·ll want to utilize some of that skillset by working with
databases that run on AIX. If you·re used to working on indows computers (even in just a help desk environment),
you want to stay on indows. Don·t try to learn both an operating system and an application at the same time if you
can avoid it, because the faster you can get up to speed on just the database alone, the faster you·ll be able to get paid.

Attend free webinars.

Find third party vendors that support the database you·re trying to learn, and check out their marketing
webinars. They·re in the business of helping database administrators learn and grow, and they conduct some great
training sessions for free just to get their products in front of you. I·ve done a couple SQL Server training webcasts for
Quest Software that cover how to accomplish common DBA chores using the native tools versus how much faster it is
with the Quest tools. I don·t know about you, but I learn a lot faster when I·m listening to a real human being talk
instead of reading dry text, and webcasts are much more fun.

Join the local database user group.

You·d be surprised how many cities have user groups for databases. Go, and promptly close your mouth,
hahaha. Don·t try to contribute, just sit, watch, listen and learn. People will give presentations every month about
database topics. You·ll learn a little about databases, but more importantly, you·ll learn about the city·s market for the
database you·re trying to learn. Other people will get to know you, and down the road, you·ll find somebody who·s
willing to show you the ropes. (Everybody wants to hire junior DBAs.

c
c
ƒolunteer after hours with your DBA.

Talk to the friendliest DBA at your company (or another company in the user group) and tell them you·re interested in
learning more. Tell them that you·re willing to show up after hours if they·re doing maintenance and watch &
learn. This isn·t going to be an easy sell ² with telecommuting these days, a lot of maintenance is done remotely via
ƒPN ² but if you·re lucky, you·ll find a taker. At Southern ine, I had a relationship like this with a junior DBA:
whenever I planned after hours maintenance, I·d email him to tell him when it·d take place. If he wanted to join me,
we·d meet up at the office that night and I·d explain each of the steps I was doing as I did it. It slowed me down as a
DBA, but the payoff came when I wanted to take vacations, because he was already familiar with more systems than
he·d ordinarily come across.

Find local database software companies.

Companies all over the US build add-on software for your database platform of choice. They build things like
performance monitoring tools, backup software, database utilities, etc., and all of this software needs support. They
have a help desk, and they·d love to hire people who want to grow their database experience. You·ll be able to make a
quick career change, plus get into a position where you·re learning databases on the job. You can find these
companies by Googling for your database platform name plus tools or management, like ´SQL Server managementµ or
´SQL Server toolsµ. Also check the magazines for these (yes, there are database magazines, even!) and look at each
of the advertisers to see where they·re located. Call them and ask if they have an office in your city, because some of
these companies are pretty big. (Quest has over 3,000 employees all over the globe.)

Avoid consulting companies unless you know another employee there.

I know I·ll get email for this one, but here·s the deal: a lot of shady consulting companies are willing to throw anybody
into a position just to make billable hours. They pay you $X per hour, and they bill the client twice as much. Presto,
they·re making money off you, and they don·t care whether you know what you·re doing or not. The client won·t find
out right away because the consulting company won·t let them talk to you directly ² they·ll manage all meetings via a
project manager who does all the client interaction. After a few months, when the client figures out that you don·t
know what you·re doing, the consulting company can shuffle you off to another project. You won·t learn much (there
won·t be another DBA there to help you) and you·ll get demotivated.

Most importantly, be honest.

Don·t be afraid to say you don·t know the answer to something. My official job title at Quest is ´SQL Server Domain
Expertµ, and I get a big chuckle out of that. Yesterday I met with two people for three hours (hi, Eyal and Melanie) and
it would take two hands to count the number of times I said, ´I don·t know the answer to that.µ Granted, my job puts
me in the line of fire for some really tough technical questions, but you get the point. Database administrators can·t
know everything ² today·s databases cover way too much functionality ² and that·s okay. Nobody expects you to
know everything, but they·ll expect you to know where to find the right answers quickly.

c
c
More DBA Career Articles
dc Moving from Help Desk to DBA ² a reader asked how to do it, and I gave a few ways to get started.

dc Development DBA or Production DBA? ² job duties are different for these two DBA roles. Developers become one kind
of DBA, and network administrators or sysadmins become a different kind. I explain why.

dc ¦ecommended Books for DBAs ² the books that should be on your shopping list.

dc Ask for a List of Servers ² DBA candidates need to ask as many questions as they answer during the interview.
dc Are you a Junior or Senior DBA? ² Sometimes it·s hard to tell, but I explain how to gauge DBA experience by the size of
databases you·ve worked with.

dc So You anna Be a ¦ock & ¦oll Star ² Part 1 and Part 2 ² wanna know what it takes to have ´SQL Server Expertµ on
your business card? I explain.

dc Becoming a DBA ² my list of articles about database administration as a career.



ccc cc
c
c
 c!c"#!$$%%&$&"$
$ $'"(# )  $*+ ,cc
- ccc&!c./c0&(c0c1c

  

  
÷ M  

c Ñ      


 c Ñ        
! c Ñ        "
  
# c $%&    %&  '()*+ , 
%&
c ,     (
 
- c (        
 (. /
0 c Ñ    1+
. c Ñ        2 
/ c 3 # 415  Ñ    
  

c ,6    "%7)+)4%   
c ,     
 c ,   8÷(   
      
! c        $÷%29(÷   
   %8(** , / :     
# c Ñ    8(*÷       +
c , /2 :262 :26  

c
c
- c 1         ;1<,
 
0 c Ñ     ;1<, "=%*<=<%Ñ
. c Ñ     %    6
/ c ,  6       
  

c Ñ      ( ! ! 
 c ,         
 c  > $÷%29(÷ ?   @""     
  
! c Ñ   $$)  &41 
# c 3 "@ "   "
 c ,:   @"  

- c $ (    ,   3 %3%%7)+)4%
 1%   
0 c $ 8          (" 
,    $   
. c 1     8+44÷  )145 % 6 
/ c Ñ   (%   )145 % 6
!
c +    %7)+)4%%3%  
  A       
  
! c <     + *
! c Ñ  (  
!! c ,     (41
!# c ,%7):  B        
 
! c ,  (  +8*4%<$
!- c ,          

!0 c ,   @  C 
!. c ,  "   @D "
!/ c 1@BC1@ C
#
c 1 "     >   " 
  415       
# c Ñ           $%%
   
# c 3     E( 
. E   ,
 Ñ       
#! c 1 @2 C 1    
     Ñ    
(%   
## c <  $4) 
# c ,    
#- c =    '  
#0 c ," @2C @ 'C
#. c *        ( 

c
c
#/ c 3      
(8Ñ1;<   Ñ       


c Ñ        
 +  

p   

 


÷ M 9  # 

.

c    
  p 
 c   
  
   


! c  
     
   
 F,F 
  3   $÷ , 
 ÷Ñ Ñ 
  
# c  
 
  p 
    *  
 G%<)<8*D=(2HGEG%<)<8*D=(2,Ñ<< 'I
G"H"   ,Ñ<< 

c  
       
 
 
 =  
$÷ E J    6J   $÷
>     !J6    
  8)(÷ )(÷K6
- c   
    
  =    < 
   4      
0 c  
   G> "            
. c  
        

    
 '    ' 
  $ '    *
  '     *
    >    
/ c  

          
*        %7)%E+134174<

c
c
 :   $<=4)*   
       =(<1&?<3   
    8Ñ<8?      <
        $   (*4))  
           
   

c  
  
  
      
*      E ÷ *E    
1$        ÷E
      <      
          %<5 6H÷% % +Ñ$6 ÑE
        
     *     
 
c  
 +131$<5 +13?<3   
 
  =   4174<1$<5        
  1 1$<5+13 4174<    
 
 1    + ?    
 :        
  (*4))  
 c  
      
 

  = 
     >     
      *     
 
! c  
 *      
            
6 *             
 >   1
   *    
:  ÷  %7)     
  = E    +%<4$(  
       
# c      

  

 +  F  F 


F  F :  *     : ,
   
c  
      1 F$   
   F
- c  
     
   
0 c  
p    :   ;
  ; %7):       
 "    ;   
  : :  ;   
 

c
c
c

p 
  

÷ M =   

0

%7)
%7)<       A  
 

%7)D+
%7)D+  'A%7) A'%7)D+ 
 '   A A  

;)
;)E          
= 1+A * ($ %7* (4$ *48A+(,< 

$= 
$= $$2(*Ñ% )%*2$3 <5*2$3 (*Ñ%2÷<*,<<A%3%$*< 

8= 
8= 11*8+ 4++< )(,< %4÷%*A)<&*Ñ   &<*<%*A
)<%* & =         
  * ;& 8(4* 5 1A%4 

**1*)<A÷*1*)<
**1*)<A÷*1*)<     A  

c
c
8()4
8()4  A  

÷<?
÷<?     A    
  

8(+4*<
       ÷<?  

%<*
%<*     

%+(()
%+(()    

9(1
9(1  %<)<8*        
*  9 %<:> A  <:> 6 (A%>  
<:>      >   :   ,Ñ<< 
  <:>         :   
,Ñ<< 
(9           
 
%9 >     

4 
4       

1
1       


         

8 %: 
8 %: :       +
% 4 $ 48%7 :   
    

 
  %: 

%:
%: :      $
:   :  

c
c
%   
%      :A    % 
8  
* +  $÷A  +     
   =   '    

1
1    :   : 
8: 
L   
: ,Ñ<< 1 :   (  
 8   -  

$ 
    8' ) -#?A!. 
8 7     
8 ; '

A   
 6   !.  .#  0 
) 8  &÷ 
$ 9#0 ÷8 $#0 $ 
% ÷ &1A$'% 6     
÷   (% 4 *( 

( %7) 
, & ÷  Ñ (÷ A% 

* 
*    

8 
8     1  
     =   
   ; :     

+ 
+ 1 4A$    
   

 
      

% 
%         
  

%* 
%*      

c
c
) 
)    )  
 

8  
8  E    " 

1 
  : ) 
    8   *   
  
$)    *    
$  )    >  "   
    
1) A)  *   
<)  :       
%)   :    
 %        
 < %    
% <         
   
%4     % 

$ 
$ :         
  =        
 *       :
8 :    

*
*   1 4 $ 8 
*   %7)   
1   + 8    
  <  8      ) 

%7)D) 
%7)D)     ( *   
 (      %7)D) E
   *     1   
%   $    6 1  :  
   

c
c

Вам также может понравиться