Oracle Technical Interview Questions For An Oracle DBA
Oracle Technical Interview Questions For An Oracle DBA
The listener is a process running on a node that listenes for incoming connections on behlf of a database or a
number of databases. The following are the characteristics of a listener:
A listener process can listen for more than one database
Multiple listeners can listen on behalf of a single database to perform load balancing
The listener can listen for multiple protocols
The default name of the listener in Oracle Net is LISTENE
The name of the listener must be uni!ue per listener.ora file
"hen an instance is started# Initiali$ation parameters about the listener are read from the init.ora file b% which
&MON registers information with the listener. If a listener is not up when the instance starts# &MON will not
register information with the listener. &MON will continue attempting to contact the listener. The listener will
re'ect an% connections made to an unregistered ser(ice.
The listener.ora file
The listener.ora file is used to configure the listener for static ser(ice registration. The listener.ora file must
reside on the machine or node on which the listener is to reside.
The listener.ora file contains configuration information for the following:
The listener name
The listener address
)atabases that use the listner
Listener parameters
e.g.
LISTENE *
+A))ESS,LIST *
+A))ESS * +&OTO-OL*T-&.+/ost*stc0sun12.+&ort*3423..
.
SI),LIST,LISTENE *
+SI),LIST *
+SI),)ES- *
+OA-LE,/OME * 5home5oracle.
+6LO7AL,)7NAME * O-L.us.oracle.com.
+SI),NAME * O-L.
.
88
9se the following commands to control the listener:
STAT : listener,name;
STO& :listener,name;
LSNRCTL Commands
Command Description
-/AN6E,&ASS"O) )%namicall% changes the encr%pted password of a listener.
E<IT =uits the LSN-TL utilit%
/EL& &ro(ides the list of all a(ailable LSN-TL commands
=9IT &ro(ides the functionalit% of the E<IT command
ELOA) Shuts down e(er%thing e>cept listener addresses and rereads the
listener.ora file. ?ou use this command to add or change ser(ices without
actuall% stopping the listener.
SA@E,-ONAI6 -reates a bacBup of %our listener configuration file +called listener.baB.
and updates the listener.ora file itself to reflect an% changes
SE@I-ES &ro(ides detailed information about the ser(ices the listener listens for
SET parameter This command sets a listener parameter
S/O" parameter This command lists the (alue of a listener parameter.
SET and SHOW Modifiers
Command Description
SET -ONNE-T,TIMEO9T )etermines the amount of time the listener waits for a (alid
connection re!uest after a connection has been started
SET -9ENT,LISTENE Sets or shows parameters when multiple listeners are used
SET LO6,)IE-TO? Sets a nondefault location for the log file or to return the location
to the default.
SET LO6,AILE Sets a nondefault name for the log file.
SET LO6,STAT9S Turns listener logging on or off
SET &ASS"O) -hanges the password sent from the LSN-TL utilit% to the
listener process for authentication purpose onl%.
SET SA@E,-ONAI6,ON,STO& Sa(es an% changes made b% the LSN-TL SET command
permanentl% if the parameter is on. All parameters are sa(ed right
before the listener e>its.
SET STAT9&,"AITTIME Sets the amount of time the listener sleeps before responding to
a STAT command
SET T-,)IE-TO? Sets a nondefault location for the trace file or to return the
location to the default
SET T-,AILE Sets a nondefault name for the trace file
SET T-,LE@EL Turns on tracing for the listener
Sample TNSNAMES.ORA file at Server Side
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C This file is automaticall% generated b% Auto-onfig. It will be read and
C o(erwritten. If %ou were instructed to edit this file# or if %ou are not
C able to use the settings created b% Auto-onfig# refer to MetalinB document
C 3D43E4.3 for assistance.
C
CF/eader: NetSer(ice/andler.'a(a 334.43 211D53153E 1E:3G:GE nsugguna ship F
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
/)E@3*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH13..
+-ONNE-T,)ATA*
+SI)*/)E@3.
.
.
/)E@3,H1D,7ALAN-E*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH13..
+-ONNE-T,)ATA*
+SI)*/)E@3.
.
.
/)E@3,AO*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH13..
+-ONNE-T,)ATA*
+SI)*/)E@3.
.
.
/)E@3,7ALAN-E*
+)ES-I&TION*
+LOA),7ALAN-E*?ES.
+AAILO@E*?ES.
+A))ESS,LIST*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH13..
.
+-ONNE-T,)ATA*
+SI)*/)E@3.
.
.
AN)AS,-I)-S-AS/)E@3*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)AS.
.
.
AN)AS,-I)-S-AS/)[email protected]*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)AS.
.
.
AN)AS,/)E@3,-I)-S-AS/)E@3*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)AS.
.
.
AN)AS,/)E@3,-I)-S-AS/)[email protected]*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)AS.
.
.
AN)SM,-I)-S-AS/)E@3,/)E@3*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)SM.
.
.
AN)SM,-I)-S-AS/)[email protected],/)E@3*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.cidc.cummins.com.+&OT*GH12..
+-ONNE-T,)ATA*
+SI)*AN)SM.
.
.
epD1,/)E@3#epD1,/)[email protected]*+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.+&OT*GH1I..
IAILE*5u125app5applmgr5/)[email protected]/)E@35/)E@3,ifile.ora
Sample Slnet.ora file
s!lnet.e>pire,time * 4
Sample Listener.ora file
C F/eader: admBH1ln,u>.s!l 334.2J 211D51451E 23:3H:G3 mmanBu ship F
C LISTENE.OA Aor Oracle Applications
C This file is automaticall% generated
A&&S,/)E@3 *
+A))ESS,LIST *
+A))ESS* +&OTO-OL* T-&.+/ost* cidcscfshrde(3.+&ort* GH12..
.
SI),LIST,A&&S,/)E@3 *
+SI),LIST *
+ SI),)ES- * + SI),NAME * AN)SM .
+ OA-LE,/OME * 5u125app5applmgr5/)[email protected] .
+ &O6AM * 5u125app5applmgr5/)[email protected])SM .
+ en(s*KM?A&&SOA*5u125app5applmgr5/)E@3533i5A&&S/)[email protected](#&AT/*5usr5bin:5usr5ccs5bin:5bin#AN)SM,S-I&T*5u125app5appl
mgr5/)E@35common5admin5scripts5/)[email protected] .
.
+ SI),)ES- * + SI),NAME * AN)AS .
+ OA-LE,/OME * 5u125app5applmgr5/)[email protected] .
+ &O6AM * 5u125app5applmgr5/)[email protected])AS .
+ en(s*KE&-,)ISA7LE)*T9E#NLS,LAN6*American,America.9TAH#L),LI7A?,&AT/*5usr5dt5lib:5usr5openwin5lib:5u125app5appl
mgr5/)[email protected]#S/LI7,&AT/*5usr5lib:5usr5dt5lib:5usr5openwin5lib:5u125app5applmgr5/)[email protected]#LI7&AT/*5usr5dt5lib:5usr5openw
in5lib:5u125app5applmgr5/)[email protected]#A&&LASTT*/)E@3,AOL/)E@3,7ALAN-EL/)E@3L/)E@3,H1D,7ALAN-E#A&&LAS")*5u1
25app5applmgr5/)E@3533i5adminL5u125app5applmgr5/)E@35tempL5u125app5applmgr5/)E@35common5html5oam5non9i>5launchMode5rest
rictedK .
.
.
C Listener general parameters
STAT9&,"AIT,TIME,A&&S,/)E@3 * 1
-ONNE-T,TIMEO9T,A&&S,/)E@3 * 31
TA-E,LE@EL,A&&S,/)E@3 * OAA
LO6,)IE-TO?,A&&S,/)E@3 * 5u125app5applmgr5/)[email protected]
LO6,AILE,A&&S,/)E@3 * A&&S,/)E@3
TA-E,)IE-TO?,A&&S,/)E@3 * 5u125app5applmgr5/)[email protected]
TA-E,AILE,A&&S,/)E@3 * A&&S,/)E@3
A)MIN,ESTI-TIONS,A&&S,/)E@3 * OAA
IAILE * 5u125app5applmgr5/)[email protected]/)E@35/)E@3,listener,ifile.ora
HDE!"#listener#ifile.ora
-/N3 * +)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrde(3.+&OT*GE13..
+-ONNE-T,)ATA*+SI)*-/N3..
.
/6OL)*
+)ES-I&TION*
+A))ESS*+&OTO-OL*tcp.+/OST*ftdcscfshrtst3.ftdc.cummins.com.+&OT*GJ13..
+-ONNE-T,)ATA*
+SI)*/6OL).
.
.
C/&)I*
C +)ES-I&TION*
C +A))ESS*+&OTO-OL*tcp.+/OST*cidcscfshrprd3.cidc.cummins.com.+&OT*DH13..
C +-ONNE-T,)ATA*
C +SI)*/&)I.
C .
C .
C
C/&<?2*
C +)ES-I&TION*
C +A))ESS*+&OTO-OL*tcp.+/OST*ftdcscfshrpr>3.ftdc.cummins.com.+&OT*4G13..
C +-ONNE-T,)ATA*
C +SI)*/&<?2.
C .
C .
C
-IL-ST,TST *
+)ES-I&TION *
+A))ESS * +&OTO-OL * T-&.+/OST * 3D1.E4.234.3JH.+&OT * 34D3..
+-ONNE-T,)ATA * +SE@I-E,NAME * -STTST..
.
The sqlnet.ora file controls the behavior of Oracle Net Services
Oracle Ser(er -onfiguration Options
Oracle creates ser(er processes to handle the re!uests of user processes connected to an instance. A ser(er
process can be either a dedicated server process# where one ser(er process ser(ices onl% one user process#
or it can be a shared server process$ where a ser(er process can ser(ice multiple user processes. Shared
ser(er processes are a part of Oracle shared ser(er architecture.
Dedicated Server Processes
The user process and server process are separate
Each user process has its own server process
The user and server processes can run on different machines to take advantage of distributed processing
There is one-to-one ratio between the user and server processes
Even when the user process is not making a database request, the dedicated server exists but remains
idle.
Adding or Removing Dispatchers
If the load on the dispatcher processes is consitently high, start additional dispatcher processes to route
user requests without waiting. ou may start new dispatchers until the number of dispatchers equals
!"#$%I&'"T()E*.
The load on the dispatchers can be monitored using the data dictionary views +,(I*(-IT and
+,%I&'"T()E*
In contrast, if the loan on dispatchers is consistently low, reduce the number of dispatchers
Useful Dictionar !ie"s Summari#ed
+,(I*(-IT This view contains information about virtual circuits which are user
connections to the database through dispatchers and servers
+,&)"*E%$&E*+E* This view contains information on the shared server processes
+,%I&'"T()E* This view provides information on the dispatcher processes
+,&)"*E%$&E*+E*$!./IT.* This view contains information for tuning the shared server
processes
+,0-E-E This view contains information on request and response queues
+,&E&&I./ This view lists session information for each current session
Oracle $nstance
"n oracle instance consists of memory areas 1mainly system global area 1&2"3 and background processes,
namely '!./, &!./, %45n, 625*, and (7'T. "n instance is created during the nomount stage of the
database startup after the parameter file has been read. If any of these processes terminate, the instance shuts
down.
%emor structures
T%pe Description
)atabase buffer cache Memor% area used to store blocBs read from data files. )ata is read into the
blocBs b% ser(er processes and written out b% )7"n as%nchronousl%.
Log 7uffer Memor% containing before and after image copies of changed data to be
written to the redo logs
Large pool An optional area in the S6A that pro(ides large memor% allocations for
bacBup and restore operations# I5o ser(er processes# and session memor%
for the shared ser(er and oracle <A.
Shared pool Stores parsed (ersions of S=L statements# &L5S=L procedures# and data
dictionar% information
&ac'ground Processes
T%pe Description
)atabase writer
+)7"n.
"rites dirt% buffers from the data buffer cache to the data files. This acti(it% is
as%nchronous.
Log "riter +L6". "rites data from the redo log buffer to the redo log files
S%stem Monitor
+SMON.
&erforms automatic instance reco(er%. eco(ers space in temporar%
segments when the% are no longer in use. Merges contiguous areas of free
space depending on parameters that are set.
&rocess Monitor
+&MON.
-leans up the connections5ser(er process dedicated to an abnormall%
terminated user process. &erforms rollbacB and releases the resources held
b% the failed process.
-hecBpoint +-M&T. S%nchroni$es the headers of the data files and control files with the current
redo log and checBpoint numbers.
Archi(er +A-n.
+Optional.
A process that automaticall% copies redo logs that ha(e been marBed for
archi(ing
An Oracle database consists of the follo"ing phsical files (
&ile T%pe Description T%pe
)atafiles &h%sical storage of data. At lease one file
is re!uired per database. This file stores
the s%stem tablespace
7inar%
edo logs -ontain before and after image copies of
changed data# for reco(er% purposes. At
least two groups are re!uired
7inar%
-ontrol files ecord the status of the database#
ph%sical structure# and MAN meta data
7inar%
&arameter
file
Store parameters re!uired for instance
startup
Te>t
Ser(er
&arameter
file
Store persistent parameters re!uired for
instance startup
7inar%
&assword
file
+optional.
Store information on users who can start#
stop# and reco(er the database
7inar%
Archi(e logs
+optional.
&h%sical copies of the online redo log files.
-reated when the database is set in
Archi(e log mode. 9sed in reco(er%
7inar%
Important )%namic (iews
!ie' Name Description
@FS6A =ueries the si$e of the instance for the shared pool# log buffer# data buffer cache
and fi>ed memor% si$es +operating s%stem0dependent.
@FINSTAN-E =ueries the status of the instance# such as the instance mode# instance name#
startup time# and host name
@F&O-ESS =ueries the bacBground and ser(er processes created for the instance
@F76&O-ESS =ueries the bacBground processes created for the instance
@F)ATA7ASE Lists status and reco(er% information about the database. It includes information
Instance
S(A
Shared
S)L and
*L+S)L
)ata
)ict.
-ache
Na(a pool Large pool
)atabase 7uffer
-ache
edo log buffer
&!./ (7'
T
%45n '!./ 625
*
"*(n
-ser
'roces
s
&erverr
'roces
s
'2"
)atabase
%atafile8
%atafile9
%atafile:
(ontrol
;ile
*edo 6og
file 9
*edo 6og
file 8
"rchived
6og ;iles
'arameter
file
'assword
file
on the database name# the uni!ue database identifier# the creation data# the
control file creation date and time# the last database checBpoint# and other
information
@F)ATAAILE Lists the location and names of the data files that are contained in the database. It
includes information relating to the file number and name# creation date# status
+online or offline.# enabled +read0onl%# read0write.# last data file checBpoint# si$e#
and other information
Large &ool
-an be configured as separate memor% area in the S6A to be used for:
Oracle bacBup and restore operations
I5O ser(er processes
Session memor% for the shared ser(ers
Is si$ed b% the LA6E,&OOL,SIOE parameter
Minimum I11M
SELE-T P AOM (Fsgastat
"/EE pool * Qlarge poolRL
&,nction of the L(WR -ac./ro,nd process
The log writer L6". writes redo entries from the redo log buffer to the redo log files as follows:
"hen the redo log buffer is one0third full
"hen a timeout occurs
"hen there is 3 M7 of redo
7efore )7"n writes modified blocBs in the database buffer cache to the data files
"hen a transaction commits
Oracle Technical Inter(iew =uestions for an Oracle )7A
". What is an Oracle 0nstance1
Ans'er 2 An Oracle instance is the combination of the bacBground processes and memor% structures.
3. What information is stored in Control &ile1
Ans'er 2 The information in the control file includes:
S )atabase name is taBen from either the name specified b% the initiali$ation parameter
)7,NAME or the name used in the -EATE )ATA7ASE statement.
S )atabase identifier is recorded when the database is created.
S Time stamp of database creation is also recorded at database creation.
S Names and locations of associated data files and online redo log files are updated when
a data file or redo log is added to# renamed in# or dropped from the database.
S Tablespace information is updated as tablespaces are added or dropped.
S edo log histor% is recorded during log switches.
S Location and status of archi(ed logs are recorded when archi(ing occurs.
S Location and status of bacBups are recorded b% the eco(er% Manager utilit%.
S -urrent log se!uence number is recorded when log switches occur.
S -hecBpoint information is recorded as checBpoints are made.
4. When %o, start an Oracle D- 'hich file is accessed first1
Ans'er 2 eading the initiali$ation file from FOA-LE,/OME5dbs in the following order:
T Airst spfileSI).ora. If not found then
T spfile.ora
T initSI).ora
5. What is the 6o7 of SMON$ *MON processes1
Ans'er 2 The s%stem monitor process 8SMON9 performs reco(er%# if necessar%# at instance startup. SMON
is also responsible for cleaning up temporar% segments that are no longer in use and for coalescing contiguous
free e>tents within dictionar% managed tablespaces. If an% terminated transactions were sBipped during
instance reco(er% because of file0read or offline errors# SMON reco(ers them when the tablespace or file is
brought bacB online. SMON checBs regularl% to see whether it is needed. Other processes can call SMON if
the% detect a need for it.
"ith eal Application -lusters# the SMON process of one instance can perform instance reco(er% for a failed
-&9 or instance
The process monitor 8*MON9 performs process reco(er% when a user process fails. &MON is responsible for
cleaning up the database buffer cache and freeing resources that the user process was using. Aor e>ample# it
resets the status of the acti(e transaction table# releases locBs# and remo(es the process I) from the list of
acti(e processes.
&MON periodicall% checBs the status of dispatcher and ser(er processes# and restarts an% that ha(e stopped
running +but not an% that Oracle has terminated intentionall%.. &MON also registers information about the
instance and dispatcher processes with the networB listener.
LiBe SMON# &MON checBs regularl% to see whether it is needed and can be called if another process detects
the need for it.
:. What is 0nstance Recover%1
Ans'er 2 "hen an Oracle instance fails# Oracle performs an instance reco(er% when the associated database
is re0started. Instance reco(er% occurs in two steps:
-ache reco(er%: -hanges being made to a database are recorded in the database buffer cache. These
changes are also recorded in online redo log files simultaneousl%. "hen there are enough data in the database
buffer cache# the% are written to data files. If an Oracle instance fails before the data in the database buffer
cache are written to data files# Oracle uses the data recorded in the online redo log files to reco(er the lost data
when the associated database is re0started. This process is called cache reco(er%.
Transaction reco(er%: "hen a transaction modifies data in a database# the before image of the modified
data is stored in an undo segment. The data stored in the undo segment is used to restore the original (alues
in case a transaction is rolled bacB. At the time of an instance failure# the database ma% ha(e uncommitted
transactions. It is possible that changes made b% these uncommitted transactions ha(e gotten sa(ed in data
files. To maintain read consistenc%# Oracle rolls bacB all uncommitted transactions when the associated
database is re0started. Oracle uses
the undo data stored in undo segments to accomplish this. This process is called transaction reco(er%.
;. What is 'ritten in Redo Lo/ &iles1
Ans'er 2 Each Oracle database has a redo log. This redo log records all changes made in datafiles.
<. )ow do you control number of %atafiles one can have in an .racle database=
>. )ow many !aximum %atafiles can there be in an .racle %atabase=
<. What is a Ta7lespace1
Ans'er 2 A tablespace is a logical storage unit within an Oracle database. It is logical because a tablespace is
not (isible in the file s%stem of the machine on which the database resides. A tablespace# in turn# consists of at
least one datafile which# in turn# are ph%sicall% located in the file s%stem of the ser(er.
"=. What is the p,rpose of Redo Lo/ files1
Ans'er 2 *edo logs are transaction ?ournals. Each transaction is recorded in the redo logs.
"". Which defa,lt Data7ase roles are created 'hen %o, create a Data7ase1
Ans'er 2
-ONNE-T# ESO9-E# )7A
E<&,A9LL,)ATA7ASE
IM&,A9LL,)ATA7ASE
)ELETE,-ATALO6,OLE
E<E-9TE,-ATALO6,OLE E<E-9TE
SELE-T,-ATALO6,OLE
"3. What is a Chec.point1
An e(ent called a checBpoint occurs when the Oracle bacBground process )7"n writes all the modified
database buffers in the S6A# including both committed and uncommitted data# to the data files.
-hecBpoints are implemented for the following reasons:
S -hecBpoints ensure that data blocBs in memor% that change fre!uentl% are written to data files regularl%.
7ecause of the least recentl% used algorithm of )7"n# a data blocB that changes fre!uentl% might ne(er
!ualif% as the least recentl% used blocB and thus might ne(er be written to disB if checBpoints did not occur.
S 7ecause all database changes up to the checBpoint ha(e been recorded in the data files# redo log entries
before the checBpoint no longer need to be applied to the data files if instance reco(er% is re!uired. Therefore#
checBpoints are useful because the% can e>pedite instance reco(er%.
At a checBpoint# the following information is written:
S -hecBpoint number into the data file headers
S -hecBpoint number# log se!uence number# archi(ed log names# and s%stem change
numbers into the control file.
-M&T does not write data blocBs to disB or redo blocBs to the online redo logs.
"4. Which *rocess reads data from Datafiles1
The server process first checBs the buffer cache for the presence of data.
If not found then onl% cop% the data from datafile to buffer cache.
Then send the data to the client.
8@. 5hich 'rocess writes data in %atafiles=
)7"n writes data in )atafile.
":. Can %o, ma.e a Datafile a,to e>tendi7le. 0f %es$ ho'1
?es# use E<TENT MANA6EMENT LO-AL A9TOALLO-ATE while creating tablespace.
";. What is a Shared *ool1
Shared pool stores parsed (ersion of S=L statements# &L5S=L procedures# and data dictionar% information.
"?. What is .ept in the Data7ase -,ffer Cache1
Memor% area used to store blocBs read from data files. )ata is read into the blocBs b% ser(er processes and
written out b% )7"n as%nchronousl%.
"@. Ho' man% ma>im,m Redo Lo/files one can have in a Data7ase1
%epends on what you specified for !"#6.2;I6E& during database creation 1manually3 or what you specified
for A!aximum no. of redo log filesA with %4("
"<. What is difference 7et'een *&ile and S*&ile1
" ';I6E is a static, client-side text file that must be updated with a standard text editor like AnotepadA or AviA.
This file normally reside on the server, however, you need a local copy if you want to start .racle from a remote
machine. %4"Bs commonly refer to this file as the I/IT..*" file.
"n &';I6E 1&erver 'arameter ;ile3, on the other hand, is a persistent server-side binary file that can only be
modified with the A"6TE* &&TE! &ETA command. This means you no longer need a local copy of the pfile
to start the database from a remote machine. Editing an &';I6E will corrupt it, and you will not be able to start
your database anymore.
3=. What is *(A#A((RE(RATE#TAR(ET parameter1
3". Lar/e *ool is ,sed for 'hat1
"n optional area in the &2" that provides large memory allocations for backup and restore operatins, IC. server
processes, and session memory for the shared server.
33. What is *CT 0ncrease settin/1
The percent of increase in extent siDe after /E#T extent and thereafter.
34. What is *CT&REE and *CTASED Settin/1
'(T;*EE for a data segment specifies the percentage of space in each data block reserved for growth resulting
from updates to rows in the block. The default for '(T;*EE is 8EF.
'(T-&E% for a data segment represents the minimum percentage of used space that the oracle server tries to
maintain for each data block of the table. " block is put back on the free list when its used space falls below
'(T-&E%.
9@. 5hat is *ow !igration and *ow (haining=
" migrated row is a row that was moved to another block due to an update making it too large to fit on its
original block with the other rows there. 5e cannot ?ust AmoveA the row -- we have lots of indexes pointing to
the original block. 5e therefore leave behind a forwarding address on the original block and migrate the
updated row to a new block. now, when you access that row, we discover it is not really there -- it is migrated
and we read the other block to get it.
" chained row is a row that is too large to fit on a single block. If you have a 9k blocksiDe but your row siDe is
@k, we will use : blocks to store that row in pieces. "ny table with a longClong raw will have chained rows.
"ny table whose rowsiDe exceeds the blocksiDe will have chained rows. "ny table with more then 9GG columns
will have chained rows 1we break really wide tables up3.
9G. 5hat is E8GGG - &napshot Too .ld error and how do you avoid it=
9H. 5hat is a 6ocally !anaged Tablespace=
9<. (an you audit &E6E(T statements=
9>. 5hat does %4!&$;2" package do=
9I. 5hat is (ost 4ased .ptimiDation=
:E. )ow often you should collect statistics for a table=
:8. )ow do you collect statistics for a table, schema and %atabase=
:9. (an you make collection of &tatistics for tables automatic=
::. .n which columns you should create Indexes=
:@. 5hat type of Indexes are available in .racle=
:G. 5hat is 4-Tree Index=
:H. " table is having few rows, should you create indexes on this table=
:<. " (olumn is having many repeated values which type of index you should create on this column, if you have
to=
:>. 5hen should you rebuilt indexes=
:I. (an you built indexes online=
@E. (an you see Execution 'lan of a statement.
@8. " table is created with the following setting
storage 1initial 9EEk
next 9EEk
minextents 9
maxextents 8EE
pctincrease @E3
5hat will be siDe of @th extent=
@9. 5hat is %4 4uffer (ache "dvisor=
@:. 5hat is &T"T&'"(7 tool=
@@. (an you change &)"*E%$'..6$&IJE online=
@G. (an you *edefine a table .nline=
@H. (an you assign 'riority to users=
@<. ou want users to change their passwords every 9 months. )ow do you enforce this=
@>. )ow do you delete duplicate rows in a table=
@I. 5hat is "utomatic !anagement of &egment &pace setting=
GE. 5hat is the difference between %E6ETE and T*-/("TE statements=
G8. 5hat is (.!'*E&& and (./&I&TE/T setting in E#'.*T utility=
G9. 5hat is the difference between %irect 'ath and (onvention 'ath loading=
G:. (an you disable and enable 'rimary key=
G@. 5hat is an Index .rganiDed Table=
GG. 5hat is a 2lobal Index and 6ocal Index=
GH. 5hat is the difference between *ange 'artitioning and )ash 'artitioning=
G<. 5hat is difference between !ultithreadedC&hared &erver and %edicated &erver=
G>. (an you import ob?ects from .racle ver. <.: to Ii=
GI. )ow do you move tables from one tablespace to another tablespace=
HE. )ow do see how much space is used and free in a tablespace=
-nix *elated Interview 0uestions for an .racle %4"
In many .racle %4" interviews many questions are
asked relating to -nix. )ere I have collected some
common Interviews questions asked to a %4" relating
to -nix environment. These questions are mostly asked
for senior .racle %4" positions. I have compiled these
questions based upon the feedback I got from many
candidates who have attended interviews in various
!/(Bs
8. )ow do you see how many instances are running=
9. )ow do you automate starting and shutting down of databases in -nix=
:. ou have written a script to take backups. )ow do you make it run automatically every
week=
@. 5hat is .E** utility=
G. )ow do you see +irtual !emory &tatistics in 6inux=
H. )ow do you see how much hard disk space is free in 6inux=
<. 5hat is &"*=
>. 5hat is &)!!"#=
I. &wap partition must be how much the siDe of *"!=
8E. 5hat is %I&! in &olaris=
88. )ow do you see how many memory segments are acquired by .racle Instances=
89. )ow do you see which segment belongs to which database instances=
8:. 5hat is +!&T"T=
8@. )ow do you set 7ernel 'arameters in *ed )at 6inux, "I# and &olaris=
8G. )ow do you remove !emory segments=
8H. 5hat is the difference between &oft 6ink and )ard 6ink=
8<. 5hat is stored in oratab file=
8>. )ow do you see how many processes are running in -nix=
8I. )ow do you kill a process in -nix=
9E. (an you change priority of a 'rocess in -nix=
4ackup and *ecovery Interview 0uestions for an .racle %4"
&ome of the (ommon 4ackup and *ecovery Interview
0uestions for .racle %atabase "dministrator. These
questions are common for both &enior .racle %4" or
Kunior %4". I have compiled these questions based
upon the feedback I got from many candidates who
have attended interviews in various !/(Bs
8. 5hich types of backups you can take in .racle=
9. " database is running in /."*()I+E6.2 mode then which type of backups you can take=
:. (an you take partial backups if the %atabase is running in /."*()I+E6.2 mode=
@. (an you take .nline 4ackups if the the database is running in /."*()I+E6.2 mode=
G. )ow do you bring the database in "*()I+E6.2 mode from /."*()I+E6.2 mode=
H. ou cannot shutdown the database for even some minutes, then in which mode you should run
the database=
<. 5here should you place "rchive logfiles, in the same disk where %4 is or another disk=
>. (an you take online backup of a (ontrol file if yes, how=
I. 5hat is a 6ogical 4ackup=
8E. &hould you take the backup of 6ogfiles if the database is running in "*()I+E6.2 mode=
88. 5hy do you take tablespaces in 4ackup mode=
89. 5hat is the advantage of *!"/ utility=
8:. )ow *!"/ improves backup time=
8@. (an you take .ffline backups using *!"/=
8G. )ow do you see information about backups in *!"/=
8H. 5hat is a *ecovery (atalog=
8<. &hould you place *ecovery (atalog in the &ame %4=
8>. (an you use *!"/ without *ecovery catalog=
8I. (an you take Image 4ackups using *!"/=
9E. (an you use 4ackupsets created by *!"/ with any other utility=
98. 5here *!"/ keeps information of backups if you are using *!"/ without (atalog=
99. ou have taken a manual backup of a datafile using oCs. )ow *!"/ will know about it=
9:. ou want to retain only last : backups of datafiles. )ow do you go for it in *!"/=
9@. 5hich is more efficient Incremental 4ackups using *!"/ or Incremental Export=
9G. (an you start and shutdown %4 using *!"/=
9H. )ow do you recover from the loss of datafile if the %4 is running in /."*()I+E6.2 mode=
9<. ou loss one datafile and it does not contain important ob?ects. The important ob?ects are there in other
datafiles which are intact. )ow do you proceed in this situation=
9>. ou lost some datafiles and you donBt have any full backup and the database was running in
/."*()I+E6.2 mode. 5hat you can do now=
9I. )ow do you recover from the loss of datafile if the %4 is running in "*()I+E6.2 mode=
:E. ou loss one datafile and %4 is running in "*()I+E6.2 mode. ou have full database backup of 8 week
old and partial backup of this datafile which is ?ust 8 day old. ;rom which backup should you restore this file=
:8. ou loss controlfile how do you recover from this=
:9. The current logfile gets damaged. 5hat you can do now=
::. 5hat is a (omplete *ecovery=
:@. 5hat is (ancel 4ased, Time based and (hange 4ased *ecovery=
:G. &ome user has accidentally dropped one table and you realiDe this after two days. (an you recover this table
if the %4 is running in "*()I+E6.2 mode=
:H. %o you have to restore %atafiles manually from backups if you are doing recovery using *!"/=
:<. " database is running in "*()I+E6.2 mode since last one month. " datafile is added to the database last
week. !any ob?ects are created in this datafile. "fter one week this datafile gets damaged before you can take
any backup. /ow can you recover this datafile when you donBt have any backups=
:>. )ow do you recover from the loss of a controlfile if you have backup of controlfile=
:I. .nly some blocks are damaged in a datafile. (an you ?ust recover these blocks if you are using *!"/=
@E. &ome datafiles were there on a secondary disk and that disk has become damaged and it will take some days
to get a new disk. )ow will you recover from this situation=
@8. )ave you faced any emergency situation. Tell us how you resolved it=
@9. "t one time you lost parameter file accidentally and you donBt have any backup. )ow you will recreate a
new parameter file with the parameters set to previous values.
":. What is Consistent -ac.,p1
A -onsistent bacBup is one in which the files being bacBed up contain all changes upto the same s%stem
chan/e n,m7er 8SCN9
";. What is fract,red -loc.1
7ecause the database continues writing to the file during an online bacBup# there is the possibilit% of bacBing
up inconsistent data within a blocB. Aor e>ample# assume that either MAN or an operating s%stem utilit% reads
the blocB while database writer is in the middle of updating the blocB. In this case# MAN or the cop% utilit%
could read the old data in the top half of the blocB and the new data in the bottom top half of the blocB. The
blocB is a fract,red 7loc.# meaning that the data in this blocB is not consistent.
"?. What are the steps to performin/ complete recover% on the 'hole data7ase1
Mount the database
Ensure that all datafiles %ou want to reco(er are online
estore a bacBup of the whole database or the files %ou want to reco(er
Appl% online or archi(ed redo logs# or a combination of the two
"@. What are the steps to performin/ complete recover% on a ta7lespace or datafile1
TaBe the tablespace or datafile to be reco(ered offline if the database is open
estore a bacBup of the datafiles %ou want to reco(er
Appl% online or archi(ed redo logs# or a combination of the two