Sunteți pe pagina 1din 37

SENIOR ORACLE DBA INTERVIEW QUESTIONS

Question 1. Explain the i!e"en#e $et%een a hot $a#&up an a #ol $a#&up an the $ene'ts
asso#iate %ith ea#h.
Ans%e"(
A hot backup is basically taking a backup of the database while it is still up and running and it must be in
archive log mode. A cold backup is taking a backup of the database while it is shut down and does not
require being in archive log mode. The benefit of taking a hot backup is that the database is still available
for use while the backup is occurring and you can recover the database to any point in time. The benefit
of taking a cold backup is that it is typically easier to administer the backup and recovery process. In
addition, since you are taking cold backups the database does not require being in archive log mode and
thus there will be a slight performance gain as the database is not cutting archive logs to disk.
Question ). *ou ha+e ,ust ha to "esto"e -"o. $a#&up an o not ha+e an/ #ont"ol 'les. 0o%
%oul /ou 1o a$out $"in1in1 up this ata$ase2
Ans%e"(
I would create a text based backup control file, stipulating where on disk all the data files where and then
issue the recover command with the using backup control file clause.
Question 3. 0o% o /ou s%it#h -"o. an init.o"a 'le to a sp'le2
Ans%e"(
Issue the create spfile from pfile command.
Question 4. Explain the i!e"en#e $et%een a ata $lo#&5 an extent an a se1.ent.
Ans%e"(
A data block is the smallest unit of logical storage for a database object. As objects grow they take
chunks of additional storage that are composed of contiguous data blocks. These groupings of
contiguous data blocks are called extents. All the extents that an object takes when grouped together are
considered the segment of the database object.
Question 6. 7i+e t%o exa.ples o- ho% /ou .i1ht ete".ine the st"u#tu"e o- the ta$le DE8T.
Ans%e"(
se the describe command or use the dbms!metadata.get!ddl package.
Question 9. Whe"e %oul /ou loo& -o" e""o"s -"o. the ata$ase en1ine2
Ans%e"(
In the alert log.
Question :. Co.pa"e an #ont"ast TRUNCATE an DELETE -o" a ta$le.
Ans%e"(
"oth the truncate and delete command have the desired outcome of getting rid of all the rows in a table.
The difference between the two is that the truncate command is a ##$ operation and just moves the high
water mark and produces a now rollback. The delete command, on the other hand, is a #%$ operation,
which will produce a rollback and thus take longer to complete.
Question ;. 7i+e the "easonin1 $ehin usin1 an inex.
Ans%e"(
&aster access to data blocks in a table.
Question <. 7i+e the t%o t/pes o- ta$les in+ol+e in p"ou#in1 a sta" s#he.a an the t/pe o- ata
the/ hol.
Ans%e"(
&act tables and dimension tables. A fact table contains measurements while dimension tables will contain
data that will help describe the fact tables.
Question 1=. What t/pe o- inex shoul /ou use on a -a#t ta$le2
Ans%e"(
A "itmap index.
Question 11. 7i+e t%o exa.ples o- "e-e"ential inte1"it/ #onst"aints.
Ans%e"(
A primary key and a foreign key.
Question 1). A ta$le is #lassi'e as a pa"ent ta$le an /ou %ant to "op an "e>#"eate it. 0o%
%oul /ou o this %ithout a!e#tin1 the #hil"en ta$les2
Ans%e"(
#isable the foreign key constraint to the parent, drop the table, re'create the table, and enable the foreign
key constraint.
Question 13. Explain the i!e"en#e $et%een ARC0IVELO7 .oe an NOARC0IVELO7
.oe an the $ene'ts an isa+anta1es to ea#h.
Ans%e"(
A()*I+,$-. mode is a mode that you can put the database in for creating a backup of all transactions
that have occurred in the database so that you can recover to any point in time. /-A()*I+,$-. mode
is basically the absence of A()*I+,$-. mode and has the disadvantage of not being able to recover to
any point in time. /-A()*I+,$-. mode does have the advantage of not having to write transactions to
an archive log and thus increases the performance of the database slightly.
Question 14. What #o..an %oul /ou use to #"eate a $a#&up #ont"ol 'le2
Ans%e"(
A$T,( #ATA"A0, "A)12 )-/T(-$&I$, T- T(A),
Question 16. 7i+e the sta1es o- instan#e sta"tup to a usa$le state %he"e no".al use"s .a/ a##ess
it.
Ans%e"(
0TA(T2 /-%-/T ' Instance startup
A$T,( #ATA"A0, %-/T ' The database is mounted
A$T,( #ATA"A0, -2,/ ' The database is opened
Question 19. What #olu.n i!e"entiates the V? +ie%s to the 7V? +ie%s an ho%2
Ans%e"(
The I/0T!I# column which indicates the instance in a (A) environment the information came from.
Question 1:. 0o% %oul /ou 1o a$out 1ene"atin1 an E@8LAIN plan2
Ans%e"(
)reate a plan table with utlxplan.sql.
se the explain plan set statement!id 3 4tst54 into plan!table for a 06$ statement
$ook at the explain plan with utlxplp.sql or utlxpls.sql
Question 1;. 0o% %oul /ou 1o a$out in#"easin1 the $u!e" #a#he hit "atio2
Ans%e"(
se the buffer cache advisory over a given workload and then query the v7db!cache!advice table. If a
change was necessary then I would use the alter system set db!cache!si8e command.
Question 1<. Explain an ORA>=1666
Ans%e"(
9ou get this error when you get a snapshot too old within rollback. It can usually be solved by increasing
the undo retention or increasing the si8e of rollbacks. 9ou should also look at the logic involved in the
application getting the error message.
Question )=. Explain the i!e"en#e $et%een ?ORACLEA0OBE an ?ORACLEABASE.
Ans%e"(
-(A)$,!"A0, is the root directory for oracle. -(A)$,!*-%, located beneath -(A)$,!"A0, is
where the oracle products reside.
Question )1. 0o% %oul /ou ete".ine the ti.e Cone une" %hi#h a ata$ase %as ope"atin12
Ans%e"(
select #"TI%,:-/, from dual;
Question )). Explain the use o- settin1 7LOBALANABES eDual to TRUE.
Ans%e"(
0etting 7LOBALANABES dictates how you might connect to a database. This variable is either T(, or
&A$0, and if it is set to T(, it enforces database links to have the same name as the remote database
to which they are linking.
Question )3. What #o..an %oul /ou use to en#"/pt a 8LESQL appli#ation2
Ans%e"(
<(A2
Question )4. Explain the i!e"en#e $et%een a FUNCTION5 8ROCEDURE an 8ACGA7E.
Ans%e"(
A function and procedure are the same in that they are intended to be a collection of 2$=06$ code that
carries a single task. <hile a procedure does not have to return any values to the calling application, a
function will return a single value. A package on the other hand is a collection of functions and procedures
that are grouped together based on their commonality to a business function or application.
Question )6. Explain the use o- ta$le -un#tions.
Ans%e"(
Table functions are designed to return a set of rows through 2$=06$ logic but are intended to be used as
a normal table or view in a 06$ statement. They are also used to pipeline information in an ,T$ process.
Question )9. Na.e th"ee a+iso"/ statisti#s /ou #an #olle#t.
Ans%e"(
"uffer )ache Advice, 0egment $evel 0tatistics, > Timed 0tatistics
Question ):. Whe"e in the O"a#le i"e#to"/ t"ee st"u#tu"e a"e auit t"a#es pla#e2
Ans%e"(
In unix 7-(A)$,!*-%,=rdbms=audit,
in <indows the event viewer
Question );. Explain .ate"ialiCe +ie%s an ho% the/ a"e use.
Ans%e"(
%ateriali8ed views are objects that are reduced sets of information that have been summari8ed, grouped,
or aggregated from base tables. They are typically used in data warehouse or decision support systems.
Question )<. When a use" p"o#ess -ails5 %hat $a#&1"oun p"o#ess #leans up a-te" it2
Ans%e"(
2%-/
Question 3=. What $a#&1"oun p"o#ess "e-"eshes .ate"ialiCe +ie%s2
Ans%e"(
The ?ob 6ueue 2rocesses.
Question 31. 0o% %oul /ou ete".ine %hat sessions a"e #onne#te an %hat "esou"#es the/
a"e %aitin1 -o"2
Ans%e"(
se of +70,00I-/ and +70,00I-/!<AIT
Question Question 3). Des#"i$e %hat "eo lo1s a"e.
Ans%e"(
(edo logs are logical and physical structures that are designed to hold all the changes made to a
database and are intended to aid in the recovery of a database.
Question 33. 0o% %oul /ou -o"#e a lo1 s%it#h2
Ans%e"(
A$T,( 090T,% 0<IT)* $-.&I$,;
Question 34. 7i+e t%o .ethos /ou #oul use to ete".ine %hat DDL #han1es ha+e $een .ae.
Ans%e"(
9ou could use $ogminer or 0treams
Question 36. What oes #oales#in1 a ta$lespa#e o2
Ans%e"(
)oalescing is only valid for dictionary'managed tablespaces and de'fragments space by combining
neighboring free extents into large single extents.
Question 39. What is the i!e"en#e $et%een a TEB8ORAR* ta$lespa#e an a 8ERBANENT
ta$lespa#e2
Ans%e"(
A temporary tablespace is used for temporary objects such as sort structures while permanent
tablespaces are used to store those objects meant to be used as the true objects of the database.
Question 3:. Na.e a ta$lespa#e auto.ati#all/ #"eate %hen /ou #"eate a ata$ase.
Ans%e"(
The 090T,% tablespace.
Question 3;. When #"eatin1 a use"5 %hat pe".issions .ust /ou 1"ant to allo% the. to
#onne#t to the ata$ase2
Ans%e"(
.rant the )-//,)T to the user.
Question 3<. 0o% o /ou a a ata 'le to a ta$lespa#e2
Ans%e"(
A$T,( TA"$,02A), @tablespace!nameA A## #ATA&I$, @datafile!nameA 0I:, @si8eA
Question 4=. 0o% o /ou "esiCe a ata 'le2
Ans%e"(
A$T,( #ATA"A0, #ATA&I$, @datafile!nameA (,0I:, @new!si8eA;
Question 41. What +ie% %oul /ou use to loo& at the siCe o- a ata 'le2
Ans%e"(
#"A!#ATA!&I$,0
Question 4). What +ie% %oul /ou use to ete".ine -"ee spa#e in a ta$lespa#e2
Ans%e"(
#"A!&(,,!02A),
Question 43. 0o% %oul /ou ete".ine %ho has ae a "o% to a ta$le2
Ans%e"(
Turn on fine grain auditing for the table.
Question 44. 0o% #an /ou "e$uil an inex2
Ans%e"(
A$T,( I/#,B @index!nameA (,"I$# -/$I/,;
Question 46. Explain 8a"titionin1 an $ene'ts o- usin1 8a"tionin1.
Ans%e"(
2artitioning is a method of taking large tables and indexes and splitting them into smaller, more
manageable pieces.
Question 49. *ou ha+e ,ust #o.pile a 8LESQL pa#&a1e $ut 1ot e""o"s5 ho% %oul /ou +ie% the
e""o"s2
Ans%e"(
0*-< ,((-(0
Question 4:. 0o% #an /ou 1athe" statisti#s on a ta$le2
Ans%e"(
The A/A$9:, command or #"%0!0TAT package.
Question 4;. 0o% #an /ou ena$le a t"a#e -o" a session2
Ans%e"(
se the #"%0!0,00I-/.0,T!06$!T(A), or se
A$T,( 0,00I-/ 0,T 06$!T(A), 3 T(,;
Question 4<. What is the i!e"en#e $et%een the SQLHLoae" an IB8ORT utilities2
Ans%e"(
These two -racle utilities are used for loading data into the database. The difference is that the import
utility relies on the data being produced by another -racle utility ,B2-(T while the 06$C$oader utility
allows data to be loaded that has been produced by other utilities from different data sources just so long
as it conforms to A0)II formatted or delimited files.
Question 6=. Na.e t%o 'les use -o" net%o"& #onne#tion to a ata$ase.
Ans%e"(
T/0/A%,0.-(A and 06$/,T.-(A
Question 61. Explain i!e"en#e $et%een O"a#le Data$ase an Instan#e
Ans%e"(
-racle database consist of followingD
#atafiles, )ontrol &iles, (edo $og &iles
-racle instance consist of followingD
0.A and -racle processes E#"<(, $.<(, 0%-/, 2%-/, A()*, )12T, etc.F
Question 6). What is Butatin1 Ta$le e""o"2
Ans%e"(
%utating table error happens when you try to modify the same row you are using it. se temp table to
avoid this error.
Question 63. What is #o""elate su$>Due"/2
Ans%e"(
)orrelated sub'query is a sub'query, which has reference to the main query
Question 64. Whi#h one o- the $elo% #han1e %ill e#"ease 8A7IN7ESWA88IN7
Ans%e"(
5. I/)(,A0, 0-(T!A(,A!(,TAI/,#!0I:,
). DECREASE S0AREDA8OOLASIIE J#o""e#t ans%e"K
G. #,)(,A0, -2,/!)(0-(0 parameters
H. I/)(,A0, #"!)A)*,!0I:,
Question 66. Explain steps in+ol+e in Bi1"ation -"o. O"a#le <.=.1 to <.).=.9
Ans%e"(
5. 0hutdown I.J.5 database
K. Apply software patch to new=old -(A)$,!*-%,
G. )hange -(A)$,!*-%, to point to new I.K.J.L binaries
H. 0TA(T2 %I.(AT,
M. N-(A)$,!*-%,=rdbms=admin=catpatch.sql
L. N-(A)$,!*-%,=rdbms=admin=utlrp.sql
O. )hange init.ora parameter )-%2ATI"$, 3 I.K.J.L
P. 0hutdown and startup normal
Question 69. Can /ou #"eate ata$ase une" an/ Unix use"i $esies o"a#le2
Ans%e"(
9es. 9ou can create database user other then oracle as long as that user is part of #"A group in unix
Question 6:. Lo#all/ Bana1e TEB8 Ta$lespa#e is 1==L FULL an the"e is no spa#e a+aila$le to
a ata'le to in#"ease TEB8 ta$lespa#e. What #an /ou o that .i1ht -"ee up TEB8 spa#e2
Ans%e"(
9ou can try one of the following to free up T,%2 space
5. Issue A$TT,( TA"$,02A), 2)TI/)(,A0, 5 followed by
A$TT,( TA"$,02A), 2)TI/)(,A0, J command;
K. )lose some of the idle sessions connected to the database
Question 6;. List '+e .ost i.po"tant -eatu"es o- O"a#le <i
Ans%e"(
5. AT-%ATI) /#- %A/A.,%,/#
K. AT-%ATI), 2.A %,%-(9 %A/A.,%,/T
G. %$TI'TA"$, I/0,(T statements
H. ,BT,(/A$ TA"$,0
M. #9/A%I) %,%-(9 %A/A.,%,/T
Question 6<. Na.e '+e top <I init.o"a pa"a.ete"s a!e#tin1 pe"-o".an#e
Ans%e"(
5. )(0-(!0*A(I/.
K. #"!)A)*,!0I:,
G. 2.A!A..(,.AT,!TA(.,T
H. <-(1A(,A!0I:,!2-$I)9
M. #"!5L1!)A)*,!0I:,, #"!P1!)A)*,!0I:,, #"!K1!)A)*,!0I:,
Question 9=. 0o% o /ou "e#o+e" ata$ase %hen /ou lost all o- /ou" #ont"ol 'les2
Ans%e"(
In case of loss of loss of all control files, you can still recover database as long as you have all
archivelog files. 9ou can issue following command to recover the database.
(,)-+,( #ATA"A0, 0I/. "A)12 )-/T(-$&I$,0 /TI$ )A/),$;
Apply all archivelog files
A$T,( #ATA"A0, -2,/ (,0,T$-.0;
0*T#-</ I%%,#IAT,;
"ackup database E)-$#F
0TA(T2;
Question 91. What is .ain pu"pose o- C0ECG8OINT2
Ans%e"(
A )heckpoint is a database event, which synchroni8es the data blocks in memory with the datafiles on disk.
A checkpoint has two purposesD
5. to establish data consistency
K. ,nable faster database recovery.
Question 9). *ou 1ot a #all -"o. Appli#ation tea. sa/in1 Appli#ation is "unnin1 +e"/ SLOW.
Whe"e o /ou sta"t loo&in1 '"st2
Ans%e"(
"elow are some of very important you should gather to identify the root cause of slowness in
application=database.
(un a T-2 command in unix to see )2 usage Eidentify )2 killer processesF

(un +%0TAT, 0A(, and 2(0TAT command to get more information on )2 and
memory usage and possible blocking
(un 0TAT02A)1 report to identifyD
a. T-2 M <AIT ,+,/T0
b. (,0-(), intensive 06$ statements
0ee if 0TATI0TI)0 on affected tables needs to be re'generated
I& poorly written statements are culprit, run a ,B2$AI/ 2$A/ on these statements and
see whether new index or use of *I/T brings the cost of 06$ down.
Question 93. 0o% to SWITC0 -"o. 8RIBAR* to 80*SICAL STANDB* in <i
Ans%e"(
2erform below on 2rimary #"D
5. A$T,( #ATA"A0, )-%%IT T- 0<IT)*-+,( T- 2*90I)A$ 0TA/#"9 <IT*
0,00I-/ 0*T#-</;
K. 0*T#-</ I%%,#IAT,;
G. 0TA(T2 /-%-/T;
H. A$T,( #ATA"A0, %-/T 0TA/#"9 #ATA"A0,;
M. (,)-+,( %A/A.,# 0TA/#"9 #ATA"A0, #I)-//,)T &(-% 0,00I-/;
L. A$T,( 090,% 0,T $-.!A()*I+,!#,0T!K!0TAT03 #,&,( 0)-2,302&I$,;
2erform below on 0TA/#"9 #"D
O. A$T,( #ATA"A0, )-%%IT T- 0<IT)*-+,( T- 2(I%A(9;
P. 0*T#-</ I%%,#IAT,;
I. 0TA(T2;
5J. A$T,( 090,% 0,T $-.!A()*I+,!#,0T!K!0TAT03 ,/A"$, 0)-2,302&I$,;
At this time 0tandby becomes 2rimary and 2rimary becomes new 0tandby.
Question 94. 0o% to ACTIVATE 80*SICAL STANDB* ata$ase in <i
Ans%e"(
2erform below on 2rimary #" if available to transfer all pending archive logs to standbyD
5. A$T,( 090T,% 0<IT)* $-.&I$,;
K. A$T,( 090T,% 0<IT)* $-.&I$,;
2erform below on 0TA/#"9 #"D
5. A$T,( #ATA"A0, A)TI+AT, 0TA/#"9 #ATA"A0,;
K. 0*T#-</ I%%,#IAT,;
G. 0TA(T2
H. Add T,%2 file if needed.
At this time 0tandby database becomes 2(I%A(9 database and relationship between 2rimary and
0tandby has been lost by activating standby database.
Question 96. Explain i!e"ent p"ote#tion .oe in DATA7URD
Ans%e"(
%ABI%% 2(-T,)TI-/
%ABI%% A+AI$I"I$IT9
%ABI%% 2,(&-(%A/),
Question 99. What is CASCADIN7 STANDB* ata$ase2
Ans%e"(
A )A0)A#I/. 0TA/#"9 is a standby database that receives its (,#- information from another
0TA/#"9 database Enot from 2rimary databaseF.
Question 9:. What a"e so.e o- the $a ta$les /ou Due"/ to 'n out a$out UNDO se1.ents2
Ans%e"(
9ou would queryD
#"A!/#-!0,.0
+7/#-0TAT
Question 9;. What oes Blo#& Beia Re#o+e"/ JBBRK o2
Ans%e"(
"%( is responsible for restore and recover of specified "$-)1
Question 9<. What is the i!e"en#e $et%een Fine 7"aine Auit JF7AK an Fine 7"aine A##ess
Cont"ol JF7ACK2
Ans%e"(
&.A tracks when sensitive rows have been accesses, where &.A) prevents access to sensitive rows
Question :=. Whi#h /na.i# pe"-o".an#e +ie% DBA #an Due"/ to see %ho elete ata -"o. a
pa"ti#ula" ta$le so.eti.e $a#&2
Ans%e"(
+7$-.%/(!)-/T,/T0
Question :1. What o /ou use DBBSAREDEFINITION pa#&a1e -o"2
Ans%e"(
#"%0!(,#,&I/ITI-/ package is used to perform an -/$I/, (,"I$# of a table
Question :). 0o% o /ou a se#on o" su$seDuent BLOCG SIIE to an existin1 ata$ase2
Ans%e"(

(e')reate the )-/T(-$&I$, to specify the new "$-)1 0I:, for specific data files
-r Take the database -&&$I/,, and the bring back online with a new "$-)1 0I:,
specification
Question :3. What a"e ne% RBAN -eatu"es in <i2
Ans%e"(
It allows you to set retention period of backups
It enables you to store the )*A//,$ attributes so you do not have to specify in each
"A)12 or (,0T-(, command
Question :45 Explain i!e"ent 8ARTITIONIN7 options a+aila$le in <i
Ans%e"(
Ran1e 8a"titionin1 sed when there are logical ranges of data. 2ossible usageD dates, part numbers,
and serial numbers.
0ash 8a"titionin1 sed to spread data evenly over partitions. 2ossible usageD data has no logical
groupings.
List 8a"titionin1 sed to list together unrelated data into partitions. 2ossible usageD a number of states
list partitioned into a region.
Co.posite Ran1e>0ash 2artitioning sed to range partition first, then spreads data into hash partitions.
2ossible usageD range partition by date of birth then hash partition by name; store the results into the
hash partitions.
Co.posite Ran1e>List 2artitioning sed to range partition first, then spreads data into list partitions.
2ossible usageD range partition by date of birth then list partition by state, then store the results into the
list partitions.
Question :6. 0o% to #on+e"t a Sin1le Instan#e <i ata$ase to a Real Appli#ation Cluste"s <i JRACK
ata$ase %ithout usin1 expo"tEi.po"t tools.
Ans%e"(
5. %ake a full database backup before you change anything
K. )opy the existing 7-(A)$,!*-%,=dbs=init@0I#5A.ora to
7-(A)$,!*-%,=dbs=init@db!nameA.ora. Add the following parameters to
7-(A)$,!*-%,=dbs=init@db!nameA.oraD
a. C.cluster!database 3 T(,
b. C.cluster!database!instances 3 K
c. C.undo!management3AT- EAdd if you don4t have it F
d. @0I#5A.undo!tablespace3undotbs Eundo tablespace which already existsF
e. @0I#5A.instance!name3(A)5
f. @0I#5A.instance!number35
g. @0I#5A.thread35
h. @0I#5A.local!listener3$I0T,/,(!(A)5
G. -pen your database and run 7-(A)$,!*-%,=rdbms=admin=catclust.sql to create cluster
database specific views within the existing instance
H. (ecreate control file if you defined maxinstances to be 5 when you created the single instance
database
M. Add instance specific parameters in the init@db!nameA.ora for the second instance on the
second node and set appropriate values for it
a. @0I#KA.instance!name3(A)K
b. @0I#KA.instance!number3K
c. @0I#KA.local!listener3$I0T,/,(!(A)K
d. @0I#KA.thread3K
e. @0I#KA.undo!tablespace3/#-T"0K
f. @0I#KA.cluster!database 3 T(,
g. @0I#KA.cluster!database!instances 3 K
L. &rom the first instance, mount the database and run the following command
alter database
add logfile thread K
group G E4=dev=(A)=redoK!J5!5JJ.dbf4F si8e 5JJ%,
group H E4=dev=(A)=redoK!JK!5JJ.dbf4F si8e 5JJ%;
alter database enable public thread K;
O. )reate a second ndo Tablespace from the existing instance
P. 0et -(A)$,!0I# and -(A)$,!*-%, environment variables on the second node and
0TA(T second instance.
Question :9. Explain RAC an a+anta1es o- usin1 RAC
Ans%e"(
In (eal Application )lusters environments, all nodes concurrently execute transactions against the same
database. (eal Application )lusters coordinates each node4s access to the shared data to provide
consistency and integrity.
Advantages of (A)D

Improved throughput
0calability over single instance systems
Improved response time
*igh availability
Transparency
Question ::. Explain Ro% Lo#&in1 an Bulti>+e"sion Rea Consisten#/ in RAC
Ans%e"(
-racle4s row locking feature allows multiple transactions from separate nodes to lock and update
different rows of the same data block. This is done without any of the transactions waiting for the others
to commit. If a row has been modified but not yet committed, then the original row values are available to
all instances for read access. This is called multi'version read consistency.
Question :;. What is an Exte"nal ta$le int"ou#e in <i2
Ans%e"(
-racleIi introduces external tables, which provide a mechanism to view data stored in external sources
as if it were a table in the database. This ability to read external data provides a more straightforward
method of loading and transforming data from external sources. Administrators no longer need to reserve
space inside the database for staging tables or write external programs to transform the data outside of
the database environment. "y making it no longer necessary to stage data in the -racle database,
-racleIi4s external tables have essentially streamlined the ,T$ function by merging the transformation
and loading processes.
Question :<. What is S8FILE2
Ans%e"(
The 02&I$, Eserver parameter fileF is -racle4s new method of maintaining database parameters. The old
method of editing a text based parameter file EI/IT.-(AF has given way to the new method of maintaining
persistent parameters. "y this -racle means that you can change a system parameter and have its value
be maintained across shutdown and startup. This is a great savings from the past where you had to issue
the A$T,( 090T,% command and then remember to edit the I/IT.-(A parameter file. *ere is how to
create 02&I$,D
06$A )(,AT, 02&I$, Q34spfile!name4R &(-% 2&I$, Q34pfile!name4R;
06$A )(,AT, 2&I$, Q34pfile!name4R &(-% 02&I$, Q34spfile!name4R;
06$A create spfile from pfile;
sageD
5. 06$A A$T,( 090T,% 0,T #"!)A)*,!0I:,35JJJ% 0)-2,302&I$,;
Question ;=. 0o% o /ou $a#&up an "esto"e usin1 T"anspo"ta$le Ta$lespa#es
Ans%e"(
5.
K.
G.
H.
M.
L.
O.
(un #"%0!TT0 against the tablespace to see if tablespace is self contained or not.
%ake tablespace (ead -nly.
,xport %etadata E,B2 T(A/02-(T!TA"$,02A),039 TA"$,02A),3ts5F
)opy data file to target host
)opy export dump to target
Import the %etadata EI%2 T(A/02-(T!TA"$,02A),039 #ATA&I$,0 Efile5,fileKF F
"ring Tablespace -/$I/, and enable 0-(), tablespace to (,A# <(IT,
Question ;1. Explain i!e"ent t/pe o- Data$ase Failu"es
Ans%e"(

0tatement failure failed 06$ is automatically rolled back and an error is returned to user.
ser 2rocess failure abnormal disconnect 2%-/ detects and rolls back and releases
locks.
ser ,rror Edrop table, dataF #"A is required to recover data Eimport or incomplete
recoveryF
%edia &ailure $oss or corruption of files #"A needs to apply appropriate recovery.
Instance &ailure Abnormal shutdown Instance simply needs restarted, 0%-/ auto
recovers byD
(olling forward changes in the redo log not recorded in the data files before -pen of
database.
(ollbacks can occur after the database is open, when block data is requested.
Question ;). What oes RESETLO7S option o2
Ans%e"(
5. )reates a new incarnation of the database, putting a new 0)/ in all data file headers.
K. (eset $og 0equence number to 5
G. (eformats -/$I/, (,#- $-.&I$,0 if they exists
Question ;3. Na.e 6 s/ste. +ie%s that #an $e use to "et"ie+e in-o".ation a$out $a#&up an
"e#o+e"/
Ans%e"(
5.
K.
G.
H.
M.
+7"A)12
+7#ATA&I$,!*,A#,(
+7(,)-+,(!&I$,
+7(,)-+,(9!$-.
+7(,)-+,(9!0TAT0
Question ;4. What is the Dui#&est %a/ to #lone a ata$ase 1i+e /ou" $a#&up is one +ia RBAN2
Ans%e"(
sing (%A/ command #2$I)AT, #ATA"A0,
Question ;6. What is the use o- the RESUBABLE pa"a.ete" in E@8ORT2
Ans%e"(
The (,0%A"$, parameter allows the export to
5. 0uspend if a space allocation issue occurs
K. <ait until the space allocation issue is solved
G. Then resume and therefore not to abort, provided a timeout is set appropriately.
Question ;9. Na.e init.o"a pa"a.ete"s nee to set -o" A+an#e Repli#ation
Ans%e"(
5.
K.
G.
H.
M.
L.
#I0T(I"T,#!T(A/0A)TI-/0
.$-"A$!/A%,0
?-"!6,,!2(-),00,0
-2,/!$I/10
2A(A$$,$!%AB!0,(+,(0
2A(A$$,$!%I/!0,(+,(0
Question ;:. Na.e 6 init.o"a pa"a.ete"s that nees to set in 8"i.a"/ ata$ase -o" Data7ua"
#on'1u"ation
Ans%e"(
5.
K.
G.
H.
M.
L.
$-.!A()*I+,!#,0T!K
$-.!A()*I+,!#,0T!K!0TAT,
&A$!)$I,/T
&A$!0,(+,(
0TA/#"9!A()*I+,!#,0T
0TA/#"9!&I$,!%A/A.,%,/T
Question ;;. What is the use o- FORCE LO77IN7 option2
Ans%e"(
"y setting &-(), $-..I/. to T(,, all transactions will generate (,#-. This is used for #ata .uard,
so no data will be missed Ei.e. transactions that were run with /-$-..I/. optionF in 0tandby database.
Question ;<. JOn UNI@K When shoul .o"e than one DB %"ite" p"o#ess $e use2 0o% .an/
shoul $e use2
Ans%e"(
If the /IB system being used is capable of asynchronous I- then only one is required, if the system is
not capable of asynchronous I- then up to twice the number of disks used by -racle number of #"
writers should be specified by use of the db!writers initiali8ation parameter.
Question <=. I- /ou ha+e an exa.ple ta$le5 %hat is the $est %a/ to 1et siCin1 ata -o" the
p"ou#tion ta$le i.ple.entation2
Ans%e"(
The best way is to analy8e the table and then use the data provided in the #"A!TA"$,0 view to get the
average row length and other pertinent data for the calculation. The quick and dirty way is to look at the
number of blocks the table is actually using and ratio the number of rows in the table to its number of
blocks against the number of expected rows.
Question <1. What spe#ial O"a#le -eatu"e allo%s /ou to spe#i-/ ho% the #ost $ase s/ste. t"eats a
SQL state.ent2
Ans%e"(
The )-0T based system allows the use of *ints to control the optimi8er path selection. If they can give
some example hints such as &I(0T (-<0, A$$ (-<0, 0I/. I/#,B, 0TA(, even better.
Question <). *ou %ant to ete".ine the lo#ation o- ienti#al "o%s in a ta$le $e-o"e atte.ptin1 to
pla#e a uniDue inex on the ta$le5 ho% #an this $e one2
Ans%e"(
select rowid from emp e
where e.rowid A Eselect minEx.rowidF
from emp x
where x.emp!no 3 e.emp!noF;
Question <3. *ou a"e ,oinin1 a lo#al an a "e.ote ta$le5 the net%o"& .ana1e" #o.plains a$out the
t"aM# in+ol+e5 ho% #an /ou "eu#e the net%o"& t"aM#2
Ans%e"(
2ush the processing of the remote data to the remote instance by using a view to pre'select the
information for the join. This will result in only the data required for the join being sent across.
Question <4. 0o% o /ou p"e+ent output -"o. #o.in1 to the s#"een2
Ans%e"(
The 0,T option T,(%-T controls output to the screen. 0etting T,(%-T -&& turns off screen output.
This option can be shortened to T,(%.
Question <6. *ou see .ultiple -"a1.ents in the S*STEB ta$lespa#e5 %hat shoul /ou #he#& '"st2
Ans%e"(
,nsure that users donSTt have the 090T,% tablespace as their T,%2-(A(9 or #,&A$T tablespace
assignment by checking the #"A!0,(0 view.
Question <9. What a"e so.e ini#ations that /ou nee to in#"ease the S0AREDA8OOLASIIE
pa"a.ete"2
Ans%e"(
2oor data dictionary or library cache hit ratios, getting error -(A'JHJG5. Another indication is steadily
decreasing performance with all other tuning parameters the same.
Question <:. When shoul /ou in#"ease #op/ lat#hes2 What pa"a.ete"s #ont"ol #op/ lat#hes2
Ans%e"(
<hen you get excessive contention for the copy latches as shown by the SUredo copy latch hit ratio. 9ou
can increase copy latches via the initiali8ation parameter $-.!0I%$TA/,-0!)-2I,0 to twice the
number of )2s on your system.
Question <;. Des#"i$e hit "atio as it pe"tains to the ata$ase $u!e"s. What is the i!e"en#e
$et%een instantaneous an #u.ulati+e hit "atio an %hi#h shoul $e use -o" tunin12
Ans%e"(
The hit ratio is a measure of how many times the database was able to read a value from the buffers
verses how many times it had to re'read a data value from the disks. A value greater than PJ'IJV is
good, less could indicate problems. If you simply take the ratio of existing parameters this will be a
cumulative value since the database started. If you do a comparison between pairs of readings based on
some arbitrary time span, this is the instantaneous ratio for that time span. .enerally speaking an
instantaneous reading gives more valuable data since it will tell you what your instance is doing for the
time it was generated over.
Question <<. What #an #ause a hi1h +alue -o" "e#u"si+e #alls2 0o% #an this $e 'xe2
Ans%e"(
A high value for recursive calls is cause by improper cursor usage, excessive dynamic space
management actions, and or excessive statement re'parses. 9ou need to determine the cause and
correct it "y either re'linking applications to hold cursors, use proper space management techniques
Eproper storage and si8ingF or ensure repeat queries are placed in packages for proper reuse.
Question 1==. *ou loo& at the $aA"oll$a#&Ase1s +ie% an see that the"e is a la"1e nu.$e" o-
sh"in&s an the/ a"e o- "elati+el/ s.all siCe5 is this a p"o$le.2 0o% #an it $e 'xe i- it is a
p"o$le.2
Ans%e"(
A large number of small shrinks indicates a need to increase the si8e of the rollback segment extents.
Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the si8e of
the extents and adjust optimal accordingly.
Question 1=1. *ou loo& at the $aA"oll$a#&Ase1s +ie% an see that /ou ha+e a la"1e nu.$e" o-
%"aps is this a p"o$le.2
Ans%e"(
A large number of wraps indicates that your extent si8e for your rollback segments are probably too small.
Increase the si8e of your extents to reduce the number of wraps. 9ou can look at the average transaction
si8e in the same view to get the information on transaction si8e.
Question 1=). 0o% .an/ "eo lo1s shoul /ou ha+e an ho% shoul the/ $e #on'1u"e -o"
.axi.u. "e#o+e"a$ilit/2
Ans%e"(
9ou should have at least three groups of two redo logs with the two logs each on a separate disk spindle
Emirrored by -racleF. The redo logs should not be on raw devices on /IB if it can be avoided.
Question 1=3. I- the ata$ase #annot $e $oun#e5 ho% %oul /ou &ill a use"2
Ans%e"(
se commandD
A$T,( 090T,% 1I$$ 0,00I-/ 0I#,0,(IA$W ;
Question 1=4( What is the -"eDuen#/ o- lo1 Upate..2
Ans%e"(
-n commit or
-n checkpoint or
(edolog buffer is 5=Grd full
Question 1=6( 0o% o /ou "ena.e a ata$ase2
Ans%e"(
9ou can change #atabase name by following below procedureD
5. Alter #atabase backup control file to trace;
K. Above step will create a text control file in user!dump!dest directory.
G. )hange name of the #atabase in above file and in init.ora file.
H. 0TA(T2 /-%-/T
M. (un the script that was modified in step G
L. A$T,( #ATA"A0, -2,/ (,0,T$-.0;
Question 1=9( Is it possi$le to #on'1u"e p"i.a"/ se"+e" an stan $/ se"+e" on i!e"ent OS2
Ans%e"(
Answer for this questions is /-. 0tandby database must be on same version of database and same
version of -perating system.
Question 1=:( What oes ata$ase o u"in1 .ountin1 p"o#ess2
Ans%e"(
while mounting the database oracle reads the data from controlfile which is used for verifying physical
database files during sanity check. "ackground processes are started before mounting the database only.
Question 1=;( What is a ealo#& an Explain
Ans%e"(
A deadlock is a condition where two or more users are waiting for data locked by each other. -racle
automatically detects a deadlock and resolves them by rolling back one of the statements involved in the
deadlock, thus releasing one set of data locked by that statement. 0tatement rolled back is usually the
one which detects the deadlock. #eadlocks are mostly caused by explicit locking because oracle does
not do lock escalation and does not use read locks. %ulti'table deadlocks can be avoided by locking the
tables in same order in all the applications, thus precluding a deadlock.
Question 1=<( What a"e the options a+aila$le to "e-"esh snapshots2
Ans%e"(
)-%2$,T, ' Tables are completely regenerated using the snapshots query and the master tables
every time the snapshot referenced.
&A0T ' If simple snapshot used then a snapshot log can be used to send the changes to the snapshot
tables.
&-(), ' #efault value. If possible it performs a &A0T refresh; otherwise it will perform a complete
refresh.
Question 11=( What is snapshot lo12
Ans%e"(
It is a table that maintains a record of modifications to the master table in a snapshot. It is stored in the
same database as master table and is only available for simple snapshots. It should be created before
creating snapshots.
Question 111( What is T%o>8hase Co..it2
Ans%e"(
Two'phase commit is mechanism that guarantees a distributed transaction either commits on all
involved nodes or rolls back on all involved nodes to maintain data consistency across the global
distributed database. It has two phase, a 2repare 2hase and a )ommit 2hase.
Question 11)( Des#"i$e t%o phases o- T%o>phase #o..it2
Ans%e"(
2repare phase ' The global coordinator Einitiating nodeF ask a participants to prepare Eto promise to
commit or rollback the transaction, even if there is a failureF
)ommit ' 2hase ' If all participants respond to the coordinator that they are prepared, the coordinator
asks all nodes to commit the transaction, if all participants cannot prepare, the coordinator asks all
nodes to roll back the transaction.
Question 113( What a"e the -a#to"s #ausin1 the "epa"sin1 o- SQL state.ents in S7A
Ans%e"(
There are main two causes for reparsingD
5. The objects which the query is referencing has been modified
K. The parsed version of sql text has been aged out of the library cache.
Question 114( 0o% to i.ple.ent the .ultiple #ont"ol 'les -o" an existin1 ata$ase
Ans%e"(
5. ,dit init.ora file, set control!files parameter with multiple location
K. shutdown immediate
G. copy control file to multiple locations > confirm from init.ora contol!files parameter
H. start the database.
M. run this query for changes confirmation ' select name from v7controlfile;
Question 116( What is .ean $/ 8"o1"a. 7lo$al A"ea J87AK
Ans%e"(
2.A ' 2rogram .lobal Area
or the 2rocess .lobal Area is a memory region that contains data and control information for a single
server process or a single background process.
The 2.A is allocated when a process is created and de'allocated when the process is terminated. 2.A is
an area that is used by only one process.
Question 119( What is .eant $/ "e#u"si+e hints2
Ans%e"(
/umber of times processes repeatedly query the dictionary table is called recursive hints. It is due to
the data dictionary cache is too small. "y increasing the 0*A(,#!2--$!0I:, parameter we can
optimi8e the si8e of #ata #ictionary )ache.
Question 11:( Is it possi$le to use "a% e+i#es as ata 'les an %hat is the a+anta1es o+e"
'les/ste. 'les 2
Ans%e"(
9es.
The advantages over file system filesD
I=- will be improved because -racle will bypass the -0. #isk )orruption will be very less.
Question 11;( What a"e isa+anta1es o- ha+in1 "a% e+i#es2
Ans%e"(
<e have to depend on export=import utility for backup=recovery
The tar command cannot be used for physical file backup, instead we have to use dd command which is
less flexible and has limited recoveries.
Question 11<. What a"e the s/ste. "esou"#es that #an $e #ont"olle $/ p"o'le2
Ans%e"(
5. /umber of concurrent sessions by user
K. )2 processing time
G. Amount of $ogical I=-
H. Amount of Idle time
Question 1)=. Explain i!e"ent le+el o- Auitin1
Ans%e"(
0tatement Auditing
2rivilege Auditing
-bject Auditing
Question 1)1. Explain the i!e"en#e $et%een ?ORACLEA0OBE an ?ORACLEABASE.
Ans%e"(
-(A)$,!"A0, is the root directory for oracle. -(A)$,!*-%, located beneath -(A)$,!"A0, is
where the oracle products reside.
Question 1)). Na.e th"ee a+iso"/ statisti#s /ou #an #olle#t.
Ans%e"(
#atabase )ache Advisory
0hared 2ool Advisory
2.A Advisory
Question 1)3. When a use" p"o#ess -ails5 %hat $a#&1"oun p"o#ess #leans up a-te" it2
Ans%e"(
2%-/
Question 1)4. 0o% %oul /ou -o"#e a lo1 s%it#h2
Ans%e"(
A$T,( 090T,% 0<IT)* $-.&I$,;
Question 1)6. When #"eatin1 a use"5 %hat pe".issions .ust /ou 1"ant to allo% the. to #onne#t to
the ata$ase2
Ans%e"(
)(,AT, 0,00I-/
Question 1)9. What +ie% %oul /ou use to ete".ine -"ee spa#e in a ta$lespa#e2
Ans%e"(
#"A!&(,,!02A),
Question 1):. 0o% %oul /ou ete".ine %ho has ae a "o% to a ta$le2
Ans%e"(
If database auditing is turned -/, query 090.A#7 table
Question 1);. *ou ha+e ,ust #o.pile a 8LESQL pa#&a1e $ut 1ot e""o"s5 ho% %oul /ou +ie% the
e""o"s2
Ans%e"(
0*-< ,((-(0
Question 1)<. 0o% #an /ou ena$le a t"a#e -o" a session2
Ans%e"(
A$T,( 0,00I-/ 0,T T(A)I/. -/
Question 13=. A DBA ha to "e.o+e so.e A"#hi+elo1s to -"ee up spa#e in 'les/ste.. /ow when
the (%A/ job starts to backup Archivelogs, it complains about missing Archivelogs that were deleted by
#"A. To resolve the issue and continue backing up remainder of Archivelogs, which (%A/ command
can be used so it won4t complain about missing Archivelogs.
Ans%e"(
)rosscheck command
Question 131. Whi#h RBAN #o..an is use to #"eate an exa#t "epli#a o- a ata$ase in ne%
host2
Ans%e"(
#2$I)AT, #ATA"A0,
Question 13). 0o% o /ou install STATS8ACG2
Ans%e"(
"y running 7-(A)$,!*-%,=rdbms=admin=spcreate.sql script
Question 133. 8"o#ess /ou -ollo% to sta"t loo&in1 into 8e"-o".an#e issue at ata$ase le+el EIf the
application is running very slow, at what points do you need to go about the database in order to improve
the performanceXF
Ans%e"(
(un a T-2 command in nix to see )2 usage Eidentify )2 killer processesF
(un +%0TAT, 0A(, and 2(0TAT command to get more information on )2 and memory usage
and possible blocking
(un 0TAT02A)1 report to identifyD
5. T-2 M <AIT ,+,/T0
K. (,0-(), intensive 06$ statements
0ee if 0TATI0TI)0 on affected tables needs to be re'generated
I& poorly written statements are culprit, run a ,B2$AI/ 2$A/ on these statements and see whether
new index or use of *I/T brings the cost of 06$ down.
Question 134. Whi#h is .ost i.po"tant +? +ie% to see pe"-o".an#e "elate in-o".ation2
Ans%e"(
+7<AIT0TAT
Question 136. Explain $elo% %ait e+ents in STATS8ACG "epo"t
#" 0)ATT,(,# (,A#, #" 0,6,/TIA$ (,A$, ,/6,,
Ans%e"(
#" 0)ATT,(,# (,A#
#" 0,6,/TIA$ (,A$
,/6,,
' &$$ TA"$, 0)A/
' I-
' $-)1I/.
Question 136. List '+e .ost i.po"tant pa"a.ete" in <i a!e#tin1 pe"-o".an#e
Ans%e"(
)(0-(!0*A(I/.
#"!)A)*,!0I:,
2.A!A..(,.AT,!TA(.,T
#"!5L1!)A)*,!0I:,, #"!P1!)A)*,!0I:,, #"!K1!)A)*,!0I:,
Question 139. What is 87AAA77RE7ATEATAR7ET2
Ans%e"(
This parameter controls the maximum amount of memory 2.A which can be used by the queries when
<-(1A(,A!0I:,!2-$I)9 is set to Auto.
The value you can be set in "ytes, kilobytes E1F, megabytes E%F or gigabytes E.F. The default value is J
This parameter also has an effect on the execution plans of the cost based optimi8er. The optimi8er uses
the value of the parameter 2.A!A..(,.AT,!TA(.,T to derive an estimate for the minimum and
maximum amount of memory which should be available at run'time for each sort, hash'join and bitmap
operator in the query. "ased on this minimum and maximum value, the optimi8er selects the best plan.
Question 13:. 0o% o /ou anal/Ce ta$le pa"tition usin1 O"a#le p"o+ie pa#&a1e2
Ans%e"(
#"%0!0TAT0..AT*,(!TA"$,!0TAT0 with .(A/$A(IT9 3A 42A(TITI-/4 -2TI-/
Question 13;. *ou see a %ait on LBS p"o#ess in statspa#&5 %hat oes that .ean2
Ans%e"(
A. <ait is due to #ata .uard "roker.
Question 13<. Na.e th"ee a+iso"/ statisti#s /ou #an #olle#t.
Ans%e"(
0*A(,#!2--$!A#+I),
2.A!TA(.,T!A#+I),
#"!)A)*,!A#+I),
Question 14=. Explain p"o#eu"e to Chan1e C0ARACTERSET o- a ata$ase.
Ans%e"(
)an4t change )*A(A)T,(0,T of a database, you will need to re'create the database with appropriate
)*A(A)T,(0,T.
Question 141. I- /ou ha a ta$lespa#e5 TESTATABLES8ACE5 %hi#h #onsists o- th"ee 'les(
T,0TJ5.dbf, T,0TJK.dbf, and T,0TJG.dbf, and someone accidentally used the nix command YrmY to
delete the file T,0TJK.dbf, what else would you need in order to recover all the data that was present in
T,0T!TA"$,02A), at the time that T,0TJK.dbf was deletedX
Ans%e"(
All Archivelogs
Question 14). 0o% o /ou put ata$ase is ARC0IVELO7 .oe5 explain p"o#eu"e
Ans%e"(
5. %odify init.ora parameter 0TA(T!A()*I+,3T(,
K. 06$A 0*T#-</ I%%,#IAT,;
G. 0TA(T2 %-/T;
H. A$T,( #ATA+A0, A()*I+,$-.;
M. A$T,( #ATA"A0, -2,/;
Question 143. 0o% o /ou #"eate 8ASSWORD FILE2
Ans%e"(
using orapwd utility
Question 144. 0o% #an /ou tell i- an inex on pa"ti#ula" ta$le is USED o" NOT USED in <i2
Ans%e"(
"y turning %-/IT-(I/. -/ that index and querying into I/#,B!0A., table
Question 146. 0o% o /ou s%it#h -"o. an init.o"a 'le to a sp'le2
Ans%e"(
06$A )(,AT, 02&I$, &(-% 2&I$,;
Question 149. Explain FORCE LO77IN7 -eatu"e in <i.
Ans%e"(
"y setting &-(), $-..I/. to T(,, all transactions will generate (,#-. This is used for #ata .uard,
so no data will be missed Ei.e. transactions that were run with /-$-..I/. optionF in 0tandby database
Question 14:. Explain the use o- settin1 7LOBALANABES eDual to TRUE.
Ans%e"(
0etting .$-"A$!/A%,0 dictates how you might connect to a database. This variable is either T(, or
&A$0, and if it is set to T(, it enforces database links to have the same name as the remote database
to which they are linking.
Question 14;. 0o% o /ou set up <i Data 7ua"2
Ans%e"(
Take a full hot backup of 2rimary database
)reate standby control file
Transfer full backup, init.ora, standby control file to standby node.
%odify init.ora file on standby node.
(estore database
(ecover 0tandby database
EAlternatively, (%A/ command DU8LICATE DATABASE FOR STANDB* DO RECOVER* can
be also usedF
0etup &A$!)$I,/T and &A$!0,(+,( parameters on both sides
2ut 0tandby database in %anaged (ecover mode
Question 14<. 0o% o /ou #"eate 8h/si#al Stan$/ ata$ase2
Ans%e"(
Take a full hot backup of 2rimary database
)reate standby control file
Transfer full backup, init.ora, standby control file to standby node.
%odify init.ora file on standby node.
(estore database
(ecover 0tandby database
EAlternatively, (%A/ command DU8LICATE DATABASE FOR STANDB* DO RECOVER* can
be also usedF
0etup &A$!)$I,/T and &A$!0,(+,( parameters on both sides
2ut 0tandby database in %anaged (ecover mode
Question 16=. Explain LO7AARC0IVEADESTA) pa"a.ete" an Data1ua" "elate pa"a.ete"s.
Ans%e"(
log!archive!dest!K340,(+I),3-(A)$,!0I#!0T"9 optional lgwr async3KJHPJ noaffirm reopen35M
max!failure35J net!timeout3GJ delay3J4
Question 161. Explain Data$ase SWITC0 OVER 8ROCEDURE
Ans%e"(
-n 2rimaryD
alter database commit to switchover to physical standby with session shutdown;
shutdown;
startup nomount;
alter database mount standby database;
recover managed standby database disconnect from session;
-n 0tandbyD
alter database commit to switchover to primary;
shutdown;
startup;
Question 16). Exaplain 0o% to A#ti+ate STANDB* Data$ase
Ans%e"(
A$T,( #ATA"A0, (,)-+,( %A/A.,# 0TA/#"9 #ATA"A0, )A/),$;
A$T,( #ATA"A0, A)TI+AT, 0TA/#"9 #ATA"A0,;
0*T#-</ I%%,#IAT,;
0TA(T2;
Question 163. What o /ou &no% a$out VCS2
Ans%e"(
+)0 stands for +eritas )luster 0oftware.
+)0 is used as a *igh Availability solution in case of host failure. There will be typically two nodes in a
cluster and database will be running on one node. Incase of host failure, +)0 will failover database
Eservice groupF to second node.
Question 164. What a"e t/pi#al "esou"#es in VCS se"+i#e 1"oup2
Ans%e"(
In typical +)0 configuration, there are three main resources required for -racle database failover.
5. -racle #atabase
K. $istener
G. &ilesystems
Question 166. Whi#h 'le #ontains VCS se"+i#e 1"oup an "esou"#e in-o".ation2
Ans%e"(
%ain.cf
Question 169. What ata$ase "elate in-o".ation %e nee to set in VCS2
Ans%e"(
-(A)$,!0I#
$I0T,/,( name
$I0T,/,( password Eif usedF
-racle filesystems that will be failed over
$ocation to init.ora=spfile if not available at default location
Question 16:. What is VCS in>epth .onito"in12
Ans%e"(
In +)0 in'depth monitoring, a database user E+)0%-/F will be created which will login to database at
certain interval Ei.e. every M minuteF to see if database connectivity is -1. &or some reason, if this user
can t login +)0 will fail over the database to second node.
Question 16;. In ACTIVE VCS en+i"on.ent5 /ou nee to "e#/#le the ata$ase $ut oesnNt %ant
ata$ase to -ailo+e" to othe" noe. <hat you must do before shutting down the database, so it doesn t
failover to other nodeX
Ans%e"(
9ou need to &(,,:, the service group.
Alternatively, you can make -racle resource /-/')(ITI)A$ Enot recommendedF
Question 16<. What i- /ou a##ientall/ shuto%n the LISTENER in VCS en+i"on.ent2
Ans%e"(
If $istener (esource is marked )(ITI)A$, and (estart Attempt is set to J, then 0ervice .roup will failover
to second node.
It is recommended for $istener resource to set (,0TA(T ATT,%2T0 value to G.
Question 19=. Explain Auto.ati# Se1.ent Spa#e Bana1e.ent
Ans%e"(
Automatic 0egment 0pace %anagement features was introduced in Ii which simplifies management of
free space usage within object for below parameterD
&(,,$I0T
&(,,$I0T .(-20
2)T0,#
Question 191. 0o% o /ou REBUILD inex online an Co.pute Statisti#s at the sa.e ti.e2
Ans%e"(
A$T,( I/#,B I/#,B!/A%, REBUILD )-%2T, 0TATI0TI)0 ONLINEO
Question 19). Explain Bit.ap Poin Inexes
Ans%e"(
"itmap ?oin Indexes pre'stores results of a join and can avoid an expensive join operation at runtime.
Question 19). Whi#h pa"a.ete"s #an $e .oi'e /na.i#all/ as pa"t o- <i D/na.i# Be.o"/
Bana1e.ent -eatu"e2
Ans%e"(
"elow parameters can be modified dynamically as part of Ii #ynamic %emory %anagement feature
#"!)A)*,!0I:,
0*A(,#!2--$!0I:,
$A(.,!2--$!0I:,
?A+A!2--$!0I:,
Question 193. What aitional statisti#s a"e 1athe"e $/ DBBSASTATS that %e"e not a+aila$le in
ea"lie" +e"sion o" $/ usin1 ANAL*E #o..an2
Ans%e"(
In Ii #"%0!0TAT0 package now collects below statistics as wellD
)2 sage
0ystem I=-
Question 193. Explain Di!e"ent +alues suppo"te $/ CURSORAS0ARIN7 pa"a.ete" an its
explanation
Ans%e"(
"elow values are supported by )(0-(!0*A(I/. init.ora parameterD
&-(), ' $iterals will be replaced by system generated bind variables where possible
0I%I$A( ' -racle determines which literals are YsafeY for substitution with bind variables. This will result
in some 06$ not being shared in an attempt to provide a more efficient execution plan.
,BA)T ' -nly allows statements with identical text to share the same cursor
Question 193. Na.e th"ee +e"/ i.po"tant 0it Ratios in ata$ase
Ans%e"(
"uffer )ache *it (atio
#ata #ictionary *it (atio
$ibrary )ache *it (atio
Ese +70900TATF
Ese +7(-<)A)*,F
Ese +7$I"(A(9)A)*,, +70.A0TATF
Question 194. Na.e Di!e"ent Lat#hes in ata$ase an D/na.i# 8e"-o".an#e Vie%s to 1et .o"e
in-o".ation a$out Lat#hes
Ans%e"(
#atabase $atchesD
(edo Allocation $atch
(edo )opy $atch
(ow )ache $atch
se +7$AT)*, +7$AT)**-$#,(, +7$AT)*/A%, to get more information about the latches
Question 196. In %hi#h s#ena"ios /ou nee to set La"1e 8ool2
Ans%e"(
9ou need to set $arge 2ool if you are using belowD
%T0 E%ultithreaded 0erverF
(%A/ backups
Question 199. Explain Tunin1 8"o#ess that in+ol+es Appli#ation5 Data$ase5 OS5 Net%o"&
Ans%e"(
In such a scenario, tuning should perform in following orderD
5. "usiness (ules
K. #ata #esign
G. Application #esign
H. $ogical 0tructure of the #atabase
M. #atabase -perations
L. Access 2ath
O. %emory Allocation
P. I=- and 2hysical 0tructure of the #atabase
I. (esource Allocation
5J. -0
Question 19:. Explain Di!e"ent Tunin1 A"eas in Data$ase
Ans%e"(
&ollowing areas within database can be tunedD
%emory '
I=- '
)2
0pace %anagement
(edo > )heckpoint
(ollback '
0hared 2ool, "uffer )ache, (edo "uffer, 0ort Area 0i8e, 2.A, $arge 2ool
%ultiple #atabase <riter 2rocesses, #istributing I=-, (AI#
,xtent Allocation, -racle "lock ,fficiency
(edo log file configuration, checkpoints
(etention, number of (ollback 0egments, -ptimal
Question 19;. 0o% o /ou setup Auitin1 in Data$ase2
Ans%e"(
If audit packages are not installed, run 7-(A)$,!*-%,=rdbms=admin=cataudit.sql script
%odify initiali8ation parameter A#IT!T(AI$3#" and setup A#IT!#%2!#,0T
0elect what type of operations needs to be audited
+iew Audit results from 090.A#7 table
Question 19<. Can /ou Auit S/ste. Ope"ations2 I- *es5 ho%2
Ans%e"(
090 connections can be audited by setting init.ora parameter A#IT!090!-2,(ATI-/03T(,
Question 1:=. 0o% #an /ou setup En#"/ption in Data$ase2
Ans%e"(
#ata within #atabase can be encrypted and decrypted using packageD
#"%0!-"&0)ATI-/!T--$1IT
Question 1:1. Na.e '+e pa"a.ete"s #an $e use -o" 8ass%o" Bana1e.ent2
Ans%e"(
&ollowing parameters can be used to manage user passwordD
5.
K.
G.
H.
M.
&AI$,#!$-.I/!ATT,%2T0
2A00<-(#!.(A),!TI%,
2A00<-(#!$I&,!TI%,
2A00<-(#!(,0,!%AB
2A00<-(#!(,0,!TI%,
Question 1:)( What is i!e"en#e $et%een Lo1i#al Stan$/ Data$ase an 8h/si#al Stan$/
ata$ase2
Ans%e"(
The primary functional difference between logical and physical standby database setups is that logical
standby permits you to add additional objects Etables, indexes, etcF to the database, while physical
standby is always an exact structural duplicate of the master database. The downside, though, is that
logical standby is based on newer technologies Elogical standby is new in -racle I.KF and tends to be
generally regarded as more temperamental than physical standby.
Te#hni#al Q UNI@
,very #"A should know something about the operating system that the database will be running on. The
questions here are related to /IB but you should equally be able to answer questions related to
common <indows environments.
Question 1. 0o% o /ou list the 'les in an UNI@ i"e#to"/ %hile also sho%in1 hien 'les2
Ans%e"(
ls 'ltra
Question ). 0o% o /ou exe#ute a UNI@ #o..an in the $a#&1"oun2
Ans%e"(
se the Y>Y at the end of command
Question 3. What UNI@ #o..an %ill #ont"ol the e-ault 'le pe".issions %hen 'les a"e #"eate2
Ans%e"(
mask
Question 4. Explain the "ea5 %"ite5 an exe#ute pe".issions on a UNI@ i"e#to"/.
Ans%e"(
(ead allows you to see and list the directory contents.
<rite allows you to create, edit and delete files and subdirectories in the directory.
,xecute gives you the previous read=write permissions plus allows you to change into the directory and
execute programs or shells from the directory.
Question 6. The i!e"en#e $et%een a so-t lin& an a ha" lin&2
Ans%e"(
A symbolic EsoftF linked file and the targeted file can be located on the same or different file system while
for a hard link they must be located on the same file system.
Question 9. 7i+e the #o..an to ispla/ spa#e usa1e on the UNI@ 'le s/ste..
Ans%e"(
df 'lk
Question :. Explain iostat5 +.stat an netstat.
Ans%e"(
Iostat reports on terminal, disk and tape I=- activity.
V.stat reports on virtual memory statistics for processes, disk, tape and )2 activity.
Netstat reports on the contents of network data structures.
Question ;. 0o% %oul /ou #han1e all o##u""en#es o- a +alue usin1 VI2
Ans%e"(
seDVs=@oldA=@newA=g
Question <. 7i+e t%o UNI@ &e"nel pa"a.ete"s that e!e#t an O"a#le install
Ans%e"(
0*%%AB > 0*%%/I
Question 1=. B"ieR/5 ho% o /ou install O"a#le so-t%a"e on UNI@.
Ans%e"(
"asically, set up disks, kernel parameters, create oracle user and dba group, and run runinstaller.
Question 11. 0o% o /ou #"eate a e#ision t"ee in a shell s#"ipt2
Ans%e"(
#epending on shell, usually a case'esac or an if'endif or fi structure
Question 1). What is a pipe an 1i+e an exa.ple2
Ans%e"(
A pipe is two or more commands separated by pipe char 4Z4. That tells the shell to arrange for the output of
the preceding command to be passed as input to the following command.
,xample D ls 'l Z pr
The output for a command ls is the standard input of pr.
<hen a sequence of commands are combined using pipe, then it is called pipeline.
Question 13. What is the i!e"en#e $et%een S an SS "ei"e#tion ope"ato"s2
Ans%e"(
A is the output redirection operator when used it overwrites while AA operator appends into the file.
Question 14. What is the i!e"en#e $et%een p"o#ess an th"ea.
Ans%e"(
)reation of new process requires new resources and Address space whereas the thread can be created
in the same address space of the process which not only saves space and resources but are also easy to
create and delete, and many threads can exists in a process.
Question 16. What is the i!e"en#e $et%een a shell +a"ia$le that is expo"te an the one that is
not expo"te2
Ans%e"(
export $A/.3)
will make the variable $A/. the global variable, put it into the global environment. all other processes
can use it.
$A/.3)
will change the value only in the current script.
Question 19. 0o% %ill /ou list onl/ the e.pt/ lines in a 'le Jusin1 1"epK
Ans%e"(
grep Y[7Y filename.txt
Question 1:. What is Se.apho"e2
Ans%e"(
A data object that represents the right to use a limited resource, used for synchroni8ation and
communication between asynchronous processes.
Question 1;. 0o% o /ou exe#ute a UNI@ #o..an in the $a#&1"oun2
Ans%e"(
9ou can use > at the end of command or use nohup command
Question 1<. 0o% o /ou #he#& a#ti+e sha"e .e.o"/ se1.ents2
Ans%e"(
ipcs 'a
Question )=. 0o% o /ou #he#& 8a1in1ES%appin1 in Unix2
Ans%e"(
9ou can check 2aging=0wapping using below commands
vmstat s
prstat s
swap l
sar p
Question )1. 0o% o /ou #he#& nu.$e" o- C8U installe on Unix se"+e"2
Ans%e"(
psrinfot v
Question )). 0o% o /ou #he#& 8a1in1ES%appin1 in Unix2
Ans%e"(
+mstat s
2rstat s
0wap l
0ar p
8RACTICAL ORACLE DBA QUESTIONS(
A #"A interview can be difficult both for the interviewer and the candidate. The role involves technical
skills, process skills, and personal communications skills. Although those three skill sets are all critical,
most Y#"A interview questionsY articles in the past have focused only on the questions you can use to
judge a person s technical qualifications. In this article, you will see questions an interviewer can pose to
the #"A candidate to judge the other attributes of the job.
In addition, this article includes a set of questions #"As should ask at some point during their interviews.
If the interviewer stops and asks Y#o you have any questions for meXY don t sit there quietly. The
emphasis of the #"A questions provided in this article is the organi8ation s process focus and its
technical career path for #"As. All of the questions provided here are intended as starting points; based
on the answers to the questions, you should ask follow'ups to understand how the answer will affect your
day'to'day activities and your long'term prospects. -f course, if you ask a question to the interviewer, you
should be prepared to answer the same question concerning your present work environment.
Questions to as& the inte"+ie%e"(
8"o#ess #ont"ol issues(
<hat processes do you follow while implementing changes in productionX
"eside the #"As and system administrators, who has access to the Y-racleY operating system accountX
*ow often is the oracle operating system account password changedX
Are the #"As co'located with the teams they supportX *ow is capacity planning performedX
Is there adequate capacity already in place to support the expected growth over the next yearX &uture
opportunities=organi8ation issuesD
Is there a formal job definition for the #"A roleX Is there a defined technical career pathX
*ow is IT aligned with the business areasX
*ow many employees report to more than one managerX *ow do you determine if a #"A has been
successfulX
*ow are the application #"As and production control #"As organi8edX
Questions that %ill $e as&e to /ou
W"itin1 s&ills(
2lease bring along a copy of the last status report you ve submitted, as well as any articles. If you haven t
brought one along, please mail me one after the interview.
8e"se+e"an#e in te#hni#al expe"tise(
<hat errors did you hit during your most recent database recoveryX
<hat was the most difficult technical obstacle you encountered during your last projectX
8e"se+e"an#e in "elationships(
<hat negative Ygroup relationshipY issues exist in your current working environmentX *ow are you
addressing themX
<hat is your most difficult set of users, and how do you manage that relationshipX <hat do you want to
learn in the next 5K monthsX
<hat communications method do you usually use when dealing with usersX )an you provide examplesX
<hat communications method is most effective when customers need your helpX
Te#hni#al Expe"ien#e(
Ese hypothetical questions rather than straight technical questionsF
<hat database and overall architecture would you suggest for testing new middleware without impacting
productionX
*ow do you assess my database s healthX
*ow would you approach a performance problem with a three'tier applicationX *ow do you test your
backup=recovery proceduresX
*ow would you support the upgrade process for multiple applications, with different application rollout
cycles, in the same instanceX
These are samples; use a question from each category to guide a discussion of the way the
communications skills, process knowledge, and technical aspects of the job are interrelated in the role. If
the interviewer and the candidate can agree on what a successful #"A looks like in the environment,
there is a strong foundation for a future working relationship.
/ot having data governance can hurt your business. #ownload this e"ook to learn how to take control now.
Featured Database Articles
ORACLE
Posted Dec 12, 2003
Oracle Technical Interview Questions Answered - Part2
By James oo!mann
This is the second part of the two part series on helping you answer those tough questions that you might experience
in your quest for an Oracle D! position"
The Oracle Technical #nter$iew can %e quite daunting" &ou ne$er quite 'now what to study for and how to prepare" #
am fully aware of this, as # ha$e recei$ed many emails since my original article on inter$iew questions was released"
(hile these questions are only guidelines as to what should and more than li'ely will %e as'ed, # hope that you find
some comfort in the re$iew of them" !s always, do not )ust memori*e the answers, as there are )ewels to %e found in
the quest of figuring out the answer from the question" !s always, remem%er that as you go through the article, it is
not enough to 'now the answer to a particular question+ you must try to put yourself in an inter$iew situation and
experience answering the question for yourself" Therefore, after you ha$e gone through the questions and answers
read the question again and then answer it with your own words" !s always, good luc', and cheers"
Technical - Oracle
,ast time, we answered questions 1 thru 20 of the technical part of the inter$iew" -ere are the next 30 in this
section" Depending on the mood of the inter$iew and your a%ility to ela%orate on the answer, try to gi$e some insight
that you 'now more than )ust the simple answer to some of these questions" !lso, %e sensiti$e to the inter$iewer
getting tired of you tal'ing too much" (ell here they are"
2"# $ow would you determine the time %one under which a database was o!eratin&'
select DT#./0O1/ from dual+
22# ()!lain the use o* settin& +,OBA,-.A/(0 e1ual to T23(#
2etting +,OBA,-.A/(0 dictates how you might connect to a data%ase" This $aria%le is either T34/ or 5!,2/ and if
it is set to T34/ it enforces data%ase lin's to ha$e the same name as the remote data%ase to which they are lin'ing"
24# 5hat command would you use to encry!t a P,60Q, a!!lication'
(3!P
27# ()!lain the di**erence between a F3.8TIO.9 P2O8(D32( and PA8A+(#
! function and procedure are the same in that they are intended to %e a collection of P,627, code that carries a
single tas'" (hile a procedure does not ha$e to return any $alues to the calling application, a function will return a
single $alue" ! pac'age on the other hand is a collection of functions and procedures that are grouped together %ased
on their commonality to a %usiness function or application"
2:# ()!lain the use o* table *unctions#
Ta%le functions are designed to return a set of rows through P,627, logic %ut are intended to %e used as a normal
ta%le or $iew in a 27, statement" They are also used to pipeline information in an /T, process"
2;# .ame three advisory statistics you can collect#
uffer 8ache !d$ice, 2egment ,e$el 2tatistics, 9 Timed 2tatistics
2<# 5here in the Oracle directory tree structure are audit traces !laced'
#n unix :O3!8,/;-O./6rd%ms6audit, in (indows the e$ent $iewer
2=# ()!lain materiali%ed views and how they are used#
.ateriali*ed $iews are o%)ects that are reduced sets of information that ha$e %een summari*ed, grouped, or
aggregated from %ase ta%les" They are typically used in data warehouse or decision support systems"
2># 5hen a user !rocess *ails9 what bac?&round !rocess cleans u! a*ter it'
P.O1
4@# 5hat bac?&round !rocess re*reshes materiali%ed views'
The <o% 7ueue Processes"
4"# $ow would you determine what sessions are connected and what resources they are waitin& *or'
4se of =:2/22#O1 and =:2/22#O1;(!#T
42# Describe what redo lo&s are#
3edo logs are logical and physical structures that are designed to hold all the changes made to a data%ase and are
intended to aid in the reco$ery of a data%ase"
44# $ow would you *orce a lo& switch'
!,T/3 2&2T/. 2(#T8- ,O>5#,/+
47# +ive two methods you could use to determine what DD, chan&es have been made#
&ou could use ,ogminer or 2treams
4:# 5hat does coalescin& a tables!ace do'
8oalescing is only $alid for dictionary?managed ta%lespaces and de?fragments space %y com%ining neigh%oring free
extents into large single extents"
4;# 5hat is the di**erence between a T(/PO2A2A tables!ace and a P(2/A.(.T tables!ace'
! temporary ta%lespace is used for temporary o%)ects such as sort structures while permanent ta%lespaces are used
to store those o%)ects meant to %e used as the true o%)ects of the data%ase"
4<# .ame a tables!ace automatically created when you create a database#
The 2&2T/. ta%lespace"
4=# 5hen creatin& a user9 what !ermissions must you &rant to allow them to connect to the database'
>rant the 8O11/8T to the user"
4># $ow do you add a data *ile to a tables!ace'
!,T/3 T!,/2P!8/ @ta%lespace;nameA !DD D!T!5#,/ @datafile;nameA 2#0/ @si*eA
7@# $ow do you resi%e a data *ile'
!,T/3 D!T!!2/ D!T!5#,/ @datafile;nameA 3/2#0/ @new;si*eA+
7"# 5hat view would you use to loo? at the si%e o* a data *ile'
D!;D!T!;5#,/2
72# 5hat view would you use to determine *ree s!ace in a tables!ace'
D!;53//;2P!8/
74# $ow would you determine who has added a row to a table'
Turn on fine grain auditing for the ta%le"
77# $ow can you rebuild an inde)'
!,T/3 #1D/B @index;nameA 3/4#,D+
7:# ()!lain what !artitionin& is and what its bene*it is#
Partitioning is a method of ta'ing large ta%les and indexes and splitting them into smaller, more managea%le pieces"
7;# Aou have Bust com!iled a P,60Q, !ac?a&e but &ot errors9 how would you view the errors'
2-O( /33O32
7<# $ow can you &ather statistics on a table'
The !1!,&0/ command"
7=# $ow can you enable a trace *or a session'
4se the D.2;2/22#O1"2/T;27,;T3!8/ or
4se !,T/3 2/22#O1 2/T 27,;T3!8/ C T34/+
7># 5hat is the di**erence between the 0Q,C,oader and I/PO2T utilities'
These two Oracle utilities are used for loading data into the data%ase" The difference is that the import utility relies
on the data %eing produced %y another Oracle utility /BPO3T while the 27,D,oader utility allows data to %e loaded
that has %een produced %y other utilities from different data sources )ust so long as it conforms to !28## formatted or
delimited files"
:@# .ame two *iles used *or networ? connection to a database#
T121!./2"O3! and 27,1/T"O3!
Technical - 3.ID
/$ery D! should 'now something a%out the operating system that the data%ase will %e running on" The questions
here are related to 41#B %ut you should equally %e a%le to answer questions related to common (indows
en$ironments"
"# $ow do you list the *iles in an 3.ID directory while also showin& hidden *iles'
ls ?ltra
2# $ow do you e)ecute a 3.ID command in the bac?&round'
4se the E9E
4# 5hat 3.ID command will control the de*ault *ile !ermissions when *iles are created'
4mas'
7# ()!lain the read9 write9 and e)ecute !ermissions on a 3.ID directory#
3ead allows you to see and list the directory contents"
(rite allows you to create, edit and delete files and su%directories in the directory"
/xecute gi$es you the pre$ious read6write permissions plus allows you to change into the directory and execute
programs or shells from the directory"
:# the di**erence between a so*t lin? and a hard lin?'
! sym%olic FsoftG lin'ed file and the targeted file can %e located on the same or different file system while for a hard
lin' they must %e located on the same file system"
;# +ive the command to dis!lay s!ace usa&e on the 3.ID *ile system#
df ?l'
<# ()!lain iostat9 vmstat and netstat#
#ostat reports on terminal, dis' and tape #6O acti$ity"
=mstat reports on $irtual memory statistics for processes, dis', tape and 8P4 acti$ity"
1etstat reports on the contents of networ' data structures"
=# $ow would you chan&e all occurrences o* a value usin& EI'
4se HIs6@oldA6@newA6g
># +ive two 3.ID ?ernel !arameters that e**ect an Oracle install
2-..!B 9 2-..1#
"@# Brie*ly9 how do you install Oracle so*tware on 3.ID#
asically, set up dis's, 'ernel parameters, and run orainst"

S-ar putea să vă placă și