You are on page 1of 14

Oracle DBA Interview Questions Answers

By
Gitesh Trivedi


Publisher: Kendba Services

Copy right protected Kendba Services




Oracle DBA Interview Questions Answers
Copyright !"#$$ by the Kendba Services% All rights reserved%

&ourth 'eprint "#$"

No part of this publication may be reproduced or distributed in any form or by any means,
or stored in a database or retrieval system, without the prior written permission of the
publisher. The information contained herein is for the personal use of the reader and may
not be incorporated in any commercial programs, other books, websites, databases, or any
kind of software without written consent of the publisher. Making copies of this book or any
portion for any purpose other than your own is a violation of copyright laws.

(i)its o* (iability+Disclai)er o* ,arranty:

The author and publisher have used their best efforts in preparing this book. Kendba Services and
the author !ake no representation of warranties with respect to the accurac" or co!pleteness of
the content of this book and an" particular purpose. There are no warranties which e#tend be"ond
the descriptions contained in this paragraph. $o warrant" !a" be created or e#tended b" sales
representatives or written sales !aterials. The accurac" and co!pleteness of the infor!ation
proceed herein and the opinions stated herein are not guaranteed or warranted to produce an"
particular results and the advice and strategies contained herein !a" not be suitable for ever"
individual. $either Kendba Services nor author shall be liable for an" loss of profit or an" other
co!!ercial da!ages including but not li!ited to special incidental conse%uential or other
da!ages.








This book is dedicated to my dad, Prafulchandra Nanubhai Trivedi,
my mother, Naliniben Prafulchandra Trivedi, my wife Kashmira
Giteshkumar Trivedi, and my daughter Nirali Giteshkumar Trivedi.
Without their constant and noble love, guidance, sacrifices and
support, would not have achieved the goal of completing this book.

About Author
Gitesh P Trivedi
Gitesh works as Project Manager Technical !ead at "bametri# $olutions.
%e has more then &' years of e#perience in the (nformation Technology
industry. "uring his career, Gitesh has provided "atabase )dministration
services to clients around the globe including ones in (ndia, *)+,
$ingapore, Malaysia, )ustralia, *,, *$), and )frica. Gitesh has been
involved with -racle right from -racle. to its latest version -racle&&g.
Gitesh has also worked as a freelance "/) for several companies and as
a corporate faculty in many reputed training institutes. %e has e#tensive
e#perience managing very large -racle databases in banking and finance
domains. Gitesh has helped several clients design and implement high
availability and disaster management strategies.

Gitesh has /achelor of $ciences degree from Gujarat *niversity and is an
-racle certified professional for -racle &&g, &0g, 1i, 2i, 2 and an -racle
3)4 "/) for -racle &&g,&0g. %e holds /rainbench certification for -racle
&0g, 1i, 2i and certification in *ni# system administration. %e has also
provided -racle recruitment services to various companies. Gitesh has
been awarded best support provider and best team leader several times
during his professional career. %is team was awarded /est "/) team of
the year in 5002.

Pre*ace
These days we are using computer systems for various tasks, cars for getting around, and cellular
phone devices for communication. (n the same way, this publication was not published
instantaneously. The voyage of this book goes many years in the past with many individuals to be
thanked for.

To start with, we want to thank all the hiring managers who decline interviewees by saying they need
to know -racle "/) fundamentals regardless of 6uality of their e#perience and high score in -4P
e#ams. +mployers typically offer jobs to those who possess a solid understanding of -racle
fundamentals. Many candidates are knowledgeable about -racle but are not able to come up with the
right answer during the interview. (nterviewers have a tendency to ask trick 6uestions or technical
6uestions pertaining to a real time scenario. 7ithout solid e#perience, it is difficult for the interviewee to
understand the 6uestion and come up with the right answer. (n this book, ( have covered real scenario
based 6uestions and their answers for your preparation.

(n this book, ( have tried to cover as many tough, tricky and real time scenarios based 6uestions as
possible and have answered them based on my e#periences as an -racle "/). ( hope that this book
will help you prepare for an -racle "/) interview by providing and insight into the interviewer8s mind.
The book is also intended to be a 6uick reference for -racle "/)s. The book covers -racle versions
&&g &0g 1i 2i. ( hope it will boost your confidence, improve your knowledge and sharpen your skills.
(f you are an interviewer, this book should help you ask right 6uestions to your potential employee.

( would appreciate any feedback from you about making this book and even more valuable
resource for the -racle "/) community.


giteshtrivedi!yahoo.com

7ish you best of luck.

Gitesh P Trivedi Gitesh P Trivedi Gitesh P Trivedi Gitesh P Trivedi


Prere-uisites o* this Boo. usage:

This book is intended to not only prepare you, but help you e#cel in an
-racle "/) interview. 7hile the reader is not e#pected to possess
detailed knowledge about -racle internals, he is e#pected to have a
decent understanding of -racle architecture, advanced features and
responsibilities of an -racle "/).

(f you are an -racle "/), this book will not only serve as a 6uick reference
but also help you enhance your skills.
.
















Bac.up and 'ecovery









&#plain the difference between a hot backup and a cold backup and the
benefits associated with each.
A hot backup is basicall" taking a backup of the database while it is still up and
running and it !ust be in archive log !ode. A cold backup is taking a backup of
the database while it is shut down and does not re%uire being in archive log
!ode. The benefit of taking a hot backup is that the database is still available for
use while the backup is occurring and "ou can recover the database to an" ball in
ti!e. The benefit of taking a cold backup is that it is t"picall" easier to ad!inister
the backup and recover" process. In addition since "ou are taking cold backups
the database does not re%uire being in archive log !ode and thus there will be a
slight perfor!ance gain as the database is not cutting archive logs to disk.
'ou have (ust had to restore fro! backup and do not have an" control
files. )ow would "ou go about bringing up this database*
I would create a te#t based backup control file stipulating where on disk all the
data files where and then issue the recover co!!and with the using backup
control file clause.
&#plain the difference between A+,)I-&.O/ !ode and $OA+,)I-&.O/
!ode and the benefits and disadvantages to each.
A+,)I-&.O/ !ode is a !ode that "ou can put the database in for creating a
backup of all transactions that have occurred in the database so that "ou can
recover to an" ball in ti!e. $OA+,)I-&.O/ !ode is basicall" the absence of
A+,)I-&.O/ !ode and has the disadvantage of not being able to recover to an"
ball in ti!e. $OA+,)I-&.O/ !ode does have the advantage of not having to
write transactions to an archive log and thus increases the perfor!ance of the
database slightl".
0hat co!!and would "ou use to create a backup control file*
Alter database backup control file to trace.


0hat is the purpose of the I12O+T option I/$O+&* 0hat is its default
setting*
The I12O+T I/$O+& option tells i!port to ignore 3alread" e#ists3 errors. If it is
not specified the tables that alread" e#ist will be skipped. If it is specified the
error is ignored and the table4s data will be inserted. The default value is $.
'ou are using hot backup without being in archivelog !ode can "ou
recover in the event of a failure* 0h" or wh" not*
0e are unable to take hot backup in noarchive !ode. 'ou can4t use hot backup
without being in archivelog !ode. So no "ou couldn4t recover.

)ow !an" redo logs should "ou have and how should the" be configured
for !a#i!u! recoverabilit"*
'ou should have at least three groups of two redo logs with the two logs each on
a separate disk spindle 5!irrored b" Oracle6. The redo logs should not be on raw
devices on 7$I8 if it can be avoided.
7sers aren4t being allowed on the s"ste!. The following !essage is
received9 O+A:;;<=> archiver is stuck. ,onnect internal onl" until freed 9
0hat is the proble!*
The archive destination is probabl" full take backup of archivelogs and re!ove
the! . archiver process will re:start.
'ou get a call fro! "ou backup DBA while "ou are on vacation. )e has
corrupted all of the control files while pla"ing with the A.T&+ DATABAS&
BA,K72 ,O$T+O.?I.& co!!and. 0hat do "ou do*
,O$$&,T s"s as s"sdba
STA+T72 1O7$T









5Take an" read:onl" tablespaces offline before ne#t step A.T&+ DATABAS&
DATA?I.& .... O??.I$&@6
+&,O-&+ DATABAS& 7SI$/ BA,K72 ,O$T+O.?I.&
A.T&+ DATABAS& O2&$ +&S&T.O/S@
5bring read:onl" tablespaces back online6
Shutdown and backup the s"ste! then restart
If the" have a recent output file fro! the A.T&+ DATABAS& BA,K72 ,O$T+O.
?I.& TO T+A,&@ co!!and the" can use that to recover as well.
If no backup of the control file is available then the following will be re%uired9
,O$$&,T I$T&+$A.
STA+T72 $O1O7$T
,+&AT& ,O$T+O. ?I.& .....@
)owever the" will need to know all of the datafiles logfiles and settings for
1A8.O/?I.&S 1A8.O/1&1B&+S 1A8.O/)ISTO+' 1A8DATA?I.&S for the
database to use the co!!and.

0hat are the steps involved in Database Startup*
Start an instance 1ount the Database and Open the Database.

0hat are the steps involved in Instance +ecover"*
+olling forward to recover data that has not been recorded in data files "et has
been recorded in the on:line redo log including the contents of rollback
seg!ents. +olling back transactions that have been e#plicitl" rolled back or have
not been co!!itted as indicated b" the rollback seg!ents regenerated in step a.
+eleasing an" resources 5locks6 held b" transactions in process at the ti!e of the
failure. +esolving an" pending distributed transactions undergoing a two:phase
co!!it at the ti!e of the instance failure.




,an ?ull Backup be perfor!ed when the database is open*
$o.

0hat are the steps involved in Database Shutdown*
,lose the Database Dis!ount the Database and Shutdown the Instance.

0hat is Archived +edo .og*
Archived +edo .og consists of +edo .og files that have archived before being
reused.

0hat is +estricted 1ode of Instance Startup*
An instance can be started in 5or later altered to be in6 restricted !ode so that
when the database is open connections are li!ited onl" to those whose user
accounts have been granted the +&ST+I,T&D S&SSIO$ s"ste! privilege


"riginal #ook $%
th
&dition' contains %()* "racle +#, nterview
-uestions and ,nswers including real time scenario based, tricky,
and comple. /uestions and appropriate answers.










/ow to get Oracle DBA Interview Questions
Boo.%
Book $a!e9 Oracle DBA Interview Questions
Author9 /itesh Trivedi
&dition9 A
th
+eleased date9 1arch BC <;B<
0ebsite9 http9DDwww.kendba.co!
2artner Site9 http9DDwww.dba!etri#.co!
Book link9 http9DDwww.kendba.co!DbooksDinterview:%uestions:books

You might also like