Vous êtes sur la page 1sur 12

MID LEVEL ORACLE DBA INTERVIEW QUESTIONS

Question 1: what is die!en"e #etween Co$!e%ated su# &ue!' and nested su# &ue!'(
Answe!:
Co$!e%ated su# &ue!' is one in whi"h inne! &ue!' is e)a%uated on%' on"e and !o* that !esu%t oute!
&ue!' is e)a%uated+
Nested &ue!' is one in whi"h Inne! &ue!' is e)a%uated o! *u%ti,%e ti*es o! -ettin- one !ow o that
oute! &ue!'+
e.+ Que!' used with IN/0 "%ause is Co$!e%ated &ue!'+
Que!' used with 1 o,e!ato! is Nested &ue!'
Question 2: 3ow do I w!ite a "!on whi"h wi%% !un a SQL &ue!' and *ai% the !esu%ts to a
-!ou,(
Answe!:
Use DBMS45OB o! s"hedu%in- a "!on 6o# and DBMS4MAIL to send the !esu%ts th!ou-ht e*ai%+
Question 7: What o,e!ato! ,e!o!*s ,atte!n *at"hin-
Answe!:
LI8E o,e!ato!
Question 9: What is the use o the DRO: o,tion in the ALTER TABLE "o**and
Answe!:
It is used to d!o, "onst!aints s,e"iied on the ta#%e+
Question ;: Whi"h date un"tion is used to ind the die!en"e #etween two dates
Answe!:
MONT3S4BETWEEN
Question <: What is the ad)anta-e o s,e"i'in- WIT3 =RANT O:TION in the =RANT
"o**and(
Answe!:
The ,!i)i%e-e !e"ei)e! "an u!the! -!ant the ,!i)i%e-es he>she has o#tained !o* the owne! to an'
othe! use!+
Question ?: What is the use o CASCADE CONSTRAINTS
Answe!:
When this "%ause is used with the DRO: "o**and@ a ,a!ent ta#%e "an #e d!o,,ed e)en when a
"hi%d ta#%e e.ists+
Question A: Whi"h un"tion is used to ind the %a!-est inte-e! %ess than o! e&ua% to a
s,e"ii" )a%ue
Answe!:
BLOOR
Question C: What o,e!ato! tests "o%u*n o! the a#sen"e o data
Answe!:
IS NULL o,e!ato!
Question 1D: What a!e the ste,s in)o%)ed in Data#ase Sta!tu,(
Answe!:
Sta!t an instan"e@ Mount the Data#ase and O,en the Data#ase+
Question 11: What a!e the ste,s in)o%)ed in Data#ase Shutdown(
Answe!:
C%ose the Data#aseE Dis*ount the Data#ase and Shutdown the Instan"e+
Question 12: What is Rest!i"ted Mode o Instan"e Sta!tu,(
Answe!:
An instan"e "an #e sta!ted in /o! %ate! a%te!ed to #e in0 !est!i"ted *ode so that when the
data#ase is o,en "onne"tions a!e %i*ited on%' to those whose use! a""ounts ha)e #een
-!anted the RESTRICTED SESSION s'ste* ,!i)i%e-e+
Question 17: What a!e the die!ent *odes o *ountin- a Data#ase with the :a!a%%e%
Se!)e!(
Answe!:
E."%usi)e Mode I the i!st instan"e that *ounts a data#ase does so in e."%usi)e *ode@ on%'
that Instan"e "an *ount the data#ase+
:a!a%%e% Mode I the i!st instan"e that *ounts a data#ase is sta!ted in ,a!a%%e% *ode@ othe!
instan"es that a!e sta!ted in ,a!a%%e% *ode "an a%so *ount the data#ase+
Question 19: What is Bu%% Ba"Fu,(
Answe!:
A u%% #a"Fu, is an o,e!atin- s'ste* #a"Fu, o a%% data i%es@ on$%ine !edo %o- i%es and "ont!o%
i%e that "onstitute ORACLE data#ase and the ,a!a*ete!+
Question 1;: Can Bu%% Ba"Fu, #e ,e!o!*ed when the data#ase is o,en(
Answe!:
No+
Question 1<: What is :a!tia% Ba"Fu,(
Answe!:
A :a!tia% Ba"Fu, is an' o,e!atin- s'ste* #a"Fu, sho!t o a u%% #a"Fu,@ taFen whi%e the
data#ase is o,en o! shut down+
Question 1?: 199+ What is On$%ine Redo Lo-(
Answe!:
The On$%ine Redo Lo- is a set o tow o! *o!e on$%ine !edo i%es that !e"o!d a%% "o**itted "han-es
*ade to the data#ase+ Whene)e! a t!ansa"tion is "o**itted@ the "o!!es,ondin- !edo ent!ies
te*,o!a!i%' sto!es in !edo %o- #ue!s o the S=A a!e w!itten to an on$%ine !edo %o- i%e #'
the #a"F-!ound ,!o"ess L=WR+ The on$%ine !edo %o- i%es a!e used in "'"%i"a% ashion+
Question 1A: What is Mi!!o!ed on$%ine Redo Lo-(
Answe!:
A *i!!o!ed on$%ine !edo %o- "onsists o "o,ies o on$%ine !edo %o- i%es ,h'si"a%%' %o"ated on
se,a!ate disFsE "han-es *ade to one *e*#e! o the -!ou, a!e *ade to a%% *e*#e!s+
Question 1C: What is A!"hi)ed Redo Lo-(
Answe!:
A!"hi)ed Redo Lo- "onsists o Redo Lo- i%es that ha)e a!"hi)ed #eo!e #ein- !eused+
Question 2D: What a!e the ad)anta-es o o,e!atin- a data#ase in ARC3IVELO= *ode
o)e! o,e!atin- it in NO ARC3IVELO= *ode(
Answe!:
Co*,%ete data#ase !e"o)e!' !o* disF ai%u!e is ,ossi#%e on%' in ARC3IVELO= *ode+
On%ine data#ase #a"Fu, is ,ossi#%e on%' in ARC3IVELO= *ode+
Question 21: What is Lo- Swit"h(
Answe!:
The ,oint at whi"h ORACLE ends w!itin- to one on%ine !edo %o- i%e and #e-ins w!itin- to anothe!
is "a%%ed a %o- swit"h+
Question 22: What a!e the ste,s in)o%)ed in Instan"e Re"o)e!'(
Answe!:
Ro%%in- o!wa!d to !e"o)e! data that has not #een !e"o!ded in data i%es@ 'et has #een !e"o!ded
in the on$%ine !edo %o-@ in"%udin- the "ontents o !o%%#a"F se-*ents+
Ro%%in- #a"F t!ansa"tions that ha)e #een e.,%i"it%' !o%%ed #a"F o! ha)e not #een "o**itted as
indi"ated #' the !o%%#a"F se-*ents !e-ene!ated in ste, a+
Re%easin- an' !esou!"es /%o"Fs0 he%d #' t!ansa"tions in ,!o"ess at the ti*e o the ai%u!e+
Reso%)in- an' ,endin- dist!i#uted t!ansa"tions unde!-oin- a two$,hase "o**it at the ti*e o
the instan"e ai%u!e+
Question 27: Do 'ou need a "o**it ate! DDL state*ents(
Answe!:
DDL IS A AUTO COMMIT GOU DON T NEED TO COMMIT A=AIN
Question 29: 3ow wou%d 'ou ,ass hints to the SQL ,!o"esso!(
Answe!:
USIN= COMMENT LINES WIT3 /H0 SI=N GOU CAN :ASS T3E 3INTS TO SQL EN=INE
Bo! e.a*,%e I >J H:ARALLEL/ 0 J>
Question 2;: what is the die!en"e #etween -!ou, #' and o!de! #'(
Answe!:
=!ou, #' is used when we use a--!e-ate un"tions on the "o%u*ns in a &ue!' the othe! "o%u*ns
shou%d #e in -!ou, #' &ue!'
e-:
se%e"t e*,no@ena*e@su*/sa%0 !o* e*,
-!ou, #' e*,no@ena*e
O!de! #' is used to so!t )a%ues eithe! in as"endin- o! des"endin- o!de!
Question 2<: What a!e the La!-e o#6e"t t',es su,,o!ted #' O!a"%e(
Answe!:
BLOB
CLOB
NLOB
These usua%%' su,,o!t data u, to 9=B
Question 2?: What a!e the Cha!a"te!isti"s o Data Bi%es(
Answe!:
A data i%e "an #e asso"iated with on%' one data#ase+ On"e "!eated a data i%e "anKt "han-e siLe+
One o! *o!e data i%es o!* a %o-i"a% unit o data#ase sto!a-e "a%%ed a ta#%es,a"e
Question 2A: What is the die!en"e #etween SID and =%o#a% Data#ase Na*e(
Answe!: SID /S'ste* Identiie!0 : A SID /a%*ost0 uni&ue%' identiies an instan"e+ A"tua%%'@
MORACLE43OME@ MORACLE4SID and M3OSTNAME identi' an instan"e uni&ue%'+ The SID is
<9 "ha!a"te!s@ o! %essE at %east on O!a"%e Ci+ The s'ste* identiie! is in"%uded in the
CONNECT4DATA ,a!ts o the "onne"t des"!i,to!s in a tnsna*es+o!a i%e+ The SID deau%ts to the
data#ase na*e+
=%o#a% Data#ase Na*e : A data#ase is uni&ue%' identiied #' a -%o#a% data#ase na*e+ Usua%%'@ a
-%o#a% data#ase na*e has the o!* so*ena*e+do*ain+ The -%o#a% data#ase na*e is the
"o*,osit o d#4do*ain and d#4na*e+
Question 2C: What is the die!en"e #etween *ate!ia%iLed )iew and sna,shot(
Answe!:
A *ate!ia%iLed )iew is a !e,%i"a o a ta!-et *aste! !o* a sin-%e ,oint in ti*e+ The "on"e,t was
i!st int!odu"ed with O!a"%e? te!*ed as SNA:S3OT+ In O!a"%e !e%ease ?+1+< sna,shots we!e
enhan"ed to ena#%e DMLs a%on- with a new te!*ino%o-'@ u,data#%e sna,shots+ With O!a"%eA+1+<
sna,shots sta!ted to #e used in data wa!ehouse en)i!on*ents so anew te!*ino%o-' *ate!ia%iLed
)iew was int!odu"ed to add!ess #oth dist!i#uted and data wa!ehouse *ate!ia%iLed )iews+
Question 7D: What a!e the "o*,onents o :h'si"a% data#ase st!u"tu!e o O!a"%e
Data#ase(
Answe!:
ORACLE data#ase is "o*,!ised o th!ee t',es o i%es+ One o! *o!e Data i%es@ two a!e *o!e
Redo Lo- i%es@ and one o! *o!e Cont!o% i%es+
Question 71: What is a Te*,o!a!' Se-*ent(
Answe!:
Te*,o!a!' se-*ents a!e "!eated #' ORACLE when a SQL state*ent needs a te*,o!a!' wo!F
a!ea to "o*,%ete e.e"ution+ When the state*ent inishes e.e"ution@ the te*,o!a!' se-*ent
e.tents a!e !e%eased to the s'ste* o! utu!e use+
Question 72: What is a Data Bi%e(
Answe!:
E)e!' ORACLE data#ase has one o! *o!e ,h'si"a% data i%es+ A data#aseKs data i%es "ontain a%%
the data#ase data+ The data o %o-i"a% data#ase st!u"tu!es su"h as ta#%es and inde.es is
,h'si"a%%' sto!ed in the data i%es a%%o"ated o! a data#ase+
Question 77: What is a Redo Lo-(
Answe!:
The set o Redo Lo- i%es o! a data#ase is "o%%e"ti)e%' Fnown as the data#aseKs !edo %o-+
Question 79: What is the un"tion o Redo Lo-(
Answe!:
The :!i*a!' un"tion o the !edo %o- is to !e"o!d a%% "han-es *ade to data+
Question 7;: What is the use o Redo Lo- Ino!*ation(
Answe!:
The Ino!*ation in a !edo %o- i%e is used on%' to !e"o)e! the data#ase !o* a s'ste* o! *edia
ai%u!e ,!e)ents data#ase data !o* #ein- w!itten to a data#aseKs data i%es+
Question 7<: What does a Cont!o% i%e Contain(
Answe!:
A Cont!o% i%e !e"o!ds the ,h'si"a% st!u"tu!e o the data#ase+ It "ontains the o%%owin- ino!*ation+
Data#ase Na*e
Na*es and %o"ations o a data#aseKs i%es and !edo %o- i%es+
Ti*e sta*, o data#ase "!eation+
Question 7?: What is the use o Cont!o% Bi%e(
Answe!:
When an instan"e o an ORACLE data#ase is sta!ted@ its "ont!o% i%e is used to identi' the
data#ase and !edo %o- i%es that *ust #e o,ened o! data#ase o,e!ation to ,!o"eed+ It is a%so
used in data#ase !e"o)e!'+
Question 7A: What is a Data Di"tiona!'(
Answe!:
The data di"tiona!' o an ORACLE data#ase is a set o ta#%es and )iews that a!e used as a !ead$
on%' !ee!en"e a#out the data#ase+
It sto!es ino!*ation a#out #oth the %o-i"a% and ,h'si"a% st!u"tu!e o the data#ase@ the )a%id use!s
o an ORACLE data#ase@ inte-!it' "onst!aints deined o! ta#%es in the data#ase and s,a"e
a%%o"ated o! a s"he*a o#6e"t and how *u"h o it is #ein- used+
Question 7C: What is an Inte-!it' Const!ains(
Answe!:
An inte-!it' "onst!aint is a de"%a!ati)e wa' to deine a #usiness !u%e o! a "o%u*n o a ta#%e+
Question 9D: Des"!i#e the die!ent t',e o Inte-!it' Const!aints su,,o!ted #' ORACLE(
Answe!:
NOT NULL Const!aint $ Disa%%ows Nu%%s in a ta#%eKs "o%u*n+
UNIQUE Const!aint $ Disa%%ows du,%i"ate )a%ues in a "o%u*n o! set o "o%u*ns+
:RIMARG 8EG Const!aint $ Disa%%ows du,%i"ate )a%ues and Nu%%s in a "o%u*n o! set o "o%u*ns+
BOREI=N 8EG Const!ain $ Re&ui!e ea"h )a%ue in a "o%u*n o! set o "o%u*ns *at"h a )a%ue in a
!e%ated ta#%eKs UNIQUE o! :RIMARG 8EG+
C3EC8 Const!aint $ Disa%%ows )a%ues that do not satis' the %o-i"a% e.,!ession o the "onst!aint+
Question 91: What is die!en"e #etween UNIQUE "onst!aint and :RIMARG 8EG
"onst!aint(
Answe!:
A "o%u*n deined as UNIQUE "an "ontain Nu%%s whi%e a "o%u*n deined as :RIMARG 8EG "anKt
"ontain Nu%%s+
Question 92: Des"!i#e Ree!entia% Inte-!it'(
Answe!:
A !u%e deined on a "o%u*n /o! set o "o%u*ns0 in one ta#%e that a%%ows the inse!t o! u,date o a
!ow on%' i the )a%ue o! the "o%u*n o! set o "o%u*ns /the de,endent )a%ue0 *at"hes a )a%ue in a
"o%u*n o a !e%ated ta#%e /the !ee!en"ed )a%ue0+ It a%so s,e"iies the t',e o data *ani,u%ation
a%%owed on !ee!en"ed data and the a"tion to #e ,e!o!*ed on de,endent data as a !esu%t o an'
a"tion on !ee!en"ed data+
Question 97: What a!e the Ree!entia% a"tions su,,o!ted #' BOREI=N 8EG inte-!it'
"onst!aint(
Answe!:
U:DATE and DELETE Rest!i"t $ A !ee!entia% inte-!it' !u%e that disa%%ows the u,date o! de%etion o
!ee!en"ed data+
DELETE Cas"ade $ When a !ee!en"ed !ow is de%eted a%% asso"iated de,endent !ows a!e de%eted
Question 99: What is a Ta#%es,a"e(
Answe!:
A data#ase is di)ided into Lo-i"a% Sto!a-e Unit "a%%ed ta#%es,a"e+ A ta#%es,a"e is used to
-!ou,ed !e%ated %o-i"a% st!u"tu!es to-ethe!+
Question 9;: What is SGSTEM ta#%es,a"e and when is it C!eated(
Answe!:
E)e!' ORACLE data#ase "ontains a ta#%es,a"e na*ed SGSTEM@ whi"h is auto*ati"a%%' "!eated
when the data#ase is "!eated+ The SGSTEM ta#%es,a"e a%wa's "ontains the data di"tiona!'
ta#%es o! the enti!e data#ase+
Question 9<: E.,%ain the !e%ationshi, a*on- Data#ase@ Ta#%es,a"e and Data i%e+
Answe!:
Ea"h data#ases %o-i"a%%' di)ided into one o! *o!e ta#%es,a"es+ One o! *o!e data i%es a!e
e.,%i"it%' "!eated o! ea"h ta#%es,a"e+
Question 9?: What a!e s'non'*s used o!(
Answe!:
S'non'*s a!e used to:
MasF the !ea% na*e and owne! o an o#6e"t+
:!o)ide ,u#%i" a""ess to an o#6e"t
:!o)ide %o"ation t!ans,a!en"' o! ta#%es@ )iews o! ,!o-!a* units o a !e*ote data#ase+
Si*,%i' the SQL state*ents o! data#ase use!s+
Question 9A: What a!e C%uste!s(
Answe!:
C%uste!s a!e -!ou,s o one o! *o!e ta#%es ,h'si"a%%' sto!es to-ethe! to sha!e "o**on "o%u*ns
and a!e oten used to-ethe!+
Question 9C: When "an 3ash C%uste! used(
Answe!:
3ash "%uste!s a!e #ette! "hoi"e when a ta#%e is oten &ue!ied with e&ua%it' &ue!ies+ Bo! su"h
&ue!ies the s,e"iied "%uste! Fe' )a%ue is hashed+ The !esu%tin- hash Fe' )a%ue ,oints di!e"t%' to
the a!ea on disF that sto!es the s,e"iied !ows+
Question ;D: What is Row Chainin-(
Answe!:
In Ci!"u*stan"es@ a%% o the data o! a !ow in a ta#%e *a' not #e a#%e to it in the sa*e data #%o"F+
When this o""u!s@ the data o! the !ow is sto!ed in a "hain o data #%o"F /one o! *o!e0 !ese!)ed
o! that se-*ent+
Question ;1: What is Data Con"u!!en"' and Consisten"'(
Answe!:
Data Con"u!!en"' 1N Means that *an' use!s "an a""ess data at the sa*e ti*e+
Data Consisten"' 1N Means that ea"h use! sees a "onsistent )iew o the data@ in"%udin- )isi#%e
"han-es *ade #' the use!Ks own t!ansa"tions and t!ansa"tions o othe! use!s+
Question ;2: What is O)e!%oadin- o ,!o"edu!es(
Answe!:
The Sa*e ,!o"edu!e na*e is !e,eated with ,a!a*ete!s o die!ent datat',es and ,a!a*ete!s in
die!ent ,ositions@ )a!'in- nu*#e! o ,a!a*ete!s is "a%%ed o)e!%oadin- o ,!o"edu!es+
e+-+ DBMS4OUT:UT+,ut4%ine
Question ;7: What a!e O TG:E and O ROWTG:E ( What a!e the ad)anta-es o usin-
these o)e! datat',es(
Answe!:
O TG:E ,!o)ides the data t',e o a )a!ia#%e o! a data#ase "o%u*n to that )a!ia#%e+
O ROWTG:E ,!o)ides the !e"o!d t',e that !e,!esents a enti!e !ow o a ta#%e o! )iew o! "o%u*ns
se%e"ted in the "u!so!+
The ad)anta-es a!e: Gou don t need to Fnow a#out )a!ia#%eKs data t',e
ii+ I the data#ase deinition o a "o%u*n in a ta#%e "han-es@ the data t',e o a )a!ia#%e "han-es
a""o!din-%'+
Question ;9: E.,%ain the two t',e o Cu!so!s(
Answe!:
The!e a!e two t',es o "u!so!s@ I*,%i"it Cu!so! and E.,%i"it Cu!so!+
:L>SQL uses I*,%i"it Cu!so!s o! &ue!ies+
Use! deined "u!so!s a!e "a%%ed E.,%i"it Cu!so!s+ The' "an #e de"%a!ed and used+
Question ;;: What a!e the :L>SQL State*ents used in "u!so! ,!o"essin-(
Answe!:
DECLARE CURSOR "u!so! na*e@ O:EN "u!so! na*e@ BETC3 "u!so! na*e INTO o! Re"o!d
t',es@ CLOSE "u!so! na*e
Question ;<: What is a data#ase t!i--e!( Na*e so*e usa-es o data#ase t!i--e!(
Answe!:
Data#ase t!i--e! is sto!ed :L>SQL ,!o-!a* unit asso"iated with a s,e"ii" data#ase ta#%e+
Usa-es a!e Audit data *odii"ations@ Lo- e)ents t!ans,a!ent%'@ Eno!"e "o*,%e.
#usiness !u%es De!i)e "o%u*n )a%ues auto*ati"a%%'@ I*,%e*ent "o*,%e. se"u!it'
autho!iLations+ Maintain !e,%i"ate ta#%es+
Question ;?: What a!e the !etu!n )a%ues o un"tions SQLCODE and SQLERRM(
Answe!:
SQLCODE !etu!ns the %atest "ode o the e!!o! that has o""u!!ed+
SQLERRM !etu!ns the !e%e)ant e!!o! *essa-e o the SQLCODE+
Question ;A: E.,%ain UNION@ MINUS@ UNION ALL and INTERSECT
Answe!:
UNION $ the )a%ues o the i!st &ue!' a!e !etu!ned with the )a%ues o the se"ond &ue!' e%i*inatin-
du,%i"ates+
MINUS $ the )a%ues o the i!st &ue!' a!e !etu!ned with du,%i"ates )a%ues o the se"ond &ue!'
!e*o)ed !o* the i!st &ue!'+
UNION ALL $ the )a%ues o #oth &ue!ies a!e !etu!ned in"%udin- a%% du,%i"ates
Question ;C: 3ow do I e%i*inate the du,%i"ate !ows(
Answe!:
De%ete !o* e*, a whe!e a+!owid N / se%e"t *in/!owid0 !o* e*, #
whe!e a+e*,no 1 #+e*,no -!ou, #' e*,no0
Question <D: E.,%ain CONNECT BG :RIOR TO
Answe!:
The sta!t with ++ "onne"t #' "%ause "an #e used to se%e"t data that has a hie!a!"hi"a% !e%ationshi,
/usua%%' so*e so!t o ,a!ent$N"hi%d /#oss$Ne*,%o'ee o! thin-$N,a!ts0+
Question <1: What is "o!!e%ated su#$&ue!'(
Answe!: A "o!!e%ated su#$&ue!' is a su#&ue!' that !ee!en"es the )a%ue>s !o* the *ain &ue!'+
Question <2: What is the use o SAVE:OINTS(
Answe!: SAVE:OINTS a!e used to su#di)ide a t!ansa"tion into s*a%%e! ,a!ts+ It ena#%es !o%%in-
#a"F ,a!t o a t!ansa"tion+ Ma.i*u* o i)e sa)e ,oints a!e a%%owed
Question <7: What is no!*a%iLation( What is the ad)anta-e o no!*a%iLation /#!ie%'0
Answe!: Data#ase no!*a%iLation is a se!ies o ste,s o%%owed to o#tain a data#ase desi-n that
a%%ows o! "onsistent sto!a-e and ei"ient a""ess o data in a !e%ationa% data#ase +These ste,s
!edu"e data !edundan"' and the !isF o data #e"o*in- in"onsistent
Question <9: What a!e the "o*,onents o ,h'si"a% data#ase st!u"tu!e o O!a"%e data#ase
Answe!: ORACLE data#ase is "o*,!ised o th!ee t',es o i%es+ One o! *o!e Data i%es@ two o!
*o!e Redo Lo- i%es@ and one o! *o!e Cont!o% i%es+
Question <;: What a!e die!ent t',es o se-*ents(
Answe!:
te*, se-*ent@
undo se-*ent@
ta#%e se-*ent@
inde. se-*ent
Question <<: Can 'ou na*e ew DBMS ,a"Fa-es and thei! use(
Answe!:
DBMS4OUT:UT+:UT4LINE/Kst!in-sK0E
,!int out the st!in-s
DBMS4UTILITG+-et4ti*e/0
-et the "u!!ent ti*e
DBMS45OBS
to s"hedu%e 6o#s in data#ase
DBMS4STATS
To -athe! data#ase statisti"s
Question <?: 3ow "an 'ou dete!*ine the siLe o the data#ase(
Answe!:
Gou "an &ue!' d#a4data4i%es and d#a4te*,4i%es
Question <A: 3ow do 'ou ind whethe! the instan"e was sta!ted with ,i%e o! s,i%e
Answe!:
The!e a!e 7 die!ent wa's :$
10 SELECT na*e@ )a%ue BROM )M,a!a*ete! W3ERE na*e 1 KS:BILEKE >>This &ue!' wi%% !etu!n
NULL i 'ou a!e usin- :BILE
20 S3OW :ARAMETER s,i%e >> This &ue!' wi%% !etu!ns NULL in the )a%ue "o%u*n i 'ou a!e usin-
,i%e and not s,i%e
70 SELECT COUNT/J0 BROM )Ms,,a!a*ete! W3ERE )a%ue IS NOT NULLE >> i the "ount is non$
Le!o then the instan"e is usin- a s,i%e@ and i the "ount is Le!o then it is usin- a ,i%e:
B' Deau%t o!a"%e wi%% %ooF into the deau%t %o"ation de,ends on the o>s+ LiFe in uni.@ o!a"%e wi%%
"he"F in Mo!a"%e4ho*e>d#s di!e"to!' and on windows it wi%% "he"F in o!a"%e4ho*e>data#ase
di!e"to!'@ and the "ontent o ,i%e is 6ust te.t #ased@ #ut s,i%e "ontent is in #ina!' o!*at@ that is
unde!standa#%e #' o!a"%e )e!' we%%+
A%so o!a"%e se!)e! a%wa's "he"Fs the s,i%e o! ,i%e with these se&uen"es:$
S:BILEPSIDN+ORA
S:BILE+ORA
:BILEPSIDN+ORA
:BILE+ORA
Question <C: 3ow do 'ou ,in an o#6e"t+
Answe!: Use d#*s4sha!ed4,oo% ,!o"edu!e+
EQECUTE DBMS4S3ARED4:OOL+8EE:/OB5ECTNAME0E
Question ?D: What is the use o COM:RESS o,tion in EQ: "o**and(
Answe!:
B%a- to indi"ate whethe! e.,o!t shou%d "o*,!ess !a-*ented se-*ents into sin-%e e.tents+
Question ?1: 3ow "an 'ou ind out within a :L>SQL #%o"F i a CURSOR is o,en o! not
Answe!: B' usin- OISO:EN "u!so! status )a!ia#%e
Question ?2: E.,%ain th!ee *ethods o t!anse!!in- a ta#%e #etween two s"he*a
Answe!:
EQ:ORT$IM:ORT
CREATE TABLE ++ AS SELECT
CO:G "o**and

Vous aimerez peut-être aussi