You are on page 1of 39

THINGS TO KNOW IN ORACLE -----------------------------1. Default location for alert log !

a"Nor#all$ it i un%er &ORACLE'HO(E)r%*# )log + OR *" ,o- .ara#eter *ac/groun%'%u#.'%e t 0after login 1l.lu ) a $ %*a". 2NOTE 3 &ORACLE'HO(E)r%*# )trace for trace file 4 5. e6.lain un#ount+ #ount+ an% o.en! in no#ount-in tance i tarte% in #ount - %ata*a e tarte% *ut %atafile inacce i*le in o.en - %atafile .ut in acce i*le #o%e 7..ur.o e of a .file) .file! to allocate $ te# #e#or$ to .oint to control)a%#in file location for t,e %ata*a e 8. i it .o i*le to c,ange location of a%#in)control file -it, %ata*a e in #ount tate! it aint .o i*le *ecau e c,anging location re1uire c,anging .file) .file -,ic, ,a9e alrea%$ *een u e% *$ t,e ti#e t,e %ata*a e get to (O:NT #o%e. ;. %ifference *et-een o* olete an% e6.ire% *ac/u.! E<=IRED3 Di .la$ *ac/u. et + .ro6$ co.ie + an% i#age co.ie #ar/e% in t,e re.o itor$ a e6.ire%+ t,at i + >not foun%.>To en ure t,at LIST E<=IRED ,o- u.to-%ate out.ut+ i ue a CROSSCHECK co##an% .erio%icall$. W,en $ou i ue a CROSSCHECK co##an%+ R(AN earc,e on %i / an% ta.e for t,e *ac/u. an% co.ie recor%e% in t,e re.o itor$. If it %oe not fin% t,e#+ t,en it u.%ate t,eir re.o itor$ recor% to tatu E<=IRED. O?SOLETE3 @. %efault location for .file).file! &ORACLE'HO(E)%* A. %efault location for oracle .a -or% file! &ORACLE'HO(E)%ata*a e B. ,o- %o $ou et t,e oracle %ata*a e to u e a .a -or% file! create an oracle .a -or% an% $ou are u. an% running Cora.-% fileD=WD%*1.ora .a -or%D $ entrie D@ E. ,o- %o $ou un et t,e %ata*a e reco9er$ area! 1F. %ifference *et-een a trace an% an alert file! Eac, er9er an% *ac/groun% .roce can -rite to an a ociate% trace file. W,en an internal error i %etecte% *$ a .roce + it %u#. infor#ation a*out t,e error to it trace file. So#e of t,e infor#ation -ritten to a trace file i inten%e% for t,e %ata*a e a%#ini trator+ -,ile ot,er infor#ation i for Oracle Su..ort Ser9ice . Trace file infor#ation i al o u e% to tune a..lication an% in tance . T,e alert file+ or alert log+ i a .ecial trace file. T,e alert log of a %ata*a e i a c,ronological log of #e age an% error . 11. -,at %oe t,e alert file ca.ture! An alert log file tore infor#ation a*out t,e %ea%loc/ occuring in a %ata*a e+ e6a#.le areG HData Corru.tion error + Dea% Loc/ infor#ation+ Run out of .ace+ A%%ing ne.ace+ Data*a e in *ac/u. #o%e+ Co##an% i ue to c,ange Data*a e configuration+ Data*a e tuc/ %ue to arc,i9e log %irector$ full+ Data*a e tartu.) ,ut%o-n ti#e. 15.-,at are t,e /e$ en9iron#ent 9aria*le ! ORACLE'HO(E an% ORACLE'SID ....=ATH an% ORACLE'?ASE 17. ,o- %o $ou tart an% to. a li tener! l nrctl 2 tart+ to.+ tatu 4 18.-,at are t,e /e$ oracle file!

tn na#e + 1lnet+ li tener 1;.Difference *et-een 1lnet+ tn na#e an% li tener! tn na#e I li t of %ata*a e connection info for client) er9er+ T,i i a te6t file contain t,e infor#ation a*out t,e oracle %ata*a e .Jor eac, %ata*a e+ it #u t contain t,e %* er9er na#e+ %* li tener .ort nu#*er+ an% in tance na#e. 1lnet I co##unication .ara#eter etu. li tener I li t of %ata*a e to li ten for on t,e #ac,ine 1@.Ho- %o i ee t,e .l) 1l .roce%ure out.ut! SET SERKERO:T=:T ONG 1A.,o- %o i e6ecute a SLL file! Mfilena#e. 1l 1B.,o- to ee -,o i currentl$ connecte%! SELECT u erna#e+ .rogra# JRO( 9& e ion WHERE u erna#e IS NOT N:LLG 1E.,o- %o i reco#.ile in9ali% o*Nect ! M!)r%*# )a%#in)utlr.. 1l 5F.,o- %o i tell -,ic, %ata*a e a# in! SELECT na#e fro# 9&%ata*a eG OR SELECT in tance'na#e+ ,o t'na#e fro# 9&in tanceG 51. ,o- %o u e6.ort an% i#.ort in oracle! I #a/e ure $ou run t,e cri.t &ORACLE'HO(E)r%*# )a%#in)cate6.. 1l Ii#.ort an% e6.ort u e I(=)E<= utilitie -,ic, are *ot, locate% in &ORACLE'HO(E)*in %irector$ I c3OIE<= HEL=DP I c3OIE<= :SERIDD cott)tiger OWNERD cott JILED cott.%#. I c3OII(= :SERIDD cott)tiger JILED cott.%#. J:LLDP 0-,ic, #o9e t,e %#. file" 55.,o- to a%% %ifferent er9ice to one oracle %efault li tener! Qu t e%it t,e SID'LIST ieG 57.%efault location of tn na#e + 1lnet an% li tener! &ORACLE'HO(EOnet-or/Oa%#in 58.Ste. to #o9ing a%#in an% controlfile ! HHHHHHHHHHHHHHH(OKING A CONTRROLJILE - ,ut%o-n %ata*a e -co.$ controlfile to ne- location -e%it .file) .file .ointing to ne- controlfile location -re tart in tance HHHHHHHHHHHHHHH(OKING AD(IN JILES -$ou can %o t,e a#e a for controlfile -OR-: e t,e ALTER SPSTE( co##an% 2ALTER SPSTE( et *ac/groun%'%u#.'%e tDRR SCO=EDR .fileR4 5;. te. to .artial #o9e#ent of log)%ata file *$ rena#ing t,e#! HHHHHHHHHHHHHHHHHHHH - ,ut%o-n t,e %ata*a e -co.$ logfile to t,e %e ire% ne- location - tart t,e %ata*a e in #ount #o%e -i ue t,e ALTER DATA?ASE RENA(E JILE RR TO RRG -O.en t,e %ata*a e -OR-.ut .articular ta*le .ace offline 2alter ta*le .ace INDS offline4 -u e OS to #o9e file to ne- location -rena#e file 2alter ta*le .ace INDS rena#e %atafile RR to RRG -.ut ta*le .ace *ac/ online 2alter ta*le .ace INDS onnline4 5@. te. to full #o9e#ent of log)%ata file *$ controlfile recreation! HHHHHHHHHHHHHHHHHHH -*ac/u. t,e controlfile to trace an% e%it it accor%ing to t,e ne- %e ire% location

- ,ut%o-n t,e %ata*a e 5A. te. to #anuall$ create an oracle %ata*a e! -create %irectorie -create .file - tartu. no#ount u ing .file -run create %ata*a e cri.t -e6ecute t,e cat.roc an% catalog cri.t -alter %ata*a e .ut it in #ount an% o.en #o%e 5B. te. to re tore r#an *ac/u. to a %ifferent no%e! -%efine t,e %irectorie for t,e file -connect to NODE 1 u ing r#an an% *ac/u. %ata*a e to an acce i*le location -(o9e t,e follo-ing file to t,e NODE 5 0ST,e %ata*a e *ac/u. .iece + SControlfile *ac/u. .iece+ST,e .ara#eter file i.e init.ora file" -E%it t,e =JILE on NODE 5 to c,ange t,e en9iron#ent .ecific .ara#eter li/e.0u er'%u#.'%e tD+*ac/groun%'%u#.'%e tD+control'file D" -Once t,e =JILE i uita*l$ #o%ifie% in9o/e R#an on t,e NODE 5 after etting t,e Oracle en9iron#ent 9aria*le an% tart t,e %ata*a e in no#ount #o%e3 -Re tore t,e controlfile fro# t,e *ac/u. .iece. -(ount t,e %ata*a e. R(ANI alter %ata*a e #ount G -No- catalog t,e *ac/u. .iece t,at -ere ,i..e% fro# NODE 1. R(ANI catalog *ac/u..iece R),o#e)oracle)te t)*ac/u.)o1'#f'annnn'TAG5FFAF517TFF5E5;'5651#@t$'.*/.RG -Get to /no- t,e la t e1uence a9aila*le in t,e arc,i9elog *ac/u. u ing t,e follo-ing co##an%. R(AN I li t *ac/u. of arc,i9elog allG -Rena#e t,e Re%ologfile + o t,at t,e$ can *e create% in ne- location -,en o.ene% t,e %ata*a e i o.ene% in re etlog . SLLI alter %ata*a e rena#e file R)uF1)oracle).ro%uct)ora%ata)ora1Fg)log)re%oF1.logR to R),o#e)oracle)te t)log)re%oF1.logRG.............. -e6ecute cri.t to re tore %atafile to ne- no%e an% reco9er R(ANI run T et until e1uence U e1'noI et ne-na#e for %atafile 1 to R),o#e)oracle)te t)%ata) $ F1.%*fRG et ne-na#e for %atafile 5 to R),o#e)oracle)te t)%ata)un%ot* F1.%*fRG et ne-na#e for %atafile 7 to R),o#e)oracle)te t)%ata) $ au6F1.%*fRG et ne-na#e for %atafile 8 to R),o#e)oracle)te t)%ata)u er F1.%*fRG et ne-na#e for %atafile ; to R),o#e)oracle)te t)%ata)1.%*fRG et ne-na#e for %atafile @ to R),o#e)oracle)te t)%ata) $ au6F5.%*fRG et ne-na#e for %atafile A to R),o#e)oracle)te t)%ata)un%ot* F5.%*fRG re tore %ata*a eG -itc, %atafile allG reco9er %ata*a eG alter %ata*a e o.en re etlog G V 5E. te. to creating an% running r#an *ac/u. cri.t ! 7F. te. to #anual %ata*a e cloning -it, controlfile recreation! -create %irectorie for t,e %ata*a e $ou are to clone -create init file for t,e clone -it, .ointer to t,e location

of t,e ne-

%e ire% controlfile -*ac/u. controlfile of %ata*a e to clone+ e%it t,e *ac/e% u. controlfile into a cri.t .ointing to t,e location of ne- %atafile an% logfile . - ,ut%o-n %ata*a e to clone an% #o9e t,e %atafile an% re%olog file to t,eir %e ire% ne- location - tartu. t,e in tance u ing a create% .file t,at .oint to t,e location of t,e controlfile for t,e clone *ut tartu. ,oul% *e in NO(O:NT #o%e. -No- e6ecute t,e controlfile cri.t to create t,e controlfile . -o.en %ata*a e -it, a RESETLOGS to a9oi% error t,at #a$ ari e a a re ult of SCN nu#*er %ifference)c,ange. 71. te. to #anual %ata*a e cloning -it,out controlfile recreation! 75.%ifference *et-een clone% an% %u.licate %ata*a e! 77. te. to connect to r#an u ing t,e catalog)au6illiar$! 78. te. to recreating a lo t controlfile! 7;.-,$ %o -e u e a re etlog o.tion -,en recreating a controlfile! 7@. te. to #anuall$ u.gra%e a %ata*a e! -connect to %ata*a e to *e u.gra%e% a $ %*a -Anal$ e t,e %ata*a e to *e u.gra%e% 2*$ e6ecuting t,e cri.t )r%*# )utlu1F. 1l -,ic, i locate% in oracle',o#e for ne- 9er ion -- ri.t i e6ecute% fro# t,e ol% en9iron#ent+ e6ecute a 1lI .ool info.log+ e6ecute t,e cri.t utlulu1F. 1l+ turn off .ool 1lI .ool off+ rea% t,e info.log for infor#ation a*out t,e %ata*a e an% -,at nee% to *e u.gra%e%4 -?ac/u. t,e %ata*a e to *e u.gra%e% -,ile in ol% en9iron#ent 2 ign on to R(AN3 r#an >target ) nocatalog>+ i ue *ac/u. co##an%3R:N T ALLOCATE CHANNEL c,an'na#e TP=E DISKG ?ACK:= DATA?ASE JOR(AT o#e'*ac/u.'%irector$W: TAG *efore'u.gra%eG ?ACK:= C:RRENT CONTROLJILE TO a9e'controlfile'locationG V 4 - ,ut%o-n in tance -co.$ configuration file 2 .file+ .a -or% file4 fro# ol% en9iron#ent to $our ne- ,o#e an% t,en e%it t,e .file accor%ingl$4 -#a/e ure Oracle er9ice are to..e% - et $our en9iron#ent 9aria*le to t,e ne- relea e ie 2oracle',o#e+ .at,+ oracle'*a e+L%'li*rar$'.at, an% oracle' i%4 - tart 1l.lu connecting -it, SPSD?A in $our ne- relea e en9iron#ent - tartu. u.gra%e -it, .file 2 1lI tartu. u.gra%e .fileDRR4 -create t,e SPSA:< ta*le .ace - %ont forget to .ecif$ 2CREATE TA?LES=ACE $ au6 DATAJILE R)uF1)ora%ata) $ au6F1.%*fR SIXE AFF( E<TENT (ANAGE(ENT LOCAL SEG(ENT S=ACE (ANAGE(ENT A:TOG4 Rcau e if e6tent #anage#ent an% eg#ent .ace #anage#ent are not et+ $ au6 ta*le .ace cannot *e create%. - .ool u.gra%e log 2 1lI .ool u.gra%e.log4 -Run t,e u.gra%e cri.t2 1lIMcatu.gr%. 1l 0t,i %eter#ine -,ic, u.gra%e cri.t nee% to *e run an% t,en run eac nece ar$ cri.t+ accor%ing to $our ol% relea e+ t,i create an% u.gra%e %ata %ictionar$ ta*le " -=ut .ool off -Run 2 1lIMutlu1F1 . 1l TE<T4+ t,i .ecifie t,e tatu of t,e %ata*a e co#.onent in t,e u.gra%e% %ata*a e. - ,ut%o-n an% re tart t,e in tance -run 2 1lIMutlr.. 1l4+ t,i reco#.ile an$ re#aining tore% =L)SLL an% Na9a co%e an% al o reco#.ile an$ in9ali% o*Nect . -PO:R DATA?ASE IS NOW :=GRADED. HHHHHHHHHHHHHHHIn ca e $ou nee% reco9er$ - ign on to R(AN 2r#an >target ) nocatalog>4 -i ue t,e reco9er$ co##an%

START:= NO(O:NT R:N T RE=LICATE CONTROLJILE JRO( a9e'controlfile'locationG ALTER DATA?ASE (O:NTG RESTORE DATA?ASE JRO( TAG *efore'u.gra%e ALTER DATA?ASE O=EN RESETLOGSG V HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 7A.e6.lain te. for %ata*a e *ac/u. an% reco9er$ u ing t,e O.S! 7B.e6.lain te. for %ata*a e *ac/u. an% reco9er$ u ing R(AN! 7E.-,at %o u %o inca e of a # ing li* in oracle! co.$ it to t,e %irector$ -,ere itR re1uire% an% t,en e6ecute 2RELINK4 &ORACLE'HO(E)*in)relin/ all OR *inC .)relin/ all 8F.E6.lain %ifference *et-een a ,ot *ac/u. an% a col%)clo e% *ac/u. an% t,e *enefit of eac,! A ,ot *ac/u. i *a icall$ ta/ing a *ac/u. of t,e %ata*a e -,ile it i till u. an% running an% it #u t *e in arc,i9e log #o%e. A col% *ac/u. i ta/ing a *ac/u. of t,e %ata*a e -,ile it i ,ut %o-n an% %oe not re1uire *eing in arc,i9e log #o%e. T,e *enefit of ta/ing a ,ot *ac/u. i t,at t,e %ata*a e i till a9aila*le for u e -,ile t,e *ac/u. i occurring an% $ou can reco9er t,e %ata*a e to an$ .oint in ti#e. T,e *enefit of ta/ing a col% *ac/u. i t,at it i t$.icall$ ea ier to a%#ini ter t,e *ac/u. an% reco9er$ .roce . In a%%ition+ ince $ou are ta/ing col% *ac/u. t,e %ata*a e %oe not re1uire *eing in arc,i9e log #o%e an% t,u t,ere -ill *e a lig,t .erfor#ance gain a t,e %ata*a e i not cutting arc,i9e log to %i /. 81.Pou ,a9e Nu t ,a% to re tore fro# *ac/u. an% %o not ,a9e an$ control file . Ho-oul% $ou go a*out *ringing u. t,i %ata*a e! I -oul% create a te6t *a e% *ac/u. control file+ ti.ulating -,ere on %i / all t,e %ata file -,ere an% t,en i ue t,e reco9er co##an% -it, t,e u ing *ac/u. control file clau e. 85.-,at i an oracle in tance! 87.De cri*e -,at re%o log are Y t,eir a%9antage! Re%o log are logical an% .,$ ical tructure t,at are %e igne% to ,ol% all t,e c,ange #a%e to a %ata*a e an% are inten%e% to ai% in t,e reco9er$ of a %ata*a e. 88.-,at are t,e *ac/groun% .roce e in oracle! 88.-,$ et %*'*loc/ iZe to B1E5! B1E5 iZe i t,e %efault iZe *ut not t,e #o t reco##en%e%+ *ecau e it ,a to *e *igger -,en it co#e to %ata-are ,ou e . 8;. -,at are t,e %efault .ort ! for oracle net li tener an% e# re.o itor$ .ort31;51)1;5@ 2co##onl$ u e% li tener .ort 3 1;55-1;8F4 for e#3 oracle na#e er9er31;A; oracle connection #anager31@7F ,tt. er9er li ten .ort3BF E( Agent .ort31B71 E( re.orting .ort3777E iSLL .lu 3 ;;@F);;BF 8@.,o- %o $ou tart! e# I e#ctl tart %*con ole i 1l.lu Ii 1l.lu ctl 2 tart) to.4 8A.-,at i t,e %ifference *et-een No(O:NT+ (O:NT+ O=EN!

IN NO(O:NTI in tant tart *ut %oe nt utili e t,e controlfile $et IN (O:NTIcontrol file i in u e *ut %atafile are not o.en IN O=ENI%atafile can *e acce e% 8B.W,at t,e *enefit of %*# ' tat o9er anal$Ze! 8E.81. Ho- -oul% $ou configure $our net-or/ing file to connect to a %ata*a e *$ t,e na#e of DSS -,ic, re i%e in %o#ain icallinc.co#! ;F.E6.lain t,e conce.t of t,e D:AL ta*le! A ingle ro- ta*le .ro9i%e% *$ oracle for electing 9alue an% e6.re ion . ;1.W,at are t,e -a$ ta*le .ace can *e #anage% an% ,o- %o t,e$ %iffer! ;5.Jro# t,e %ata*a e le9el+ ,o- can $ou tell un%er -,ic, ti#e Zone a %ata*a e i o.erating! elect D?TI(EXONE fro# %ualG ;7.Ho- %o $ou reco9er a %atafile t,at ,a not *een .,$ icall$ *een *ac/e% u. ince it creation an% ,a *een %elete%. =ro9i%e $nta6 e6a#.le! ;8.Pou ,a9e foun% corru.tion in a ta*le .ace t,at contain tatic ta*le t,at are .art of a %ata*a e t,at i in NOARCHIKE log #o%e. Ho- -oul% $ou re tore t,e ta*le .ace -it,out lo ing ne- %ata in t,e ot,er ta*le .ace ! ;;.T$.icall$+ -,ere i t,e con9entional %irector$ tructure c,o en for Oracle *inarie to re i%e! ;@.E6.lain un%o retention! ;A.Ho- %oe Oracle guarantee %ata integrit$ of %ata c,ange ! ;B.W,ic, en9iron#ent 9aria*le are a* olutel$ critical in or%er to run t,e O:I! ;E.E6.lain ,o- $ou -oul% re tore a %ata*a e u ing R(AN to =oint in Ti#e! @F.Data*a e cra ,e . Corru.tion i foun% cattere% a#ong t,e file $ te# neit,er of $our %oing nor of Oracle . W,at %ata*a e reco9er$ o.tion are a9aila*le! Data*a e i in arc,i9e log #o%e! @1.W,at 1uer$ tell $ou ,o- #uc, .ace a ta*le .ace na#e% te t i ta/ing u.+ an% ,o- #uc, .ace i re#aining! SLLI elect u#0*$te )01F58H1F58"" #* fro# %*a'free' .ace -,ere ta*le .ace'na#eDRTESTR @5.W,ic, %ictionar$ ta*le an%)or 9ie- -oul% $ou loo/ at to %iagno e a loc/ing i ue! @7.W,at i t,e, %ifference *et-een an .file an% a .file! @7.-oul% an oracle in tance tart inca e $ou lo t t,e controlfile! Pe it -oul% *ut %ata*a e -oul%nt o.en *ecau e controlfile .oint to location of t,e .,$ ical file . @8.E6.lain t,e u e of etting GLO?AL'NA(ES e1ual to TR:E. Setting GLO?AL'NA(ES %ictate ,o- $ou #ig,t connect to a %ata*a e. T,i 9aria*le i eit,er TR:E or JALSE an% if it i et to TR:E it enforce %ata*a e lin/ to ,a9e t,e a#e na#e a t,e re#ote %ata*a e to -,ic, t,e$ are lin/ing. @;. W,at co##an% -oul% $ou u e to encr$.t a =L)SLL a..lication! WRA= @@.E6.lain t,e %ifference *et-een a J:NCTION+ =ROCED:RE an% =ACKAGE. A function an% .roce%ure are t,e a#e in t,at t,e$ are inten%e% to *e a collection of =L)SLL co%e t,at carrie a ingle ta /. W,ile a .roce%ure %oe not ,a9e to return an$ 9alue to t,e calling a..lication+ a function -ill return a ingle 9alue. A .ac/age on t,e ot,er ,an% i a collection of function an% .roce%ure t,at are grou.e% toget,er *a e% on t,eir co##onalit$ to a *u ine function or a..lication. @A.Na#e t,ree a%9i or$ tati tic $ou can collect. ?uffer Cac,e A%9ice+ Seg#ent Le9el Stati tic + Y Ti#e% Stati tic @B.W,ere in t,e Oracle %irector$ tree tructure are au%it trace .lace% *$ %efault! In uni6 &ORACLE'HO(E)r%*# )au%it+ in Win%o- t,e e9ent 9ie-er @E.E6.lain #aterialiZe% 9ie- an% ,o- t,e$ are u e%. (aterialiZe% 9ie- are o*Nect t,at are re%uce% et of infor#ation t,at ,a9e *een u##ariZe%+ grou.e%+ or aggregate% fro# *a e ta*le . T,e$ are t$.icall$ u e% in

%ata -are,ou e or %eci ion u..ort $ te# . AF.W,en a u er .roce fail + -,at *ac/groun% .roce =(ON A1.W,at *ac/groun% .roce refre ,e e

clean

u. after it!

#aterialiZe% 9ie- ! ion are connecte% an% -,at re ource t,e$ are

T,e Qo* Lueue =roce e . A5.Ho- -oul% $ou %eter#ine -,at -aiting for!

: e of K&SESSION an% K&SESSION'WAIT A7.Ho- -oul% $ou force a log -itc,! ALTER SPSTE( SWITCH LOGJILEG A8.Gi9e t-o #et,o% $ou coul% u e to %eter#ine -,at DDL c,ange Pou coul% u e Log#iner or Strea# A;.E6.lain te. in configuring $our %ata*a e for au%iting! A@.W,at %oe coale cing a ta*le .ace %o! Coale cing i onl$ 9ali% for %ictionar$-#anage% ta*le .ace an% %e-frag#ent *$ co#*ining neig,*oring free e6tent into large ingle e6tent . AA.Na#e a ta*le .ace auto#aticall$ create% -,en $ou create a %ata*a e. T,e SPSTE( ta*le .ace. AB.W,at i t,e %ifference *et-een a TE(=ORARP ta*le .ace an% a =ER(ANENT ta*le .ace! A te#.orar$ ta*le .ace i u e% for te#.orar$ o*Nect .er#anent ta*le .ace are u e% to tore t,o e o*Nect o*Nect of t,e %ata*a e. AE.Ho- %o $ou a%% a %ata file to a ta*le .ace! ALTER TA?LES=ACE ADD DATAJILE SIXE BF.Ho- %o $ou re iZe a %ata file! ALTER DATA?ASE DATAJILE RESIXE G B1.W,at 9ie- -oul% $ou u e to loo/ at t,e iZe of a %ata file! .ace in a ta*le .ace! uc, a ort tructure -,ile #eant to *e u e% a t,e true .ace ,a9e *een #a%e.

D?A'DATA'JILES B5.W,at 9ie- -oul% $ou u e to %eter#ine free D?A'JREE'S=ACE B7.Ho- -oul% $ou %eter#ine -,o ,a

a%%e% a ro- to a ta*le!

Turn on fine grain au%iting for t,e ta*le. B8. E6.lain te. to etting a %ata*a e for fine grain au%iting! B;.Ho- can $ou re*uil% an in%e6! ALTER INDE< RE?:ILDG B@.E6.lain -,at .artitioning i an% -,at it *enefit i .

=artitioning i a #et,o% of ta/ing large ta*le an% in%e6e an% .litting t,e# into #aller+ #ore #anagea*le .iece . BA.Pou ,a9e Nu t co#.ile% a =L)SLL .ac/age *ut got error + ,o- -oul% $ou 9ie- t,e error ! SHOW ERRORS

BB.Ho- can $ou gat,er

tati tic

on a ta*le! e ion!

T,e ANALPXE co##an%. BE.Ho- can $ou ena*le a trace for a

: e t,e D?(S'SESSION.SET'SLL'TRACE or : e ALTER SESSION SET SLL'TRACE D TR:EG EF.W,at i t,e %ifference *et-een t,e SLLHLoa%er an% I(=ORT utilitie ! T,e e t-o Oracle utilitie are u e% for loa%ing %ata into t,e %ata*a e. T,e %ifference i t,at t,e i#.ort utilit$ relie on t,e %ata *eing .ro%uce% *$ anot,er Oracle utilit$ E<=ORT -,ile t,e SLLHLoa%er utilit$ allo- %ata to *e loa%e% t,at ,a *een .ro%uce% *$ ot,er utilitie fro# %ifferent %ata ource Nu t o long a it confor# to ASCII for#atte% or %eli#ite% file . E1.Na#e t-o file u e% for net-or/ connection to a %ata*a e. TNSNA(ES.ORA an% SLLNET.ORA Tec,nical - :NI< E5.W,$ i a W,ere clau e fa ter t,an a grou. filter or a for#at trigger! ?ecau e+ in a -,ere clau e t,e con%ition i a..lie% %uring %ata retrie9al t,an after retrie9ing t,e %ata. E7.W,at i t,e %ifference *et-een TR:NCATE an% DELETE! T,e %elete co##an% -ill log t,e %ata c,ange in t,e log file -,ere a t,e truncate -ill i#.l$ re#o9e t,e %ata -it,out it. Hence %ata re#o9e% *$ DELETE co##an% can *e rolle% *ac/ *ut not t,e %ata re#o9e% *$ TR:NCATE. Truncate i a DDL tate#ent -,erea DELETE i a D(L tate#ent. E8. W,at i u er Account in Oracle %ata*a e!

A u er account i not a .,$ ical tructure in %ata*a e *ut it i ,a9ing i#.ortant relation ,i. to t,e o*Nect in t,e %ata*a e an% -ill *e ,a9ing certain .ri9ilege . E;. Ho- -ill $ou enforce Dont grant u er acce ecurit$ u ing %irectl$ to ta*le tore% .roce%ure ! -it,in t,e a..lication. t,at acce t,e ta*le . o-ner. : er

In tea% grant t,e a*ilit$ to acce

t,e .roce%ure

W,en .roce%ure e6ecute% it -ill e6ecute t,e .ri9ilege of .roce%ure cannot acce ta*le e6ce.t 9ia t,e .roce%ure. E@. W,at are t,e %ictionar$ ta*le D?A'JREE'S=ACE D?A'SEG(ENTS D?A'DATA'JILES. u e% to #onitor a %ata*a e .ace!

EA. W,at i OCI. W,at are it u e ! OCI i Oracle Call Interface. W,en a..lication %e9elo.er %e#an% t,e #o t .o-erful interface to t,e Oracle Data*a e Ser9er+ t,e$ call u.on t,e Oracle Call Interface0OCI". OCI .ro9i%e t,e #o t co#.re,en i9e acce to all t,e Oracle Data*a e functionalit$. T,e ne-e t .erfor#ance+ cala*ilit$ an% ecurit$ feature a..ear fir t in t,e OCI A=I. If $ou -rite a..lication for t,e Oracle Data*a e+ $ou li/el$ alrea%$ %e.en% on OCI. So#e t$.e of a..lication t,at %e.en% u.on OCI

ar 0=L)SLL a.. e6ecuting SLL+ CSS a.. u ing OCCI+ Qa9a A.. u ing OCI-*a e% QD?C %ri9er+ C A.. u ing OD?C %ri9er+ =roHC a.. + %i tri*ute% SLL+ K? a.. u ing OLED? %ri9er" EB. W,at i (ulti No%e S$ te#! (ulti no%e $ te# in oracle A..lication 11i #ean $ou ,a9e A..lication 11i co#.onent on #ore t,an one $ te#. T$.ical e6a#.le i %ata*a e+ concurrent (anager on one #ac,ine an% for# + -e* er9er on econ% #ac,ine i e6a#.le of t-o no%e $ te#. EE.W,at i a . eu%o colu#n. Gi9e e6a#.le ! infor#ation uc, a ro- nu#*er an% ro- %e cri.tion ae auto#aticall$ tore% *$ oracle an% i %irectl$ acce i*le i.e not t,roug, ta*le . T,i infor#ation i containe% -it,in . eu%o colu#n . T,e e . eu%o colu#n can *e retrie9e% in 1uerie . T,e e . eu%o colu#n can *e inclu%e% in 1uerie -it,in elect %ata fro# ta*le .2A . eu%ocolu#n *e,a9e li/e a ta*le colu#n+ *ut i not actuall$ tore% in t,e ta*le. Pou can elect fro# . eu%ocolu#n + *ut $ou cannot in ert+ u.%ate+ or %elete t,eir 9alue .4 A9aila*le . eu%o colu#n are ROWN:( - or%er nu#*er in -,ic, a ro- 9alue i retrie9e% ROWID-.,$ ical ro-0#e#or$ or %i / a%%re " location i.e t,e uni1ue roi%entification+ SPSDATE- $ te# or to%a$R %ate+ :ID - u er i%entification nu#*er in%icating t,e current u er+ :SER - na#e of current logge% in u er. 1FF. W,at i TWO'TASK in oracle Data*a e! TWO'TASK #oc/ $our tn alia -,ic, $ou are going to u e to connect to %ata*a e. Let a u#e $ou a9e %ata*a e client -it, tn alia %efine% a =ROD to connect to %ata*a e =ROD on #ac,ine teac,#eoracle.co# li tening on .ort 1;51. T,e u ual -a$ to connect i 1l.lu u erna#e).a -%M=RODG no- if $ou %ont -ant to u e M=ROD t,en $ou et TWO'TASKD=ROD an% t,en can i#.l$ u e 1l.lu u erna#e).a -% t,en 1l -ill c,ec/ t,at it ,a to connect to tn alia %efine *$ 9alue =ROD i.e TWO'TASK. 1F1. W,at i t,e %ifference *et-een uni1ue an% .ri#ar$ /e$! A uni1ue /e$ can ,a9e null -,erea .ri#ar$ /e$ i al-a$ not null. *ot, *ear uni1ue na#e . 1F5.It i .o i*le to u e ra- %e9ice a %ata file an% -,at i t,e a%9antage o9er file. $ te# file ! Pe . T,e a%9antage o9er file $ te# file . I)O -ill *e i#.ro9e% *ecau e Oracle i *$e-.a ing t,e /ernnel -,ic, -riting into %i /. Di / Corru.tion -ill *e 9er$ le . 1F7.W,at are %i a%9antage of ,a9ing ra- %e9ice ! We ,oul% %e.en% on e6.ort)i#.ort utilit$ for *ac/u.)reco9er$ 0full$ relia*le" T,e tar co##an% cannot *e u e% for .,$ ical file *ac/u.+ in tea% -e can u e %% co##an% -,ic, i le fle6i*le an% ,a li#ite% reco9erie . 1F8.W,at i t,e u e of INCTP=E o.tion in E<= co##an% ! T$.e e6.ort ,oul% *e .erfor#e% CO(=LETE+C:(:LATIKE+INCRE(ENTAL. Li t t,e e1uence of e9ent -,en a large tran action t,at e6cee% *e$on% it o.ti#al 9alue -,en an entr$ -ra. an% cau e t,e roll*ac/ eg#ent toe6.an% into anotion Co#.lete . e. -ill *e -ritten. 1F;.W,at i t,e u e of JILE o.tion in I(= co##an% ! T,e na#e of t,e file fro# -,ic, i#.ort ,oul% *e .erfor#e%. 1F@.W,at i a S,are% SLL .ool! T,e %ata %ictionar$ cac,e i tore% in an area in SGA calle% t,e S,are% SLL =ool. T,i -ill allo- ,aring of .ar e% SLL tate#ent a#ong concurrent u er . 1FA.Li t t,e O.tional Jle6i*le Arc,itecture 0OJA" of Oracle %ata*a e! or Ho- can -e organiZe t,e ta*le .ace in Oracle %ata*a e to ,a9e #a6i#u# .erfor#ance ! SPSTE( - Data %ictionar$ ta*le . DATA - Stan%ar% o.erational ta*le . DATA5- Static ta*le u e% for tan%ar% o.eration INDE<ES - In%e6e for Stan%ar% o.erational ta*le .

INDE<ES1 - In%e6e of tatic ta*le u e% for tan%ar% o.eration . TOOLS - Tool ta*le. TOOLS1 - In%e6e for tool ta*le. R?S - Stan%ar% O.eration Roll*ac/ Seg#ent + R?S1+R?S5 - A%%itional)S.ecial Roll*ac/ eg#ent . TE(= - Te#.orar$ .ur.o e ta*le .ace TE(=':SER - Te#.orar$ ta*le .ace for u er . :SERS - : er ta*le .ace. 1FB.Ho- to i#.le#ent t,e #ulti.le control file for an e6i ting %ata*a e ! S,ut%o-n t,e %ata*a e Co.$ one of t,e e6i ting control file to ne- location E%it Config ora file *$ a%%ing ne- control file. na#e Re tart t,e %ata*a e. 1FE.W,at i a%9antage of ,a9ing %i / ,a%o-ing) (irroring ! S,a%o- et of %i / a9e a a *ac/u. in t,e e9ent of %i / failure. In #o t O.erating S$ te# if an$ %i / failure occur it auto#aticall$ -itc,o9er to .lace of faile% %i /. I#.ro9e% .erfor#ance *ecau e #o t OS u..ort 9olu#e ,a%o-ing can %irect file I)O re1ue t to u e t,e ,a%o- et of file in tea% of t,e #ain et of file . T,i re%uce I)O loa% on t,e #ain et of %i / . 11F.Ho- -ill $ou force %ata*a e to u e .articular roll*ac/ eg#ent ! SET TRANSACTION :SE ROLL?ACK SEG(ENT r* 'na#e. 111.W,$ 1uer$ fail o#eti#e ! Roll*ac/ eg#ent %$na#icall$ e6tent to ,an%le larger tran action entr$ loa% . A ingle tran action #a$ -i.eout all a9aila*le free .ace in t,e Roll*ac/ Seg#ent Ta*le .ace. T,i .re9ent ot,er u er u ing Roll*ac/ eg#ent . 115.W,at i t,e u e of RECORD LENGTH o.tion in E<= co##an% ! Recor% lengt, in *$te . 117.Ho- -ill $ou #onitor roll*ac/ eg#ent tatu ! Luer$ing t,e D?A'ROLL?ACK'SEGS 9ieIN :SE - Roll*ac/ Seg#ent i on-line. AKAILA?LE - Roll*ac/ Seg#ent a9aila*le *ut not on-line. OJJ-LINE - Roll*ac/ Seg#ent off-line INKALID - Roll*ac/ Seg#ent Dro..e%. NEEDS RECOKERP - Contain %ata *ut nee% reco9er$ or coru.te%. =ARTLP AKAILA?LE - Contain %ata fro# an unre ol9e% tran action in9ol9ing a %i tri*ute% %ata*a e. 118.W,at i #eant *$ Re%o Log file #irroring ! Ho- it can *e ac,ie9e%! =roce of ,a9ing a co.$ of re%o log file i calle% #irroring. T,i can *e ac,ie9e% *$ creating grou. of log file toget,er+ o t,at LGWR -ill auto#aticall$ -rite t,e# to all t,e #e#*er of t,e current on-line re%o log grou.. If an$ one grou. fail t,en %ata*a e auto#aticall$ -itc, o9er to ne6t grou.. It %egra%e .erfor#ance. 11;.W,ic, .ara#eter in Storage clau e -ill re%uce no. of ro- .er *loc/! =CTJREE .ara#eter Ro- iZe al o re%uce no of ro- .er *loc/. 11@.W,at i #eant *$ recur i9e ,int ! Nu#*er of ti#e .roce e re.eate%l$ 1uer$ t,e %ictionar$ ta*le i calle% recur i9e ,int . It i %ue to t,e %ata %ictionar$ cac,e i too #all. ?$ increa ing t,e SHARED'=OOL'SIXE .ara#eter -e can o.ti#iZe t,e iZe of Data Dictionar$ Cac,e. 11A.W,at i t,e u e of =ARJILE o.tion in E<= co##an% ! Na#e of t,e .ara#eter file to *e .a e% for e6.ort. 11B.W,at i t,e %ifference *et-een loc/ + latc,e + en1ueue an% e#a.,ore ! 0for D?A" A latc, i an internal Oracle #ec,ani # u e% to .rotect %ata tructure in t,e SGA fro# i#ultaneou acce . Ato#ic ,ar%-are in truction li/e TEST-AND-SET i u e% to i#.le#ent latc,e . Latc,e are #ore re tricti9e t,an loc/ in t,at t,e$ are al-a$ e6clu i9e. Latc,e are ne9er 1ueue%+ *ut -ill .in or lee. until t,e$ o*tain a re ource+ or ti#e out. En1ueue an% loc/ are %ifferent na#e for t,e a#e t,ing. ?ot, u..ort 1ueuing

an% concurrenc$. T,e$ are 1ueue% an% er9ice% in a fir t-in-fir t-out 0JIJO" or%er. Se#a.,ore are an o.erating $ te# facilit$ u e% to control -aiting. Se#a.,ore are controlle% *$ t,e follo-ing :ni6 .ara#eter 3 e##ni+ e##n an% e## l. T$.ical etting are3 e##n D u# of t,e >.roce e > .ara#eter for eac, in tance 0 ee initUin tanceI.ora for eac, in tance" e##ni D nu#*er of in tance running i#ultaneou l$G e## l D e##n 11E.W,at i a logical *ac/u.! Logical *ac/u. in9ol9e rea%ing a et of %ata*a e recor% an% -riting t,e# into a file. E6.ort utilit$ i u e% for ta/ing *ac/u. an% I#.ort utilit$ i u e% to reco9er fro# *ac/u.. 15F.W,at i a Roll*ac/ eg#ent entr$ ! It i t,e et of *efore i#age %ata *loc/ t,at contain ro- t,at are #o%ifie% *$ a tran action. Eac, Roll*ac/ Seg#ent entr$ #u t *e co#.lete% -it,in one roll*ac/ eg#ent. A ingle roll*ac/ eg#ent can ,a9e #ulti.le roll*ac/ eg#ent entrie . 151.W,at %ata*a e e9ent can *e et! 0for D?A" T,e follo-ing e9ent are fre1uentl$ u e% *$ D?A an% Oracle Su..ort to %iagno e .ro*le# 3 > 1FF8@ trace na#e conte6t fore9er+ le9el 8 Trace SLL tate#ent an% ,o- *in% 9aria*le in trace out.ut. > 1FF8@ trace na#e conte6t fore9er+ le9el B T,i ,o- -ait e9ent in t,e SLL trace file > 1FF8@ trace na#e conte6t fore9er+ le9el 15 T,i ,o- *ot, *in% 9aria*le na#e an% -ait e9ent in t,e SLL trace file > 18F1 trace na#e error tac/+ le9el 15 18F1 trace na#e error tac/+ le9el 8 18F1 trace na#e .roce tate Du#. out trace infor#ation if an ORA-18F1 >in erte% 9alue too large for colu#n> error occur . T,e 18F1 can *e re.lace% *$ an$ ot,er Oracle Ser9er error co%e t,at $ou -ant to trace. > @F trace na#e error tac/ le9el 1F S,o- -,ere in t,e co%e Oracle get a %ea%loc/ 0ORA-@F"+ an% #a$ ,el. to %iagno e t,e .ro*le#. T,e follo-ing li t of e9ent are e6a#.le onl$. T,e$ #ig,t *e 9er ion .ecific+ o .lea e call Oracle *efore u ing t,e#3 > 1F51F trace na#e conte6t fore9er+ le9el 1F 1F511 trace na#e conte6t fore9er+ le9el 1F 1F571 trace na#e conte6t fore9er+ le9el 1F T,e e e9ent .re9ent %ata*a e *loc/ corru.tion > 1FF8E trace na#e conte6t fore9er+ le9el 5 (e#or$ .rotect cur or > 1F51F trace na#e conte6t fore9er+ le9el 5 Data *loc/ c,ec/ > 1F511 trace na#e conte6t fore9er+ le9el 5 In%e6 *loc/ c,ec/ > 1F57; trace na#e conte6t fore9er+ le9el 1 (e#or$ ,ea. c,ec/ > 1F5@5 trace na#e conte6t fore9er+ le9el 7FF Allo- 7FF *$te #e#or$ lea/ for connection Note3 Pou can u e t,e :ni6 oerr co##an% to get t,e %e cri.tion of an e9ent. On :ni6+ $ou can t$.e >oerr ora 1FF;7> fro# t,e co##an% .ro#.t to get e9ent %etail . 155.W,at are t,e %ifferent /in% of e6.ort *ac/u. ! Jull *ac/ - Co#.lete %ata*a e Incre#ental - Onl$ affecte% ta*le fro# la t incre#ental %ate)full *ac/u. %ate. Cu#ulati9e *ac/u. - Onl$ affecte% ta*le fro# t,e la t cu#ulati9e %ate)full *ac/u. %ate. 157.Ho- %oe S.ace allocation ta*le .lace -it,in a *loc/ ! Eac, *loc/ contain entrie a folloJi6e% *loc/ ,ea%er Karia*le *loc/ ,ea%er Ro- Hea%er+ro- %ate 0#ulti.le ro- #a$ e6i t " =CTEREE 0W of free .ace for ro- u.%ation in future" 158.W,at are t,e factor cau ing t,e re.ar ing of SLL tate#ent in SGA! Due to in ufficient S,are% SLL .ool iZe. (onitor t,e ratio of t,e reloa% ta/e

.lace -,ile e6ecuting SLL tate#ent . If t,e ratio i greater t,an 1 t,en increa e t,e SHARED'=OOL'SIXE. LOGICAL Y =HPSICAL ARCHITECT:RE OJ DATW,at i %ictionar$ cac,e ! Dictionar$ cac,e i infor#ation a*out t,e %ata* e o*Nect tore% in a %ata %ictionar$ ta*le.A?ASE. 15;.W,at i %ictionar$ cac,e ! Dictionar$ cac,e i infor#ation a*out t,e %ata* e o*Nect tore% in a %ata %ictionar$ ta*le. 15@.W,at i Data*a e ?uffer ! Data*a e *uffer are cac,e in t,e SGA u e% to ,ol% t,e %ata *loc/ t,at are rea% fro# t,e %ata eg#ent in t,e %ata*a e uc, a ta*le + in%e6e an% clu ter D?'?LOCK'?:JJERS .ara#eter in INIT.ORA %eci%e t,e iZe. 15A.W,at i a Control file ! Data*a e o9erall .,$ ical arc,itecture i #aintaine% in a file calle% control file. It -ill *e u e% to #aintain internal con i tenc$ an% gui%e reco9er$ o.eration . (ulti.le co.ie of control file are a%9i a*le. 15B.Ho- -ill $ou create #ulti.le roll*ac/ eg#ent in a %ata*a e ! Create a %ata*a e -,ic, i#.licitl$ create a SPSTE( Roll*ac/ Seg#ent in a SPSTE( ta*le .ace. Create a Secon% Roll*ac/ Seg#ent na#e RF in t,e SPSTE( ta*le .ace. (a/e ne- roll*ac/ eg#ent a9aila*le 0After ,ut%o-n+ #o%if$ init.ora file an% Start %ata*a e" Create ot,er ta*le .ace 0R?S" for roll*ac/ eg#ent . Deacti9ate Roll*ac/ Seg#ent RF an% acti9ate t,e ne-l$ create% roll*ac/ eg#ent . 17F.W,at i col% *ac/u.! W,at are t,e ele#ent of it! Col% *ac/u. i ta/ing *ac/u. of all .,$ ical file after nor#al ,ut%o-n of %ata*a e. We nee% to ta/e. - All Data file . - All Control file . - All on-line re%o log file . - T,e init.ora file 0O.tional" 171.W,at i #eant *$ re%o log *uffer ! C,ange #a%e to entrie are -ritten to t,e on-line re%o log file . So t,at t,e$ can *e u e% in roll for-ar% o.eration %uring %ata*a e reco9erie . ?efore -riting t,e# into t,e re%o log file + t,e$ -ill fir t *roug,t to re%o log *uffer in SGA an% LGWR -ill -rite into file fre1uentl$. LOG'?:JJER .ara#eter -ill %eci%e t,e iZe. 175.Ho- -ill $ou #onitor t,e .ace allocation ! ?$ 1uer$ing D?A'SEG(ENT ta*le)9ie-. 177.W,at i #eant *$ free e6tent ! A free e6tent i a collection of continuou free *loc/ in ta*le .ace. W,en a eg#ent i %ro..e% it e6tent are reallocate% an% are #ar/e% a free. 178.W,at are t,e %ifferent #et,o% of *ac/ing u. oracle %ata*a e ! - Logical ?ac/u. - Col% ?ac/u. - Hot ?ac/u. 0Arc,i9e log" 17;.T,e %ata*a e in tance cra ,e% *ecau e of .o-er failure. T,e %ata*a e file are not affecte% *$ t,e cra ,. W,ic, file -ill *e u e% for t,e in tance reco9er$ at t,e ne6t %ata*a e in tance tartu.! 0C,oo e all t,at a..l$" Data file Control file Re%o log file 17@.T,e %ata*a e in tance i tarte% u ing S=JILE an% t,e %ata*a e i in (O:NT tate. W,ic, t-o o.eration can $ou .erfor# in t,e (O:NT tate of t,e %ata*a e! 0C,oo e t-o" Rena#ing t,e %ata file Configuring t,e %ata*a e in t,e ARCHIKELOG #o%e AND NEKER NEKER Creating ne- ta*le .ace+ A%%ing t,e %ata*a e u er 17A.W,ic, t-o tate#ent are true a*out t,e Jla ,*ac/ tec,nolog$! 0C,oo e t-o"

T,e re toration of file i not re1uire% for acco#.li ,ing t,e reco9er$. T,e un olicite% or -rongl$ co##itte% tran action can *e reco9ere%. AND NEKER NEKER T,e acci%ental lo of c,e#a can *e reco9ere%+ T,e acci%ental lo of ta*le .ace can *e reco9ere%. 17B. W,ic, tate#ent i true for t,e %ata*a e configure% in t,e ARCHIKELOG #o%e! Pou can ta/e *ac/u. of t,e %ata*a e -it,out ,utting %o-n t,e %ata*a e. AND NEKER NEKER Arc,i9ing infor#ation i -ritten to t,e %ata file an% re%o log file + Jla , reco9er$ area #u t *e u e% to tore t,e arc,i9e% re%o log file +T,e online re%o log file #u t *e #ulti.le6e% *efore .utting t,e %ata*a e in t,e ARCHIKELOG #o%e. 17E.T,e a*nor#al ter#ination of t,e %ata*a e *ac/groun% .roce cau e t,e %ata*a e in tance to ,ut %o-n -it,out $nc,roniZing t,e %ata*a e file . Arrange t,e te. re1uire% for in tance reco9er$! i" S(ON a..lie re%o to t,e %ata*a e ii" T,e %ata*a e o.en iii":nco##itte% tran action are rolle% *ac/ *$ S(ON N?3=erfor# reco9er$ #anuall$ AND S(ON rea% t,e arc,i9e% re%o log file an% online re%o log file are not re1uire%. 18F.T,e %ata*a e i running an% u er are connecte% to t,e %ata*a e in tance u ing t,e LSNR1 li tener. Pou o* er9e t,at LSNR1 ,a to..e%. W,ic, t-o tate#ent are true in t,i ituation! 0C,oo e all t,at a..l$" -Ne- connection are not allo-e% an% -T,e connecte% e ion are not affecte% 181.:NDO'RETENTION i et to EFF in $our %ata*a e+ *ut un%o retention guarantee i not ena*le%. W,ic, tate#ent i true in t,i cenario! :n%o %ata i o9er-ritten if no .ace i a9aila*le for t,e ne- un%o %ata AND NEKER NEKER :n%o %ata i retaine% e9en if no .ace i a9aila*le an% ne- un%o generate% i tore% in t,e te#.orar$ ta*le .ace+ :n%o %ata *eco#e o* olete if a long-running tran action ta/e #ore ti#e t,an t,at .ecifie% *$ :NDO'RETENTION+ All un%o %ata i .urge% if no .ace i a9aila*le to acco##o%ate ne- un%o generate% 185.W,at i a 5 =,a e Co##it! T-o =,a e co##it i u e% in %i tri*ute% %ata *a e $ te# . T,i i u eful to #aintain t,e integrit$ of t,e %ata*a e o t,at all t,e u er ee t,e a#e 9alue . It contain D(L tate#ent or Re#ote =roce%ural call t,at reference a re#ote o*Nect. T,ere are *a icall$ 5 .,a e in a 5 .,a e co##it. a" =re.are =,a e 3 Glo*al coor%inator a / .artici.ant to .re.are *" Co##it =,a e 3 Co##it all .artici.ant to coor%inator to =re.are%+ Rea% onl$ or a*ort Re.l$ 187.W,at are #utating ta*le ! W,en a ta*le i in tate of tran ition it i ai% to *e #utating. eg 3 If a ro,a *een %elete% t,en t,e ta*le i ai% to *e #utating an% no o.eration can *e %one on t,e ta*le e6ce.t elect. 188.Can : %i a*le %ata*a e trigger! Ho-! Pe . Wit, re .ect to ta*le ALTER TA?LE TA?LE 22 DISA?LE all'trigger 44 18;.Ho- #an$ colu#n can ta*le ,a9e! T,e nu#*er of colu#n in a ta*le can range fro# 1 to 5;8. 18@.I .ace ac1uire% in *loc/ or e6tent ! In e6tent . 18A.W,at are attri*ute of cur or! WJO:ND + WNOTJO:ND + WISO=EN+WROWCO:NT 18B.W,at are t,e 9ariou t$.e of E6ce.tion ! : er %efine% an% =re%efine% E6ce.tion . 18E.Can -e %efine e6ce.tion t-ice in a#e *loc/ ! No. 1;F.Can $ou ,a9e t-o function -it, t,e a#e na#e in a =L)SLL *loc/ ! Pe .

1;1.Can $ou ,a9e t-o tore% function -it, t,e a#e na#e ! Pe . 1;5.W,at are t,e 9ariou t$.e of .ara#eter #o%e in a .roce%ure ! IN+ O:T AND INO:T. 1;7.W,at i O9er Loa%ing an% -,at are it re triction ! O9erLoa%ing #ean an o*Nect .erfor#ing %ifferent function %e.en%ing u.on t,e no. of .ara#eter or t,e %ata t$.e of t,e .ara#eter .a e% to it. 1;8.Can function *e o9erloa%e% ! Pe . 1;;.Can t-o function ,a9e a#e na#e Y in.ut .ara#eter *ut %iffer onl$ *$ return %atat$.e No. 1;@.W,at are t,e con truct of a .roce%ure+ function or a .ac/age ! T,e con truct of a .roce%ure+ function or a .ac/age are 3 9aria*le an% con tant cur or e6ce.tion 1;A.W,$ Create or Re.lace an% not Dro. an% recreate .roce%ure ! So t,at Grant are not %ro..e%. 1;B.Can $ou .a .ara#eter in .ac/age ! Ho- ! Pe . Pou can .a .ara#eter to .roce%ure or function in a .ac/age. 1;E.W,at are t,e .art of a %ata*a e trigger ! T,e .art of a trigger are3 A triggering e9ent or tate#ent A trigger re triction A trigger action 1@F.W,at are t,e 9ariou t$.e of %ata*a e trigger ! T,ere are 15 t$.e of trigger + t,e$ are co#*ination of 3 In ert+ Delete an% :.%ate Trigger . ?efore an% After Trigger . Ro- an% State#ent Trigger . 07H5H5D15" 1@1.W,at i t,e a%9antage of a tore% .roce%ure o9er a %ata*a e trigger ! We ,a9e control o9er t,e firing of a tore% .roce%ure *ut -e ,a9e no control o9er t,e firing of a trigger. 1@5.W,at i t,e #a6i#u# no. of tate#ent t,at can *e .ecifie% in a trigger tate#ent! One. 1@7.Can 9ie- *e .ecifie% in a trigger tate#ent ! No 1@8.W,at are t,e 9alue of 3ne- an% 3ol% in In ert)Delete):.%ate Trigger ! INSERT 3 ne- D ne- 9alue+ ol% D N:LL DELETE 3 ne- D N:LL+ ol% D ol% 9alue :=DATE 3 ne- D ne- 9alue+ ol% D ol% 9alue 1@;.W,at are ca ca%ing trigger ! W,at i t,e #a6i#u# no of ca ca%ing trigger at a ti#e! W,en a tate#ent in a trigger *o%$ cau e anot,er trigger to *e fire%+ t,e trigger are ai% to *e ca ca%ing. (a6 D 75. 1@@.W,at are #utating trigger ! A trigger gi9ing a SELECT on t,e ta*le on -,ic, t,e trigger i -ritten. 1@A.De cri*e Oracle %ata*a eR .,$ ical an% logical tructure ! =,$ ical 3 Data file + Re%o Log file + Control file. Logical 3 Ta*le + Kie- + Ta*le .ace + etc. 1@B.Can $ou increa e t,e iZe of a ta*le .ace ! Ho- ! Pe + *$ a%%ing %atafile to it. 1@E.W,at are con training trigger ! A trigger gi9ing an In ert):.%at e on a ta*le ,a9ing referential integrit$ con traint on t,e triggering ta*le.

1AF.W,at i t,e u e of Control file ! Contain .ointer to location of 9ariou %ata file + re%o log file + etc. 1A1.W,at i t,e u e of Data Dictionar$ ! : e% *$ Oracle to tore infor#ation a*out 9ariou .,$ ical an% logical Oracle tructure e.g. Ta*le + Ta*le .ace + %atafile + et 1A5.W,at are t,e %i a%9antage of clu ter ! T,e ti#e for In ert increa e . 1A7.W,at are t,e a%9antage of clu ter ! Acce ti#e re%uce% for Noin . 1A8.W,at are t,e #in. e6tent allocate% to a roll*ac/ e6tent ! T-o 1A;.An in ert tate#ent follo-e% *$ a create ta*le tate#ent follo-e% *$ roll*ac/ ! Will t,e ro- *e in erte% ! No. 1A@.W,at are t,e tate of a roll*ac/ eg#ent ! W,at i t,e %ifference *et-een .artl$ a9aila*le an% nee% reco9er$ ! T,e 9ariou tate of a roll*ac/ eg#ent are 3 ONLINE+ OJJLINE+ =ARTLP AKAILA?LE+ NEEDS RECOKERP an% INKALID. 1AA.W,at i t,e ignificance of t,e Y an% YY o.erator in =L SLL ! T,e Y o.erator #ean t,at t,e =L SLL *loc/ re1uire u er in.ut for a 9aria*le. T,e YY o.erator #ean t,at t,e 9alue of t,i 9aria*le ,oul% *e t,e a#e a in.utte% *$ t,e u er .re9iou l$ for t,i a#e 9aria*le. If a tran action i 9er$ large+ an% t,e roll*ac/ eg#ent i not a*le to ,ol% t,e roll*ac/ infor#ation+ t,en -ill t,e tran action .an acro %ifferent roll*ac/ eg#ent or -ill it ter#inate ! It -ill ter#inate 0=lea e c,ec/ ". 1AB.Can $ou .a a .ara#eter to a cur or ! E6.licit cur or can ta/e .ara#eter + a t,e e6a#.le *elo- ,o- . A cur or .ara#eter can a..ear in a 1uer$ -,ere9er a con tant can a..ear. C:RSOR c1 0#e%ian IN N:(?ER" IS SELECT No*+ ena#e JRO( e#. WHERE al I #e%ianG 1AE.W,at are t,e 9ariou t$.e of Roll?ac/ Seg#ent ! =u*lic A9aila*le to all in tance =ri9ate A9aila*le to .ecific in tance 1BF.Can $ou u e WRo-Count a a .ara#eter to a cur or ! Pe 1B1.W,at i O.ti#al Jle6i*le Arc,itecture! A %irector$ tructure. It i a tan%ar% or a et of configuration gui%eline create% to en ure fa t an% relia*le oracle %ata*a e t,at re1uire little #aintenance. T,e #ain .ur.o e t,ereof are -organi ing large a#ount of co#.licate% oft-are an% %ata on %i / to .re9ent ,ar%-are *ottlenec/ an% .oor .erfor#ance+ facilitating routine a%#ini trati9e ta / t,at are ,ig,l$ 99ulnera*le to %ata corru.tion+ facilitating -itc,ing *et-een %ata*a e + #anaging t,e %ata*a e gro-t,+ a9oi%ing frag#entation of free .ace in t,e %ata %ictionar$+ #ini#iZing re ource contention. In ,ort oracle ,a %e igne% t,e OJA a a file $ te# %irector$ tructure t,at ,el. in #aintaining #ulti.le 9er ion of #ulti.le oracle .ro%uct . 1B5. W,ic, ot,er .rotocol can oracle Net in 11g u e! In relea e 11g OracleR net-or/ u..ort i li#ite% to TC=+ TC= -it, ecure oc/et+t,e ne-er Soc/et Direct =rotocol SD= an% Win%o- Na#e% =i.e 0or WN=" 1B7.E6.lain i ORACLE NET Oracle Net i a oft-are co#.onent t,at ena*le connecti9it$ *et-een t-o oracle net-or/ . It can al o *e %efine% a a uite of net-or/ing co#.onent t,at .ro9i%e enter.ri e--i%e connecti9it$ olution in %i tri*ute% an% ,eterogeneou co#.uting en9iron#ent . Oracle Net Ser9ice con i t of -Oracle Net+ Li tener+ Oracle Connection (anager+ Oracle Net configuration A i tant+ Oracle Net (anager. 1B8. E6.lain D?:A!

Data*a e :.gra%e A i tant i a G:I tool u e% to u.gra%e an e6i ting %ata*a e. Oracle reco##en% u ing D?:A -,ile u.gra%ing a %ata*a e an% D?CA -,ile creating a %ata*a e. 1B;. E6.lain D?CA! Data*a e Configuration A i tant i a G:I-*a e% oracle tool+ -,ic, can run a .art of O:I or a a tan%alone a..lication an% i u e% to create+ configure+ #anage an% %elete a %ata*a e. D?CA run %uring %ata*a e in tallation -,en t,e create a %ata*a e o.tion i electe%. T,e D?CA utilit$ i a*le to e6a#ine %ata*a e etting . It i al o o.tionall$ u e% to e6.ort t,e current %ata of a %ata*a e. D?CA tore te#.late in a file -it, a .%*c e6ten ion+ 9aria*le uc, a ORACLE'?ASE an% D?'NA(E allo- D?CA to in tall file into an a..ro.riate %irector$ for an oracle in tallation. W,ile e6.orting %ata fro# t,e %ata*a e+ D?CA create a Zi. file ,a9ing e6ten ion .%fN+ -,ic, con i t of ra- i#age of eac, %ata file. T,e e i#age are auto#aticall$ -ritten %irectl$ to %i / in tea% of u ing SLL tate#ent . T,erefore+ it i a..ro.riate to u e .%fN file for %ata*a e creation+ an% not a a *ac/u.. 1B@. E6.lain OE(! Oracle Enter.ri e (anager i a gra.,ical $ te# #anage#ent tool t,at i u e% to #anage co#.onent of Oracle an% a%#ini ter %ata*a e . OE( co#.ri e a gra.,ical con ole+ #anage#ent er9er+ Oracle Intelligent Agent+ re.o itor$ %ata*a e+ an% tool to .ro9i%e an intergrate% an% co#.re,en i9e $ te# #anage#ent .latfor# for #anaging oracle .ro%uct . Tool intergrate% -it, OE( can *e u e% to e6a#ine t,e .erfor#ance of an Oracle %ata*a e an% tune t,e %ata*a e accor%ingl$. 1BA.Scenario3 $ou -or/ a a D?A for Infotec, Inc. T,e co#.an$ u e% Oracle a it %ata*a e. Pou ,a9e o.ene% t,e %ata*a e to .erfor# u.%ate. W,ic, file if lo t can cau e t,e %ata*a e to cra ,! Datafile fro# t,e SPSTE( ta*le .ace an% controlfile. Re#e#*er - if an$ of t,e control file an% a %atafile fro# t,e SPSTE( ta*le .ace i #i ing+ t,e in tance -ill i##e%iatel$ a*ort rea on *eing t,at t,e e file are re .on i*le for a %ata*a e to re#ain in t,e (O:NT #o%e. AND NEKER NEKER arc,i9elog file or %atafile fro# SPSA:< rea on *eing t,e in tance can ta/e t,e %atafile fro# t,e SPSA:< ta*le .ace offline auto#aticall$+ an% t,erefore i ca.a*le to re#ain o.en e9en if it i lo t. an% al o if an$t,ing ,a..ene% to an arc,i9e% log file+ it cannot ,a9e an$ effect on t,e in tance. 1BB.W,$ %o $ou ,a9e to o.en t,e %ata*a e -it, RESETLOGS after recreating a controlfile! 1BE.-,ic, 9ie- are a9aila*le in NO(O:NT #o%e! ItR t,e K&INSTANCE an% K&SESSION AND NEKER NEKER an% 9ie- .refi6e% -it, D?A' are t,e %ata %ictionar$ 9ie-,ic, are onl$ een in O=EN #o%e an% al o PO: CAN NEKER fin% K&DATA?ASE an% K&DATAJILE *ecau e K&' 9ie- are %$na#ic 9ie- t,at are .o.ulate% fro# t,e control file an% t,erefore are onl$ a9aila*le in #ount #o%e or O.en #o%e 1EF.E6.lain .ara#eter ! :SER'D:(='DEST- an init .ara#eter t,at .ecifie t,e %e tination in -,ic, t,e u e .roce e inclu in9e of *ac/groun% an% foregroun% .roce e -ill -rite trace file . ?ACKGRO:ND'D:(='DEST - .ecifie location for trace file of *ac/groun% .roce e to *e -ritten an% al o location for t,e alert.log file D?'CREATE'JILE'DEST- .ara#eter to .ecif$ t,e %efault location for Oracle #anage% %atafile -it, .ro.ertie 2.ara#eter t$.e3 tring+ $nta63D?'CREATE'JILE'DESTD%irector$[%i / grou.+ %efault 9alue3 No %efault 9alue+ (o%ifia*le3ALTER SESSION+ ALTER SPSTE(4+ if D?'CREATE'ONLINE'LOG'DEST'n init .ara#eter i not .ecifie% t,en D?'CREATE'JILE'DEST i con i%ere% a t,e %efault location for oracle #anage% control file an% online re%o log . RE(E(?ER3 t,ere i no uc, .ara#eter a *ac/groun%'trace'%e t 1E1. Gi9e t$.e of eg#ent ! Ta*le+ Data %ictionar$+in%e6+ clu ter 1E5.E6.lain t,e conce.t of eg#ent + %ata*loc/+ e6tent!

SEG(ENT3 i a et of e6tent allocate% for a .ecific %ata*a e o*Nect uc, a #entione% a*o9e+ eac, ti#e a %ata*a e o*Nect i create%+ oracle allocate a eg#ent to it+ t,i eg#ent contain atlea t one e6tent t,at intun contain atlea t one *loc/. A ingle eg#ent ,ol% all t,e %ata of t,e corre .on%ing %ata*a e o*Nect. A eg#ent can *elong to onl$ one ta*le .ace+ *ut can *e a ociate% to #ulti.le %atafile . E6tent allocate% to a eg#ent can *elong to #ulti.le %atafile *ut %ata*loc/ allocate% to an e6tent can *elong to onl$ one %atafile. 1E7.-,ic, co##an% i u e% to e6it fro# t,e Li tener co##an% utilit$ -it,out a9ing c,ange to t,e li tener.ora file! T,e L:IT co##an% 1E8.E6.lain t,e Li tener utilit$! T,e LSNRCTL utilit$ ena*le a %ata*a e a%#ini trator to #anage one or #ore li tener . It cannot *e u e% to create or configure li tener . It onl$ .roi%e co##an% to control 9ariou li tener function li tener function uc, a tarting+ to..ing an% getting tatu of li tener .lu al o c,anging .ara#eter etting in t,e li tener.ora file START- tart a li tener STO=- to. a li tener STAT:S- ee tatu of a li tener SERKICES-c,ec/ er9ice offere% *$ t,e li tener KERSION- ,o- 9er ion of a li tener RELOAD-force a li tener to re-rea% it entr$ in li tener.ora file SAKE'CONJIG-u e% to -rite an$ c,ange #a%e online to t,e li tener TRACE-ena*le tracing of a li tenerR acti9it$ CHANGE'=ASSWORD- et .a -or% for a li tenerR a%#ini tration E<IT-u e% to e6it fro# t,e tool an% a9e c,ange to t,e li tener.ora file L:IT-u e% to e6it t,e tool -it,out a9ing c,ange #a%e to t,e li tener.ora file SET-u e% to et 9ariou o.tion uc, a tracing an% ti#eout SHOW-u e% to ,o- o.tion t,at ,a9e *een et for a li tener SERKICE an% STAT:S co##an% are u e% to ee t,e tatu of a li tener. RE(E(?ER - A?ORT i not a li tener co##an% 1E;.E6.lain t,e Data .u#. utilit$ an% t,e file *elonging to it! Data .u#. i a ne- feature intro%uce% in Oracle 1Fg to #oe9 %ata *et-een %ata*a e an% to or fro# o.erating $ te# file 9er$ efficientl$. It .ro9i%e .arallel i#.ort an% e6.ort utilitie 0i#.%*+ e6.%." on t,e co##an%-line a -ell a t,e -e*-*a e% oracle enter.ri e #anager e6.ort)i#.ort interface. It i i%eall$ *eneficial for large %ata*a e an% %ata -ae,ou ing en9iron#ent . Oracle %ata .u#. facilit$ run on t,e er9er. o#e of t,e function .erfor#e% *$ oracle %ata .u#. areG - it i u e% to co.$ %ata fro# one c,e#a to anot,er *et-een t-o %ata*a e or -it,in a ingle %ata*a e an% al o it can *e u e% to e6tract a logical co.$ of t,e entire %ata*a e+ a li t of ta*le .ace an% a li t of c,e#a or a li t of ta*le . T$.e of file #anage% *$ t,e %ata .u#. areG -%u#. file 3containing t,e %ata an% #eta%ata t,at i *eing #o9e%+ Log file 3t,e e recor% #e age a ociate% -it, an o.eration+ SLL file 3t,e e recor% t,e out.ut of a SLLJILE o.eration. a SLLJILE o.eration i in9o/e% u ing t,e Data .u#. i#.ort SLLJILE .ara#eter an% re ult in all of t,e SLL DDL t,at i#.ort -il *e e6ecuting *a e% on ot,er .ara#eter + *eing -rittent o a SLL file. T,e Data .u.# utilit$ u e t,e e6.ort .ara#eter CONTENT to filter t,e e6.orte% o*Nect uc, a %ata+ #ete%ata or *ot,. 1E@.E6.lain SLLHLoa%er! 1EA.W,en t,e SGA'TARGET i et to a non-Zero 9alue+ a.art fro# ,are% .ool+ *uffer cac,e an% Large .ool -,ic, ot,er #e#or$ tructure are cconfigure% a .art of t,e Auto#atic S,are% (e#or$ (anage#ent feature in oracle! It i t,e Qa9a .ool an% Strea# .ool+ *ecau e if SGA i .ecifie% t,en t,e #e#or$ .ool t,at are auto#aticall$ iZe% are ?uffer cac,e0D?'CACHE'SIXE"+ ,are

.ool0SHARED'=OOL'SIXE"+ large .ool0LARGE'=OOL'SIXE"+ Na9a .ool0QAKA'=OOL'SIXE"+ trea# .ool0STREA(S'=OOL'SIXE" NOTE3 Strea# .ool i an o.tional SGA tructure 1EB.E6.lain t,e fla ,'reco9er$'area! T,e fla , reco9er$ area i a .ecific location on %i / t,at tore an% #anage file for *ac/u. an% reco9er$ .ur.o e . It i an auto#atic feature a9aila*le in Oracle 1Fg. Oracle (anage% Jile 0O(J" configure t,e fla , reco9er$ area an% utili e t,e %i / re ource #anage% *$ Auto#atic Storage (anage#ent0AS(". R(AN .erfor# t,e ta / of auto#atic cleaning u.. T,e fla , reco9er$ area act a a cac,e area for t,e *ac/u. co#.onent t,at are to *e co.ie% to t,e ta.e. T,e fla , reco9er$ area contain t,e follo-ing %ata*a e file3 Control file + arc,i9e log file + fla ,*ac/ log + control file an% S=JILE auto-*ac/u. + an% %atafile i#age co.ie . It i nece ar$ to configure t,e fla , reco9er$ area -,en t,e %ata*a e i et u. for t,e 9er$ fir t ti#e. 1EE.W,en %ata*a e i in noarc,ielog #o%e an% $ou u e% R(AN to ta/e *ac/u.. -,ic, t$.e of *ac/u. are .o i*le! Onl$ clo e% an% Incre#ental *ac/u. INCRE(ENTAL ?ACK:= i an R(AN *ac/u. in -,ic, onl$ %ata *loc/ t,at -ere #o%ifie% ince t,e la t incre#ental *ac/u. are *ac/e% u.. Incre#ental *ac/u. are cla ifie% *$ le9el . T,e *a eline *ac/u. for an incre#ental *ac/u. i a le9el F incre#ental *ac/u.. A le9el F incre#ental *ac/u.+ li/e a full *ac/u.+ *ac/ u. all %ata *loc/ t,at ,a9e e9er *een u e%. Ho-e9er+ a full *ac/u. cannot *e u e% a t,e *a eline *ac/u. for u* e1uent incre#ental *ac/u. . Incre#ental *ac/u. at le9el greater t,an F *ac/ u. onl$ %ata *loc/ #o%ifie% ince t,e la t incre#ental *ac/u.. Jore6a#.le+ a le9el 1 incre#ental *ac/u. -ill onl$ *ac/u. onl$ t,o e %ata *loc/ t,at ,a9e c,ange% ince t,e le9el F incre#ental *ac/u.. furt,er#ore+ a le9el 5 incre#ental *ac/u. -ill *ac/ u. onl$ t,o e %ata *loc/ t,at ,a9e c,ange% ince te, le9el 1 incre#ental *ac/u.. Incre#ental *ac/u. are 1uic/er+ an% t,e$ occu.$ le .ace *ecau e t,e$ %o not contain all %ata *loc/ . Incre#ental *ac/u. can *e a..lie% to t,e *a eline *ac/u.+ -en re1uire% to for# a co#.lete *ac/u.. A clo e% *ac/u. i a *ac/u. of one or #ore %ata*a e file + -,ic, i ta/en -,ile t,e %ata*a e i clo e%. : uall$+ a clo e% *ac/u. i al o a -,ole %ata*a e *ac/u.0a *ac/u. of t,e control file an% all %atafile of t,e %ata*a e". A clo e% *ac/u. can *e eit,er con i tent or incon i tent+ A *ac/u. of a clo e% %ata*a e t,at -a cleanl$ ut%o-n0NOR(AL+ I((EDIATE+ TRANSACTIONAL" i a clo e% con i tent *ac/u.. On t,e ot,er ,an%+ if a %ata*a e i ,ut%o-n u ing t,e A?ORT co##an% or t,e a ociate% in tance ter#inate a*nor#all$ *efore t,e *ac/u. i ta/en+ t,e *ac/u. -ill *e a clo e% incon i tent *ac/u.. A clo e% *ac/u. i al o calle% a col% *ac/. an% i t,e onl$ t$.e of *ac/u. t,at can *e ta/en for a %ata*a e running in NOARCHIKELOG #o%e. NOTE3 t,at an o.en or online *ac/u. i one %one -,ile t,e %atafile are o.en an% i al-a$ an incon i tent one t,at re1uire reco9er$0a..lication of re%o %ata" *efore it can *e #a%e con i tent. 5FF.-,ic, file are create% *$ %efault at %ata*a e create co##an% e9en if not .ecifie%! -control file+ online re%o log file + SPSA:< ta*le .ace %atafile an% SPSTE( ta*le .ace %atafile. 5F1.E6.lain Nor#ali ation! NOTE3 (an$-to-#an$ i car%inalit$ t,at i a9oi%e% in t,e nor#ali ation tec,ni1ue 5F5.W,ic, *ac/groun% .roce i u e% to -rite %irt$ *loc/ to %i /! D?Wn 0it %oe nt c,ange" 5F7.Ho- long %oe it ta/e for ((ON to gat,er a na. ,ot an% launc, t,e ADD(! @F #inute . 5F8.W,ic, 9ie- ,o- all t,e ta*le in a %ata*a e! it i t,e D?A'TA?LE AND NEKER NEKER u er'ta*le + all'ta*le + %*a'9ie5F;.-,at i an aggregate function!

5F@.Ho- %o $ou con9ert a %ate to a tring! To'c,ar. A *onu -oul% *e t,at t,e$ al-a$

inclu%e a for#at #a /.

5FA.De cri*e t,e *loc/ tructure of =LSLL! Declaration+ ?egin+ e6ce.tion+ en%. 5FB.W,at i an anon$#ou *loc/! :nna#e% =L)SLL *loc/. 5FE.W,$ -oul% $ou c,oo e to u e a .ac/age 9er u traig,t .roce%ure an% function ! I loo/ for #aintenance+ grou.ing logical functionalit$+ %e.en%enc$ #anage#ent+ etc. I -ant to *elie9e t,at t,e$ *elie9e u ing .ac/age i a goo% t,ing. 51F.E6.lain -,at ,a..en -,en $ou i ue a co##it co##an%! 511.Pour %e9elo.er a /e% $ou to create an in%e6 on t,e =ROD'ID colu#n of t,e SALES'HISTORP ta*le+ -,ic, ,a 1FF#illion ro- . T,e ta*le ,a a..ro6i#atel$ 5 #illion ro- of ne- %ata loa%e% on t,e fir t %a$ of e9er$ #ont. Jor t,e re#ain%er of t,e #ont,+ t,e ta*le i onl$ 1uerie%. (o t re.ort are generate% accor%ing to t,e =ROD'ID+ -,ic, ,a E@ %i tinct 9alue . W,ic, t$.e of in%e6 -oul% *e a..ro.riate! 515.Pou e6a#ine t,e alert log file an% notice t,at error are *eing generate% fro# an SLLH=lu e ion. W,ic, file are *e t for .ro9i%ing $ou -it, #ore infor#ation a*out t,e nature of t,e .ro*le#! 517.: er .-ar% an% . #it, ,a9e left t,e co#.an$. Pou nolonger -ant t,e# to ,a9e acce to t,e %ata*a e. Pou nee% to #a/e ure t,at t,e o*Nect t,e$ create% in t,e %ata*a e re#ain. W,at %o $ou nee% to %o! 518.-,ic, t-o action cau e a log -itc,! 51;.-,ic, fact %o $ou /no- a*out a ,are% .ool! 51@.Pou nee% to create an in%e6 on t,e =ASS=ORT'RECORDS ta*le. It contain 1F #illion ro- of %ata. T,e /e$ colu#n ,a9e lo- car%inalit$. T,e 1uerie generate% again t t,i ta*le u e a co#*ination of #ulti.le WHERE con%ition in9ol9ing t,e OR o.erator. W,ic, t$.e of in%e6 -oul% *e *e t for t,i t$.e of ta*le! 51A.E6.lain t,e conce.t of locall$ #anage% ta*le .ace! 51B.Pou %eci%e% to u e #ulti.le *uffer .ool in t,e %ata*a e *uffer cac,e of $our %ata*a e+ Pou et t,e iZe of t,e *uffer .ool -it, t,e D?'KEE='CACHE'SIXE an% D?'RECPCLE'CACHE'SIXE .ara#eter an% re tarte% $our in tance. W,at el e #u t $ou %o to ena*le t,e u e of t,e *uffer .ool ! 51E.Ho- %o $ou create a ,ierarc,ical 1uer$! ?$ u ing a CONNECT ?P. 55F.Ho- -oul% $ou generate <(L fro# a 1uer$! T,e an -er ,ere i A lot of %ifferent -a$ . T,e$ ,oul% /no- t,at t,ere are SLL function 3 <(LELE(ENT+ <(LJOREST+ etc an% =L)SLL function 3 D?(S'<(LGEN+ D?(S'<(LL:ERP+ etc. 551.Ho- can $ou tell if a SELECT returne% no ro- ! ?$ ui ng t,e NO'DATA'JO:ND e6ce.tion. 555.W,at i an autono#ou tran action! I%entifie% *$ .rag#a autono#ou . A c,il% tran action e.arate fro# t,e .arent t,at (:ST *e co##itte% or rolle% *ac/. 557.T,e D?A ,a %ecrea e% LOG'CHECK=OINT'INTERKAL to @FFF an% c,ange% LOG'CECK=OINT'TI(EO:T fro# F to ;. W,at *e t i%entifie t,e i#.act of t,e e etting on t,e oracle %ata*a e! 558.-,ic, SLLHloa%er .ara#eter ena*le $ou to loa% a .ecifie% nu#*er of recor% tore% in t,e %ata file! 55;.Pou are atte#.ting to create a ro*u t *ac/u. an% reco9er$ trateg$ u ing Oracle Enter.ri e (anager 5.F. -,ic, t-o tool allo- $ou to tart an% to. t,e Oracle In tance! 55@.W,at are t,e t,ing t,at Oracle 1Fg i#.ro9e% again t Ei an% al o t,at 11g

i#.ro9e% again t 1Fg! Oracle Ei %i%nt ,a9e reco9er$'file'%e t o ,a% no fla , recoe9r$ area+ no SPSA:< ta*le .ace in Ei -,ic, i i#.ortant for reco9er$. 55A.W,ic, role #u t *e grante% to t,e reco9er$ catalog o-ner in or%er for R(AN to -or/ .ro.erl$ -,en $ou create a reco9er$ catalog for a .ro%uction %ata*a e! 55B.E6.lain r#an co##an% ! Ho- $ou connect to an au6illiar$ an% catalog %ata*a e! 1lIr#an connect target $ ).-%M%*1 CATALOG r#an).-%Mcat%* 1lIr#an connect target $ ).-%M%*1 A:<ILLIARP $ ).-%Mau6%* 55E.Pou are *ac/ing u. an oracle %ata*a e on t,e :NI< .latfor# -,ile t,e %ata*a e i till o.en. ?efore i uing t,e tar co##an%+ -,ic, of tate#ent ,oul% *e i ue%! 57F.Pou are e9aluating t,e co#.le6it$ of an e6i ting reco9er$ trateg$ in $our organi ation. Offline *ac/u. on OARCHIKELOG #o%e %ata*a e offer -,ic, of t,e follo-ing *enefit o9er offline *ac/u. on ARCHIKELOG %ata*a e ! 571.-,en a D?A atte#.t to *ac/u. t,e oracle %ata*a e control file. after i uing t,e ALTER DATA?ASE ?ACK:= CONTROLJILE TO TRACE co##an%+ -,ere can t,e D?A fin% t,e *ac/u. control file creation #aterial Oracle create% for ,i#! 575.Pou are tr$ing to %eter#ine t,e tatu of a %ata*a e *ac/u.. In or%er to %eter#ine t,e %ata file in9ol9e% in t,e *ac/u.+ -,ic, 1uerie are a..ro.riate! SELECT fileC fro# K&?ACK:= -,ere STAT:SDRACTIKERG t,i li t file *eing *ac/e% u.0in *ac/u. .rogre " 577.Pou are atte#.ting to i%entif$ $nc,roni ation *et-een file on a #ounte% %ata*a e t,at -a Nu t *ac/e% u.. W,ic, %ictionar$ 9ie- #a$ offer a i tance in t,i ta /! 578.-,ic, *ac/groun% .roce %oe an oracle %ata*a e u e to en ure t,e %etection of t,e nee% for %ata*a e reco9er$ *$ c,ec/ing for $nc,roni ation! 57;.E6.lain *a e ta*le ! A ta*le u e% to %efine a 9ie57@.E6.lain t,e conce.t of a large .ool! T,e large .ool i create% to a9oi% contention in t,e ,are% .ool in t,e cae of ,ar% er9er en9iron#ent. T,e :GA .roce ta/e .lace in t,e ,are% .ool in t,e ca e of ,are% er9er en9iron#ent o to a9oi% contention all t,e u er .roce e are ,ifte% 57A.T,e D?A i configuring u e of R(AN -it, a reco9er$ catalog. W,en u ing a reco9er$ catalog in conNuction -it, R(AN+ -,ere can *e t,e actual *ac/u. co.ie of %ata*a e infor#ation foun%! 57B.T,e D?A i a e ing #aintenance of reco9er$ catalog creation. Once create%+ -,ere %oe t,e reco9er$ catalog %ra- #uc, of it infor#ation fro# -,en #aintenance i .erfor#e% on it! 2o.tion 3.ro%uction %ata*a e file+ reco9er$ catalog control file+ .ro%uction %ata*a e control file+ arc,i9e% re%o log 4 57E.T,e D?A i configuring R(AN for u e a t,e *ac/u.)reco9er$ tool for t,e oracle %ata*a e. After creating t,e .ro%uction %ata*a e an% t,e reco9er$ catalog+ -,ic, co##an% i u e% for e ta*li ,ing t,e *a eline infor#ation re1uire% in t,e reco9er$ catalog for .ro.er R(AN u age! 2o.tion 3RESET+ REGISTER+ RESPNC+ RE=ORT4 58F.T,e D?A ,a ,ut%o-n t,e %ata*a e an% #a%e co.ie of all %atafile #anuall$ a a *enc,#ar/ *ac/u. for tre te ting. W,ic, of t,e follo-ing R(AN co##an% -ill #a/e t,at *ac/u. u a*le in t,e conte6t of t,e re t of t,e content of t,e reco9er$ catalog! 2o.tion 3RESPNC+ CATALOG+ RE=ORT+ LIST4 581.T,e D?A nee% to i%entif$ a9aila*le *ac/u. for t,e $ F7.%*f %atafile *elonging to t,e SPSTE( ta*le .ace. W,ic, co##an% -oul% *e #o t a..ro.riate for t,i .roce ! 585.T,e D?A i %e9elo.ing cri.t in R(AN. In or%er to tore *ut not .roce co##an% in a ci.t in R(AN for %ata*a e *ac/u.+ -,ic, of t,e follo-ing co##an% c,oice are a..ro.riate!

2o.tion 3R:NT..V+ E<EC:TE SCRI=TT...V+ CREATE SCRI=TT...V+ ALLOCATE CHANNELT...V4 587.T,e D?A i %e9elo.ing a cri.t for *ac/u. t,at -ill en ure t,at no *loc/ corru.tion i .er#itte% in a %atafile. W,ic, of t,e follo-ing co##an% i a..ro.riate for t,at cri.t! 2o.tion 3SET (A<CORR:=T F+ SET D?KERIJP ON+ SET LOG'?LOCK'CHECKS:( ON4 588.E6.lain t,e tra%e-off a D?A #a/e -,en con i%ering %ro..ing an% re-creating in%e6e u ing t,e NOLOGGING 9 LOGGING! 58;.W,at are t,e factor t,at -oul% ignificantl$ contri*ute to a ra.i% reco9er$ ti#e -,en *ac/ing u. an ARCHIKELOG %ata*a e! 2o.tion 3 0fre1uenc$ of *ac/u. + iZe of %atafile Y I)O .ee%"+0a9aila*le #e#or$+ I)O .ee% an% iZe of %atafile "+0a9aila*le #e#or$"+0nu#*er of #ulti.le6e% control file "4 58@.T,e D?A ,a Nu t fini ,e% #a/ing OS co.ie of %tafile for t,e *ac/u.. W,ic, of t,e follo-ing c,oice i%entifie ,o- t,e D?A ,oul% co#.lete t,e *ac/u.! Ta/e ta*le .ace out of *ac/u. #o%e+ *ac/u. control file to trace+ -itc, online re%o log 0OR THE REKERSE" 58A.-,ic, .ri9ile%ge ,a to *e gi9en to u er to elect %ata %ictionar$! 1lIgrant elect'catalog'role to u erG 58B.Difference *et-een TEST)DEK)=ROD oracle %ata*a e ! 58E.W,$ i t,e in tance tarte% in NO(O:NT #o%e -,en #anuall$ creating a %ata*a e! T,e rea on i + t,ere are no controlfile for t,e %ata*a e to *e in O=EN #o%e+ an% $ou cannot e9en u e (O:NT #o%e+ *ecau e at #ount #o%e+ controlfile ,a alrea%$ .ointe% to t,e location of t,e re%olog an% %atafile *ut Nu t t,at acce to t,e# i not grante% $et+ o -e tart in tance in NO(O:NT *ecau e -e %ont ,a9e control file $et *ut #e#or$ u age ,oul% *e %efine%. 5;F.T,e %ifferent -a$ of re toring a controlfile! HHHHHHHHHHHHHHHHHHHHHRe tore of t,e Control Jile Jro# a Kno-n Location R(ANI RESTORE CONTROLJILE fro# Rfilena#eRG HHHHHHHHHHHHHHHHHHHHHRe tore of t,e Control Jile to a Ne- Location RESTORE CONTROLJILE TO R)t#.)#$'controlfileRG HHHHHHHHHHHHHHHHHHHHHRe tore fro# auto*ac/u. R(ANI SET D?ID 75FF@@7ABG R(ANI R:N T SET CONTROLJILE A:TO?ACK:= JOR(AT JOR DEKICE TP=E DISK TO Rauto*ac/u.'for#atRG RESTORE CONTROLJILE JRO( A:TO?ACK:=G V R(ANI RESTORE CONTROLJILE TO R)t#.)ctl'file.ctlR JRO( A:TO?ACK:=G NOTE3 to re tore controlfile fro# auto*ac/u.+ t,e %ata*a e #u t *e in NO(O:NT #o%e an% $ou #u t fir t et t,e D?ID. After re toring controlfile fro# auto*ac/u.+ $ou #u t run RECOKER DATA?ASE an% al o .erfor# an O=EN RESETLOGS on t,e %ata*a e. 5;1.Different -a$ of re toring .file ! HHHHHHHHHHHHHHHHHHHHHRe tore t,e er9er .ara#eter file for auto*ac/u. R(ANI RESTORE S=JILE JRO( A:TO?ACK:=G R(ANI RESTORE S=JILE TO R)t#.) .fileTE(=.oraR JRO( A:TO?ACK:=G 5;5.Ste. for reco9er$! HHHHHHHHHHHHHHHHHHHHHta*le .ace -connect to t,e target %ata*a e -ta/e affecte% ta*le .ace offline 2alter %ata*a e INDS offline i##e%iate4 -run SHOW ALL to ee current configuration -re tore ta*le .ace or %atafile -it, RESTORE Y RECOKER co##an% R(ANISLL Ralter ta*le .ace u er offline i##e%iateRG R(ANIre tore ta*le .ace u er G R(ANIreco9er ta*le .ace u er G

R(ANI 1l Ralter ta*le .ace u er onlineG HHHHHHHHHHHHHHHHHHHH%ata*a e -it, current controlfile a9aila*le -R(ANI tartu. #ountG2*e t reco9er for %ata*a e)%atafile -,en in #ount #o%e4 -R(ANIre tore %ata*a eG -R(ANIreco9er %ata*a eG -R(ANIalter %ata*a e o.enG 5;7.Re tore an% Reco9er of Datafile to a Ne- Location T,e .roce%ure ,o-n ,ere i a con9enient -a$ to re tore a %atafile to a nelocation an% .erfor# #e%ia reco9er$ on it. R:N T SET NEWNA(E JOR DATAJILE 7 to Rne-'locationRG RESTORE DATAJILE 7G SWITCH DATAJILE 7G RECOKER DATAJILE 7G V 5;8.-,at i t,e %efault location of .ortli t an% =:=?LD.SLL! HHHHHHHHHH.ortli t.ini i locate% int &ORACLE'HO(E)in tall).ortli t.ini HHHHHHHHH=:=?LD. 1l i locate% in &ORACLE'HO(E) 1l.lu )a%#in)=:=?LD.SLL 5;;.Ho- to *ac/u. incre#ental -it, *loc/ c,ange trac/ing SLLI alter %ata*a e ena*le *loc/ c,ange trac/ing u ing file ),o#e)oracle)*c.oraG T,i co##an% *ring u. t,e *ac/groun% .roce C,ange Trac/ing Writer 0CTWR"+ t,at #aintain a c,ange trac/ing file. T,i file -ill contain t,e %ata*a e *loc/ a%re e of Oracle ?loc/ + #o%ifie% after t,e ne6t le9el F Jull ?ac/u.. ?ecau e of t,i file+ R(AN no longer ,a to can all .ro%ucti9e %atafile an% co#.are t,eir *loc/ -it, t,e *loc/ of t,e le9el F *ac/u. in or%er to %eter#ine -,ic, *loc/ ,a9e c,ange%. T,at -a a 9er$ ti#e con u#ing .roce *efore 1Fg. No- -e -ill in9o/e R(AN -it, t,e follo-ing co##an%3 5;@.W,at i t,e %efault .a -or% for t,e $ u er in Oracle! An 3 CHANGE'ON'INSTALL 5;A.W,at -oul% *e t,e fir t t,ing $ou -oul% %o if an en% u er co#.lain t,at .erfor#ance i .oor! 5;B.E6.lain %ifferent tartu. ! START:= NO(O:NT Start H START:= (O:NT Start t,e %ata*a e. H H START:= O=EN Start t,e in tance an% #ount t,e %ata*a e *ut %oe not o.en t,e in tance *ut %oe not #ount t,e %ata*a e.

t,e in tance an% #ount

an% o.en

t,e %ata*a e.

START:= RESTRICT Start t,e in tance+ #ount an% o.en t,e %ata*a eG ,o-e9er+ acce i re tricte% to u er -it, re tricte% e ion .ri9ilege . H *egin H START:= RECOKER Start t,e in tance *ut lea9e t,e %ata*a e clo e% an% reco9er$ for -,ate9er failure cenario occurre%.

START:= JORCE Jorce t,e in tance to ,ut%o-n a*ort an% i##e%iatel$ tartu. o.en. T,i o.tion ,oul% onl$ *e u e% for in tance ,a9ing .ro*le# eit,er tarting or to..ing. 5;E.Ho- %o $ou create a TE(=ORARP ta*le .ace u ing Oracle-(anage% Jile 0O(J" tec,ni1ue! Jir t+ connect to SLLH=lu a t,e $ te#)#anager u er. SLLI CONNECT $ te#)#anagerM c,ool AS SPSD?A Define a create file %e tination LetR fir t #a/e ure t,at t,e D?'CREATE'JILE'DEST 9alue i u*-%irector$. SLLI ALTER SPSTE( SET %*'create'file'%e tDRc3R ) Create a te#.orar$ ta*le .ace 0O(J" No-+ create a te#.orar$ ta*le .ace -it, Oracle-(anage% Jile 0O(J". : er create te#.orar$ eg#ent in a ta*le .ace -,en a %i / ort i re1uire% to u..ort t,eir u e of elect tate#ent containing t,e GRO:= ?P+ ORDER ?P+ DISTINCT+ or :NION+ or t,e CREATE INDE< tate#ent . SLLI CREATE TE(=ORARP TA?LES=ACE #$te#. 5@F.Gi9e one #et,o% for tran ferring a ta*le fro# one Le9el3Inter#e%iate E6.ecte% An -er3 T,ere are e9eral .o TA?LE... AS SELECT+ or CO=P. 5@1. W,at i etting! Le9el3 LoE6.ecte% An -er3 error . If it i it i .ecifie%+ %efault 9alue i T,e I(=ORT IGNORE o.tion tell i#.ort to ignore >alrea%$ e6i t > not .ecifie% t,e ta*le t,at alrea%$ e6i t -ill *e /i..e%. If t,e error i ignore% an% t,e ta*le %ata -ill *e in erte%. T,e N. e6.an%e% i*le #et,o% + e6.ort-i#.ort+ CREATE it! %efault c,e#a to anot,er3 et to a 9ali%

t,e .ur.o e of t,e I(=ORT o.tion IGNORE! W,at i

5@7. Pou ,a9e a roll*ac/ eg#ent in a 9er ion A.5 %ata*a e t,at ,a *e$on% o.ti#al+ ,o- can it *e re tore% to o.ti#al! Le9el3 LoE6.ecte% an -er3 : e t,e ALTER TA?LES=ACE ..... SHRINK co##an%. 5@8. If t,e DEJA:LT an% TE(=ORARP ta*le .ace clau e co##an% -,at ,a..en ! I t,i *a% or goo%! W,$! Le9el3 Lo-

are left out of a CREATE :SER

E6.ecte% an -er3 T,e u er i a igne% t,e SPSTE( ta*le .ace a a %efault an% te#.orar$ ta*le .ace. T,i i *a% *ecau e it cau e u er o*Nect an% te#.orar$ eg#ent to *e .lace% into t,e SPSTE( ta*le .ace re ulting in frag#entation an% i#.ro.er ta*le .lace#ent 0onl$ %ata %ictionar$ o*Nect an% t,e $ te# roll*ac/ eg#ent ,oul% *e in SPSTE(".

5@;. W,at are

o#e of t,e Oracle .ro9i%e% .ac/age

t,at D?A

,oul% *e a-are of!

Le9el3 Inter#e%iate to Hig, E6.ecte% an -er3 Oracle .ro9i%e a nu#*er of .ac/age in t,e for# of t,e D?(S' .ac/age o-ne% *$ t,e SPS u er. T,e .ac/age u e% *$ D?A #a$ inclu%e3 D?(S'SHARED'=OOL+ D?(S':TILITP+ D?(S'SLL+ D?(S'DDL+ D?(S'SESSION+ D?(S'O:T=:T an% D?(S'SNA=SHOT. T,e$ #a$ al o tr$ to an -er -it, t,e :TLH.SLL or CATH.SLL erie of SLL .roce%ure . T,e e can *e 9ie-e% a e6tra cre%it *ut aren!t .art of t,e an -er. 5@@. W,at ,a..en Le9el3 LoE6.ecte% an -er3 T,e Oracle $ te# -ill u e t,e %efault na#e of SPS'C6666 -,ere 6666 i a $ te# generate% nu#*er. T,i i *a% ince it #a/e trac/ing -,ic, ta*le t,e con traint *elong to or -,at t,e con traint %oe ,ar%er. 5@A. W,at ,a..en clau e! Le9el3 LoE6.ecte% an -er3 T,i re ult in t,e in%e6 t,at i auto#aticall$ generate% *eing .lace% in t,en u er %efault ta*le .ace. Since t,i -ill u uall$ *e t,e a#e ta*le .ace a t,e ta*le i *eing create% in+ t,i can cau e eriou .erfor#ance .ro*le# . 5@B. W,at i con traint! t,e .ro.er #et,o% for %i a*ling an% re-ena*ling a .ri#ar$ /e$ if a ta*le .ace clau e i left off of a .ri#ar$ /e$ con traint if t,e con traint na#e i left out of a con traint clau e!

Le9el3 Inter#e%iate E6.ecte% an -er3 Pou u e t,e ALTER TA?LE co##an% for *ot,. Ho-e9er+ for t,e ena*le clau e $ou #u t .ecif$ t,e :SING INDE< an% TA?LES=ACE clau e for .ri#ar$ /e$ . 5@E. W,at ,a..en if a .ri#ar$ /e$ con traint i full$ .ecif$ing t,e in%e6 clau e! Le9el3 Inter#e%iate E6.ecte% an -er3 T,e in%e6 i create% in t,e u er! %efault ta*le .ace an% all iZing infor#ation i lo t. Oracle %oe n!t tore t,i infor#ation a a .art of t,e con traint %efinition+ *ut onl$ a .art of t,e in%e6 %efinition+ -,en t,e con traint -a %i a*le% t,e in%e6 -a %ro..e% an% t,e infor#ation i gone. 5AF. 0On :NI<" W,en ,oul% *e u e%! Le9el3 Hig, E6.ecte% an -er3 If t,e :NI< $ te# *eing u e% i ca.a*le of a $nc,ronou IO t,en onl$ one i re1uire%+ if t,e $ te# i not ca.a*le of a $nc,ronou IO t,en u. to t-ice t,e nu#*er of %i / u e% *$ Oracle nu#*er of D? -riter ,oul% *e .ecifie% *$ u e of t,e %*'-riter initialiZation .ara#eter. 5A1. Pou are u ing ,ot *ac/u. -it,out *eing in arc,i9elog #o%e+ can $ou reco9er in ,oul% #ore t,an one D? -riter .roce *e u e%! Ho- #an$ %i a*le% an% t,en ena*le% -it,out

t,e e9ent of a failure! W,$ or -,$ not! Le9el3 Hig, E6.ecte% an -er3 Pou can!t u e ,ot *ac/u. -it,out *eing in arc,i9elog #o%e. So no+ $ou coul%n!t reco9er. 5A5. W,at cau e #itigate%! t,e > na. ,ot too ol%> error! Ho- can t,i *e .re9ente% or

Le9el3 Inter#e%iate E6.ecte% an -er3 T,i i cau e% *$ large or long running tran action t,at ,a9e eit,er -ra..e% onto t,eir o-n roll*ac/ .ace or ,a9e ,a% anot,er tran action -rite on .art of t,eir roll*ac/ .ace. T,i can *e .re9ente% or #itigate% *$ *rea/ing t,e tran action into a et of #aller tran action or increa ing t,e iZe of t,e roll*ac/ eg#ent an% t,eir e6tent . 5A7. Ho- can $ou tell if a %ata*a e o*Nect i Le9el3 LoE6.ecte% an -er3 ?$ c,ec/ing t,e tatu colu#n of t,e D?A'+ ALL' or :SER'O?QECTS 9ie- + %e.en%ing u.on -,et,er $ou o-n or onl$ ,a9e .er#i ion on t,e 9ie- or are u ing a D?A account. 5A8. A u er i getting an ORA-FFE85 error $et $ou /no- $ou ,a9e grante% t,e# .er#i ion on t,e ta*le+ -,at el e ,oul% $ou c,ec/! Le9el3 LoE6.ecte% an -er3 Pou nee% to c,ec/ t,at t,e u er ,a .ecifie% t,e full na#e of t,e o*Nect 0 elect e#.i% fro# cott.e#.G in tea% of elect e#.i% fro# e#.G" or ,a a $non$# t,at .oint to t,e o*Nect 0create $non$# e#. for cott.e#.G" 5A;. A %e9elo.er i tr$ing to create a 9ie- an% t,e %ata*a e -on!t let ,i#. He ,a t,e >DEKELO=ER> role -,ic, ,a t,e >CREATE KIEW> $ te# .ri9ilege an% SELECT grant on t,e ta*le ,e i u ing+ -,at i t,e .ro*le#! Le9el3 Inter#e%iate E6.ecte% an -er3 Pou nee% to 9erif$ t,e %e9elo.er ,a %irect grant on all ta*le u e% in t,e 9ie-. Pou can!t create a tore% o*Nect -it, grant gi9en t,roug, 9ie- . 5A@. If $ou ,a9e an e6a#.le ta*le+ -,at i .ro%uction ta*le i#.le#entation! Le9el3 Inter#e%iate E6.ecte% an -er3 T,e *e t -a$ i to anal$Ze t,e ta*le an% t,en u e t,e %ata .ro9i%e% in t,e D?A'TA?LES 9ie- to get t,e a9erage ro- lengt, an% ot,er .ertinent %ata for t,e calculation. T,e 1uic/ an% %irt$ -a$ i to loo/ at t,e nu#*er of *loc/ t,e ta*le i actuall$ u ing an% ratio t,e nu#*er of ro- in t,e ta*le to it nu#*er of *loc/ again t t,e nu#*er of e6.ecte% ro- . 5AA. Ho- can $ou fin% out ,o- #an$ u er are currentl$ logge% into t,e %ata*a e! Ho- can $ou fin% t,eir o.erating $ te# i%! t,e *e t -a$ to get iZing %ata for t,e in9ali%!

Le9el3 ,ig, E6.ecte% an -er3 T,ere are e9eral 9&.roce 9ie- . Anot,er -a$ i to 9& $ tat 9ie-. Anot,er if $ou are co##an%+ *ut t,i onl$ -or/ again 5AB. A u er elect fro# a -a$ . One i to loo/ at t,e 9& e ion or c,ec/ t,e current'login .ara#eter in t,e on :NI< i to %o a >. -ef[gre. oracle[-c -l! t a ingle in tance in tallation. *ac/ t-o 9alue + ,i elect i 3

e1uence an% get

SELECT ./' e1.ne6t9al JRO( %ualG W,at i t,e .ro*le#!

Le9el3 Inter#e%iate E6.ecte% an -er3 So#e,o- t-o 9alue ,a9e *een in erte% into t,e %ual ta*le. T,i ta*le i a ingle ro-+ ingle colu#n ta*le t,at ,oul% onl$ ,a9e one 9alue in it. 5AE. Ho- can $ou %eter#ine if an in%e6 nee% Le9el3 Inter#e%iate E6.ecte% an -er3 Run t,e ANALPXE INDE< co##an% on t,e in%e6 to 9ali%ate it tructure an% t,en calculate t,e ratio of LJ'?LK'LEN)LJ'?LK'LENS?R'?LK'LEN an% if it i n!t near 1.F 0i.e. greater t,an F.A or o" t,en t,e in%e6 ,oul% *e re*uilt. Or if t,e ratio ?R'?LK'LEN) LJ'?LK'LENS?R'?LK'LEN i 5BF. A ta*le .ace ,a Le9el3 Inter#e%iate E6.ecte% an -er3 (ulti.le e6tent in an% of t,e# el9e al o ,a9e c,aine% ro- t,i can ,urt .erfor#ance. 5B1. Ho- %o $ou Le9el3 LoE6.ecte% an -er3 Pou ,oul% al-a$ atte#.t to u e t,e Oracle Jle6i*le Arc,itecture tan%ar% or anot,er .artitioning c,e#e to en ure .ro.er e.aration of SPSTE(+ ROLL?ACK+ REDO LOG+ DATA+ TE(=ORARP an% INDE< eg#ent . 5B5. Pou fir t! Le9el3 LoE6.ecte% an -er3 En ure t,at u er TE(=ORARP or DEJA:LT ta*le .ace a 5B7. W,at are .ara#eter! o#e in%ication %on!t ,a9e t,e SPSTE( ta*le .ace a t,eir ign#ent *$ c,ec/ing t,e D?A':SERS 9ie-. ee #ulti.le frag#ent in t,e SPSTE( ta*le .ace+ -,at ,oul% $ou c,ec/ et u. ta*le .ace aren!t *a%. Ho-e9er if $ou nearing F.7. in it. I t,i *a%! W,$ or -,$ not. to *e %ro..e% an% re*uilt!

a ta*le -it, 7F e6tent

%uring an Oracle in tallation!

t,at $ou nee% to increa e t,e SHARED'=OOL'SIXE

Le9el3 Inter#e%iate

E6.ecte% an -er3 =oor %ata %ictionar$ or li*rar$ cac,e ,it ratio + getting error ORA-F8F71. Anot,er in%ication i tea%il$ %ecrea ing .erfor#ance -it, all ot,er tuning .ara#eter t,e a#e. 5B8. W,at i t,e general gui%eline for iZing %*'*loc/' iZe an% %*'#ulti'*loc/'rea% for an a..lication t,at %oe #an$ full ta*le Le9el3 Hig, E6.ecte% an -er3 Oracle al#o t al-a$ rea% .ro%uct e1ual to @8 or a #ulti.le of @8. 5B;. W,at i in @8/ c,un/ . T,e t-o ,oul% ,a9e a can !

t,e fa te t 1uer$ #et,o% for a ta*le!

Le9el3 Inter#e%iate E6.ecte% an -er3 Jetc, *$ ro-i% 5B@. E6.lain t,e u e of TK=ROJ! W,at initialiZation .ara#eter to get full TK=ROJ out.ut! Le9el3 Hig, E6.ecte% an -er3 T,e t/.rof tool i a tuning tool u e% to %eter#ine c.u an% e6ecution ti#e for SLL tate#ent . Pou u e it *$ fir t etting ti#e%' tati tic to true in t,e initialiZation file an% t,en turning on tracing for eit,er t,e entire %ata*a e 9ia t,e 1l'trace .ara#eter or for t,e e ion u ing t,e ALTER SESSION co##an%. Once t,e trace file i generate% $ou run t,e t/.rof tool again t t,e trace file an% t,en loo/ at t,e out.ut fro# t,e t/.rof tool. T,i can al o *e u e% to generate e6.lain .lan out.ut. 5BA. W,en loo/ing at 9& $ tat $ou ee t,at goo%! If *a% -Ho- %o $ou correct it! Le9el3 Inter#e%iate E6.ecte% an -er3 If $ou get e6ce i9e %i / ort t,i i *a%. T,i in%icate $ou nee% to tune t,e ort area .ara#eter in t,e initialiZation file . T,e #aNor ort are .ara#eter i t,e SORT'AREA'SIXe .ara#eter. 5BB. W,en Le9el3 ,ig, E6.ecte% an -er3 W,en $ou get e6ce i9e contention for t,e co.$ latc,e a ,o-n *$ t,e >re%o co.$> latc, ,it ratio. Pou can increa e co.$ latc,e 9ia t,e initialiZation .ara#eter LOG'SI(:LTANEO:S'CO=IES to t-ice t,e nu#*er of C=: on $our $ te#. 5BE. W,ere can $ou get a li t of all initialiZation .ara#eter for $our in tance! Ho- a*out an in%ication if t,e$ are %efault etting or ,a9e *een c,ange%! Le9el3 LoE6.ecte% an -er3 Pou can loo/ in t,e init.ora file for an in%ication of #anuall$ et .ara#eter . Jor all .ara#eter + t,eir 9alue an% -,et,er or not t,e current 9alue i t,e %efault 9alue+ loo/ in t,e 9&.ara#eter 9ie-. ,oul% $ou increa e co.$ latc,e ! W,at .ara#eter control co.$ latc,e ! ort 0%i /" i ,ig,. I t,i *a% or ,oul% *e turne% on

5EF. De cri*e ,it ratio a it .ertain to t,e %ata*a e *uffer . W,at i t,e %ifference *et-een in tantaneou an% cu#ulati9e ,it ratio an% -,ic, ,oul% *e u e% for tuning! Le9el3 Inter#e%iate E6.ecte% an -er3 T,e ,it ratio i a #ea ure of ,o- #an$ ti#e t,e %ata*a e -a a*le to rea% a 9alue fro# t,e *uffer 9er e ,o- #an$ ti#e it ,a% to re-rea% a %ata 9alue fro# t,e %i / . A 9alue greater t,an BF-EFW i goo%+ le coul% in%icate .ro*le# . If $ou i#.l$ ta/e t,e ratio of e6i ting .ara#eter t,i -ill *e a cu#ulati9e 9alue ince t,e %ata*a e tarte%. If $ou %o a co#.ari on *et-een .air of rea%ing *a e% on o#e ar*itrar$ ti#e .an+ t,i i t,e in tantaneou ratio for t,at ti#e .an. Generall$ .ea/ing an in tantaneou rea%ing gi9e #ore 9alua*le %ata ince it -ill tell $ou -,at $our in tance i %oing for t,e ti#e it -a generate% o9er. 5E1. Di cu correct it! Le9el3 ,ig, E6.ecte% an -er3 Ro- c,aining occur -,en a KARCHAR5 9alue i u.%ate% an% t,e lengt, of t,e ne- 9alue i longer t,an t,e ol% 9alue an% -on!t fit in t,e re#aining *loc/ .ace. T,i re ult in t,e ro- c,aining to anot,er *loc/. It can *e re%uce% *$ etting t,e torage .ara#eter on t,e ta*le to a..ro.riate 9alue . It can *e correcte% *$ e6.ort an% i#.ort of t,e effecte% ta*le. 5E5. W,en loo/ing at t,e e tat e9ent re.ort $ou ee t,at $ou are getting *u $ *uffer -ait . I t,i *a%! Ho- can $ou fin% -,at i cau ing it! Le9el3 ,ig, E6.ecte% an -er3 ?uffer *u $ -ait coul% in%icate contention in re%o+ roll*ac/ or %ata *loc/ . Pou nee% to c,ec/ t,e 9&-ait tat 9ie- to ee -,at area are cau ing t,e .ro*le#. T,e 9alue of t,e >count> colu#n tell -,ere t,e .ro*le# i + t,e >cla > colu#n tell $ou -it, -,at. :NDO i roll*ac/ eg#ent + DATA i %ata *a e *uffer . 5E7. If $ou ee contention for li*rar$ cac,e ,o- can $ou fi6 it! ro- c,aining+ ,o- %oe it ,a..en! Ho- can $ou re%uce it! Ho- %o $ou

Le9el3 Inter#e%iate E6.ecte% an -er3 Increa e t,e 5E8. If $ou a*out! ee tati tic iZe of t,e ,are% .ool.

t,at %eal -it, >un%o> -,at are t,e$ reall$ tal/ing

Le9el3 Inter#e%iate E6.ecte% an -er3 Roll*ac/ eg#ent an% a ociate% tructure . cau e 0in

5E;. If a ta*le .ace ,a a %efault .ctincrea e of Zero -,at -ill t,i relation ,i. to t,e #on .roce "! Le9el3 Hig, E6.ecte% an -er3 T,e S(ON .roce frag#ent . 5E@. If a ta*le .ace ,oe6ce -on!t auto#aticall$ coale ce it i9e frag#entation -,at are

free

.ace to

o#e #et,o%

%efrag#ent t,e ta*le .ace! 0A.1+A.5 an% A.7 onl$" Le9el3 Hig, E6.ecte% an -er3 In Oracle A.F to A.5 T,e u e of t,e Ralter e ion et e9ent Ri##e%iate trace na#e coale ce le9el t CRG! co##an% i t,e ea ie t -a$ to %efrag#ent contiguou free .ace frag#entation. T,e t C .ara#eter corre .on% to t,e t C 9alue foun% in t,e t & SPS ta*le. In 9er ion A.7 t,e !alter ta*le .ace coale ceG! i *e t. If t,e free .ace i n!t contiguou t,en e6.ort+ %ro. an% i#.ort of t,e ta*le .ace content #a$ *e t,e onl$ -a$ to reclai# non-contiguou free .ace. 5EA. Ho- can $ou tell if a ta*le .ace ,a Le9el3 Inter#e%iate If a elect again t t,e %*a'free' .ace ta*le ,o- t,at t,e count of a ta*le .ace e6tent i greater t,an t,e count of it %ata file + t,en it i frag#ente%. 5EB. Pou re%o log re%o log ee t,e follo-ing on a .ace re1ue t 57 tatu re.ort3 e6ce i9e frag#entation!

.ace -ait ti#e F .ace -ait ti#e i ,ig,! Ho-

I t,i o#et,ing to -orr$ a*out! W,at if re%o log can $ou fi6 t,i ! Le9el3 Inter#e%iate

E6.ecte% an -er3 Since t,e -ait ti#e i Zero+ no. If t,e -ait ti#e -a #ig,t in%icate a nee% for #ore or larger re%o log . 5EE. W,at can cau e a ,ig, 9alue for recur i9e call ! Ho- can t,i Le9el3 Hig,

,ig, it

*e fi6e%!

E6.ecte% an -er3 A ,ig, 9alue for recur i9e call i cau e *$ i#.ro.er cur or u age+ e6ce i9e %$na#ic .ace #anage#ent action + an% or e6ce i9e tate#ent re.ar e . Pou nee% to %eter#ine t,e cau e an% correct it ?$ eit,er relin/ing a..lication to ,ol% cur or + u e .ro.er .ace #anage#ent tec,ni1ue 0.ro.er torage an% iZing" or en ure re.eat 1uerie are .lace% in .ac/age for .ro.er reu e. 7FF. If $ou ee a .in ,it ratio of le t,an F.B in t,e e tat li*rar$ cac,e re.ort i t,i a .ro*le#! If o+ ,o- %o $ou fi6 it! Le9el3 Inter#e%iate E6.ecte% an -er3 T,i ,are% .ool iZe. in%icate t,at t,e i ,are% .ool #a$ *e too #all. Increa e t,e

7F1. If $ou ee t,e 9alue for reloa% t,i a #atter for concern! Le9el3 Inter#e%iate E6.ecte% an -er3 Pe + $ou ,oul%

,ig, in t,e e tat li*rar$ cac,e re.ort i

tri9e for Zero reloa%

if .o

i*le. If $ou

ee

e6ce

i9e reloa%

t,en increa e t,e

iZe of t,e

,are% .ool.

7F5. Pou loo/ at t,e %*a'roll*ac/' eg of ,rin/ an% t,e$ are of relati9el$ fi6e% if it i a .ro*le#! Le9el3 Hig,

9ie- an% ee t,at t,ere i a large nu#*er #all iZe+ i t,i a .ro*le#! Ho- can it *e

E6.ecte% an -er3 A large nu#*er of #all ,rin/ in%icate a nee% to increa e t,e iZe of t,e roll*ac/ eg#ent e6tent . I%eall$ $ou ,oul% ,a9e no ,rin/ or a #all nu#*er of large ,rin/ . To fi6 t,i Nu t increa e t,e iZe of t,e e6tent an% a%Nu t o.ti#al accor%ingl$. 7F7. Pou loo/ at t,e %*a'roll*ac/' eg of -ra. i t,i a .ro*le#! Le9el3 Hig, E6.ecte% an -er3 A large nu#*er of -ra. in%icate t,at $our e6tent iZe for $our roll*ac/ eg#ent are .ro*a*l$ too #all. Increa e t,e iZe of $our e6tent to re%uce t,e nu#*er of -ra. . Pou can loo/ at t,e a9erage tran action iZe in t,e a#e 9ie- to get t,e infor#ation on tran action iZe. 7F8. In a $ te# -it, an a9erage of 8F concurrent u er a 1uer$ on roll*ac/ e6tent 3 ROLL?ACK C:R E<TENTS --------------------- -------------------------RF1 11 RF5 B RF7 15 RF8 E SPSTE( 8 Pou ,a9e roo# for eac, to gro- *$ 5F #ore e6tent $ou ta/e an$ action! Le9el3 Inter#e%iate E6.ecte% an -er3 No t,ere i not a .ro*le#. Pou ,a9e 8F e6tent ,o-ing an% an a9erage of 8F concurrent u er . Since t,ere i .lent$ of roo# to gro- no action i nee%e%. 7F;. Pou ee #ulti.le e6tent in t,e te#.orar$ ta*le .ace. I t,i a .ro*le#! eac,. I t,ere a .ro*le#! S,oul% $ou get t,e follo-ing fro# 9ie- an% ee t,at $ou ,a9e a large nu#*er

Le9el3 Inter#e%iate E6.ecte% an -er3 A long a t,e$ are all t,e a#e iZe t,i i n!t a .ro*le#. In fact+ it can e9en i#.ro9e .erfor#ance ince Oracle -on!t ,a9e to create a nee6tent -,en a u er nee% one. 7F@. Define OJA.

Le9el3 LoE6.ecte% an -er3 OJA tan% for O.ti#al Jle6i*le Arc,itecture. It i a #et,o% of .lacing %irectorie an% file in an Oracle $ te# o t,at $ou get t,e #a6i#u# fle6i*ilit$ for future tuning an% file .lace#ent. 7FA. Ho- %o $ou Le9el3 LoE6.ecte% an -er3 T,e an -er ,ere ,oul% ,o- an un%er tan%ing of e.aration of re%o an% roll*ac/+ %ata an% in%e6e an% i olation o SPSTE( ta*le fro# ot,er ta*le . An e6a#.le -oul% *e to .ecif$ t,at at lea t A %i / ,oul% *e u e% for an Oracle in tallation o t,at $ou can .lace SPSTE( ta*le .ace on one+ re%o log on t-o 0#irrore% re%o log " t,e TE(=ORARP ta*le .ace on anot,er+ ROLL?ACK ta*le .ace on anot,er an% till ,a9e t-o for DATA an% INDE<ES. T,e$ ,oul% in%icate ,o- t,e$ -ill ,an%le arc,i9e log an% e6.ort a -ell. A long a t,e$ ,a9e a logical .lan for co#*ining or furt,er e.aration #ore or le %i / can *e .ecifie%. 7FB. W,at Le9el3 LoE6.ecte% An -er3 a%Nu t /ernel .ara#eter or OS tuning .ara#eter in accor%ance -it, in tallation gui%e. ?e ure enoug, contiguou %i / .ace i a9aila*le. 7FE. Pou ,a9e in talle% Oracle an% $ou are no- etting u. t,e actual in tance. Pou ,a9e *een -aiting an ,our for t,e initialiZation cri.t to fini ,+ -,at ,oul% $ou c,ec/ fir t to %eter#ine if t,ere i a .ro*le#! Le9el3 Inter#e%iate to ,ig, E6.ecte% An -er3 C,ec/ to #a/e ure t,at t,e arc,i9er i n!t tuc/. If arc,i9e logging i turne% on %uring in tall a large nu#*er of log -ill *e create%. T,i can fill u. $our arc,i9e log %e tination cau ing Oracle to to. to -ait for #ore .ace. 71F. W,en configuring SLLNET on t,e Le9el3 Inter#e%iate E6.ecte% an -er3 INITIALIXATION file+ TNSNA(ES.ORA file+ SLLNET.ORA file 711. W,en configuring SLLNET on t,e client -,at file Le9el3 Inter#e%iate E6.ecte% an -er3 SLLNET.ORA+ TNSNA(ES.ORA 715. W,at #u t *e in talle% -it, OD?C on t,e client in or%er for it to -or/ -it, Oracle! Le9el3 Inter#e%iate E6.ecte% an -er3 SLLNET an% =ROTOCOL 0for e6a#.le3 TC=I= a%a.ter" la$er tran .ort .rogra# . of t,e nee% to *e et u.! er9er -,at file #u t *e et u.! ,oul% *e %one .rior to in talling Oracle 0for t,e OS an% t,e %i / "! et u. $our ta*le .ace on in tallation!

717. Pou ,a9e Nu t tarte% a ne- in tance -it, a large SGA on a *u $ e6i ting er9er. =erfor#ance i terri*le+ -,at ,oul% $ou c,ec/ for! Le9el3 Inter#e%iate E6.ecte% an -er3 T,e fir t t,ing to c,ec/ -it, a large SGA i -a..e% out. 718. W,at OS u er :NI<"! Le9el3 loE6.ecte% an -er3 Pou #u t u e root fir t. 71;. W,en a i ! Le9el3 LoE6.ecte% an -er3 Ne9er 71@. Ho- #an$ control file Le9el3 LoE6.ecte% an -er3 At lea t 5 on e.arate %i / e.arate %i / + not Nu t file $ te# . .in%le . ?e ure t,e$ a$ on ,oul% $ou ,a9e! W,ere ,oul% t,e$ *e locate%! ,oul% t,e %efault 9alue for Oracle initialiZation .ara#eter *e u e% t,at it i n!t *eing

,oul% *e u e% for t,e fir t .art of an Oracle in tallation 0on

71A. Ho- #an$ re%o log ,oul% $ou ,a9e an% ,o#a6i#u# reco9era*ilit$! Le9el3 Inter#e%iate

,oul% t,e$ *e configure% for

E6.ecte% an -er3 Pou ,oul% ,a9e at lea t t,ree grou. of t-o re%o log -it, t,e t-o log eac, on a e.arate %i / .in%le 0#irrore% *$ Oracle". T,e re%o log ,oul% not *e on ra- %e9ice on :NI< if it can *e a9oi%e%. 71B. Pou ,a9e a i#.le a..lication -it, no >,ot> ta*le acce re1uire#ent ". Ho- #an$ %i / ,oul% $ou ,a9e a SPSTE(+ :SER+ TE(= an% ROLL?ACK ta*le .ace ! E6.ecte% an -er3 At lea t A+ 0i.e. unifor# IO an% u#ing tan%ar% la$out for

ee %i / configuration an -er a*o9e.

71E. De cri*e t,ir% nor#al for#! Le9el3 LoE6.ecte% an -er3 So#et,ing li/e3 In t,ir% nor#al for# all attri*ute are relate% to t,e .ri#ar$ /e$ an% onl$ to t,e .ri#ar$ /e$ in an entit$

75F. I t,e follo-ing tate#ent true or fal e3 >All relational %ata*a e #u t *e in t,ir% nor#al for#>+ W,$ or -,$ not! Le9el3 Inter#e%iate E6.ecte% an -er3 Jal e. W,ile 7NJ i goo% for logical %e ign #o t %ata*a e + if t,e$ ,a9e #ore t,an Nu t a fe- ta*le + -ill not .erfor# -ell u ing full 7NJ. : uall$ o#e entitie -ill *e %enor#aliZe% in t,e logical to .,$ ical tran fer .roce .

751. W,at i Le9el3 Lo-

an ERD!

E6.ecte% an -er3 An ERD i entitie an% relation ,i.

an Entit$-Relation ,i.-Diagra#. It i for a %ata*a e logical #o%el.

u e% to

,o- t,e

755. W,$ are recur i9e relation ,i. Le9el3 Inter#e%iate

*a%! Ho- %o $ou re ol9e t,e#!

A recur i9e relation ,i. 0one -,ere a ta*le relate to it elf" i *a% -,en it i a ,ar% relation ,i. 0i.e. neit,er i%e i a >#a$> *ot, are >#u t>" a t,i can re ult in it not *eing .o i*le to .ut in a to. or .er,a. a *otto# of t,e ta*le 0for e6a#.le in t,e E(=LOPEE ta*le $ou coul%n!t .ut in t,e =RESIDENT of t,e co#.an$ *ecau e ,e ,a no *o + or t,e Nunior Nanitor *ecau e ,e ,a no u*or%inate ". T,e e t$.e of relation ,i. are u uall$ re ol9e% *$ a%%ing a #all inter ection entit$. 757. W,at %oe a ,ar% one-to-one relation ,i. #ean 0one -,ere t,e relation ,i. on *ot, en% i >#u t>"! Le9el3 Lo- to inter#e%iate E6.ecte% an -er3 T,i entit$. 758. Ho#ean t,e t-o entitie ,oul% .ro*a*l$ *e #a%e into one

,oul% a #an$-to-#an$ relation ,i. *e ,an%le%!

Le9el3 Inter#e%iate E6.ecte% an -er3 ?$ a%%ing an inter ection entit$ ta*le 75;. W,at i an artificial 0%eri9e%" .ri#ar$ /e$! W,en %eri9e%" .ri#ar$ /e$ *e u e%! Le9el3 Inter#e%iate ,oul% an artificial 0or u e% -,en a

E6.ecte% an -er3 A %eri9e% /e$ co#e fro# a e1uence. : uall$ it i concatenate% /e$ *eco#e too cu#*er o#e to u e a a foreign /e$. 75@. W,en ,oul% $ou con i%er %enor#aliZation!

Le9el3 Inter#e%iate E6.ecte% an -er3 W,ene9er .erfor#ance anal$ i %o o -it,out co#.ro#i ing %ata integrit$. :NI< Inter9ie- Lue tion 75A. Ho- can $ou %eter#ine t,e Le9el3 LoE6.ecte% an -er3 T,ere are e9eral co##an% to %o t,i 3 %u+ %f+ or *%f logge% in to t,e :NI< .ace left in a file $ te#! in%icate it -oul% *e *eneficial to

75B. Ho- can $ou %eter#ine t,e nu#*er of SLLNET u er $ te#!

Le9el3 Inter#e%iate E6.ecte% an -er3 SLLNET u er -ill ,o- u. -it, a .roce uni1ue na#e t,at *egin -it, oracle+ if $ou %o a . -ef[gre. oracle[-c -l $ou can get a count of t,e nu#*er of u er . 75E. W,at co##an% i Le9el3 LoE6.ecte% an -er3 cat+ #ore+ .g 77F. W,at co##an% i Le9el3 LoE6.ecte% an -er3 r# 771. Can $ou re#o9e an o.en file un%er :NI<! Le9el3 LoE6.ecte% an -er3 $e 775. Ho- %o $ou create a %eci ion tree in a Le9el3 inter#e%iate E6.ecte% an -er3 %e.en%ing on tructure 777. W,at i Le9el3 LoE6.ecte% an -er3 gre. i a tring fro# t,e .ecifie% file or file earc, co##an% t,at .ar e t,e .ecifie% tring ,ell+ u uall$ a ca e-e ac or an if-en%if or fi ,ell cri.t! u e% to re#o9e a file! u e% to t$.e file to t,e creen!

t,e .ur.o e of t,e gre. co##an%!

778. T,e $ te# ,a a .rogra# t,at al-a$ inclu%e t,e -or% noco#. in it na#e+ ,o- can $ou %eter#ine t,e nu#*er of .roce e t,at are u ing t,i .rogra#! Le9el3 inter#e%iate E6.ecte% an -er3 . 77;. W,at i -ef[gre. Hnoco#.H[-c -l

an ino%e!

Le9el3 Inter#e%iate E6.ecte% an -er3 an ino%e i a file tatu in%icator. It i tore% in *ot, %i / an% #e#or$ an% tract file tatu . T,ere i one ino%e for eac, file on t,e $ te#. 77@. T,e $ te# a%#ini trator tell $ou t,at t,e #ont, + ,oul% ,e *e .rou% of t,i ! Le9el3 Hig, E6.ecte% an -er3 (a$*e. So#e :NI< $ te# %on!t clean u. -ell after t,e# el9e . $ te# ,a n!t *een re*oote% in @

Ino%e .ro*le# an% %ea% u er .roce e can accu#ulate cau ing .o i*le .erfor#ance an% corru.tion .ro*le# . (o t :NI< $ te# ,oul% ,a9e a c,e%ule% .erio%ic re*oot o file $ te# can *e c,ec/e% an% cleane% an% %ea% or Zo#*ie .roce e cleare% out. 77A. W,at i re%irection an% ,o- i it u e%!

Le9el3 Inter#e%iate E6.ecte% an -er3 re%irection i t,e .roce *$ -,ic, in.ut or out.ut to or fro# a .roce i re%irecte% to anot,er .roce . T,i can *e %one u ing t,e .i.e $#*ol >[>+ t,e greater t,an $#*ol >I> or t,e >tee> co##an%. T,i i one of t,e trengt, of :NI< allo-ing t,e out.ut fro# one co##an% to *e re%irecte% %irectl$ into t,e in.ut of anot,er co##an%. 77B. Ho- can $ou fin% %ea% .roce Le9el3 Inter#e%iate E6.ecte% an -er3 . -ef[gre. Zo#*ie -- or -- -,o -% %e.en%ing on t,e e on $our $ te#! $ te#. e !

77E. Ho- can $ou fin% all t,e .roce Le9el3 LoE6.ecte% an -er3 : e t,e . co##an%

78F. Ho- can $ou fin% $our i% on a Le9el3 Lo-

$ te#!

E6.ecte% an -er3 : e t,e >-,o a# i> co##an%. 781. W,at i Le9el3 LoE6.ecte% an -er3 T,e finger co##an% u e infor#ation on $ te# u er . 785. W,at i Le9el3 LoE6.ecte% an -er3 : e t,e touc, co##an% 787. W,at %oe II %o! %ata in t,e .a -% file to gi9e t,e finger co##an%!

t,e ea ie t #et,o% to create a file on :NI<!

Le9el3 Inter#e%iate E6.ecte% an -er3 T,e >II> re%irection $#*ol a..en% t,e out.ut fro# t,e co##an% .ecifie% into t,e file .ecifie%. T,e file #u t alrea%$ ,a9e *een create%. 788. If $ou aren!t ure -,at co##an% %oe *e t -a$ to %eter#ine t,e co##an%! a .articular :NI< function -,at i t,e

E6.ecte% an -er3 T,e :NI< #an -/ co##an% -ill earc, t,e #an .age for t,e 9alue .ecifie%. Re9ie- t,e re ult fro# t,e co##an% to fin% t,e co##an% of intere t.

Oracle Trou*le ,ooting Inter9ie- Lue tion 78;. Ho- can $ou %eter#ine if an Oracle in tance i le9el! Le9el3 LoE6.ecte% an -er3 T,ere are e9eral *a e Oracle .roce e t,at -ill *e running on #ulti-u er o.erating $ te# + t,e e -ill *e #on+ .#on+ %*-r an% lg-r. An$ an -er t,at ,a t,e# u ing t,eir o.erating $ te# .roce ,o-ing feature to c,ec/ for t,e e i acce.ta*le. Jor e6a#.le+ on :NI< a . -ef[gre. %*-r -ill ,o- -,at in tance are u.. 78@. : er Le9el3 LoORA-F@1183 0Cnct err+ canRt get err t6t. See Ser9r ( g W,at coul% t,e .ro*le# *e! E6.ecte% an -er3 T,e in tance na#e i tring. 78A. : er Le9el3 LoERROR3 ORA-F1F783 ORACLE not a9aila*le ORA-FA71B3 # get3 o.en error -,en o.ening uc, file or %irector$ ga%ef.%*f file. fro# t,e =C client .ro*a*l$ incorrect in t,eir connection tac/3 Y Co%e (anual" fro# t,e =C client are getting #e age in%icating 3 u. fro# t,e o.erating $ te#

are getting t,e follo-ing error

H=-:< Error3 53 No W,at i

t,e .ro*a*le cau e! ,ut%o-n t,at t,e$ are tr$ing to acce i running for SLLNET K1! Ho+

E6.ecte% an -er3 T,e Oracle in tance i re tart t,e in tance.

78B. Ho- can $ou %eter#ine if t,e SLLNET .roce a*out K5! Le9el3 Lo-

E6.ecte% an -er3 Jor SLLNET K1 c,ec/ for t,e e6i tence of t,e ora r9 .roce . Pou can u e t,e co##an% >tc.ctl tatu > to get a full tatu of t,e K1 TC=I= er9er+ ot,er .rotocol ,a9e i#ilar co##an% for#at . Jor SLLNET K5 c,ec/ for t,e .re ence of t,e LISTENER .roce 0 " or $ou can i ue t,e co##an% >l nrctl tatu >. 78E. W,at file -ill gi9e $ou Oracle in tance locate%! Le9el3 LoE6.ecte% an -er3 T,e alert.ora log. It i locate% in t,e %irector$ t,e *ac/groun%'%u#.'%e t .ara#eter in t,e 9&.ara#eter ta*le. .ecifie% *$ tatu infor#ation! W,ere i it

7;F. : er

aren!t *eing allo-e% on t,e

$ te#. T,e follo-ing #e

age i

recei9e%3

Le9el3 Inter#e%iate ORA-FF5;A arc,i9er i W,at i t,e .ro*le#! tuc/. Connect internal onl$+ until free%

E6.ecte% an -er3 T,e arc,i9e %e tination i .ro*a*l$ full+ *ac/u. t,e arc,i9e log an% re#o9e t,e# an% t,e arc,i9er -ill re- tart. 7;1. W,ere -oul% $ou loo/ to fin% out if a re%o log -a u ing Oracle #irrore% re%o log ! Le9el3 Inter#e%iate E6.ecte% an -er3 T,ere i no #e age t,at co#e to t,e SLLD?A or SRK(GR .rogra# %uring tartu. in t,i ituation+ $ou #u t c,ec/ t,e alert.log file for t,i infor#ation. 7;5. Pou atte#.t to a%% a %atafile an% get3 Le9el3 Inter#e%iate ORA-F111B3 cannot a%% an$#ore %atafile 3 li#it of 8F e6cee%e% W,at i t,e .ro*le# an% ,o- can $ou fi6 it! corru.te% a u#ing $ou are

E6.ecte% an -er3 W,en t,e %ata*a e -a create% t,e %*'file .ara#eter in t,e initialiZation file -a et to 8F. Pou can ,ut%o-n an% re et t,i to a ,ig,er 9alue+ u. to t,e 9alue of (A<'DATAJILES a .ecifie% at %ata*a e creation. If t,e (A<'DATAJILES i et to lo-+ $ou -ill ,a9e to re*uil% t,e control file to increa e it *efore .rocee%ing. 7;7. Pou loo/ at $our frag#entation re.ort an% ee t,at #on ,a n!t coale ce% an$ of $ou ta*le .ace + e9en t,oug, $ou /no- e9eral ,a9e large c,un/ of contiguou free e6tent . W,at i t,e .ro*le#! Le9el3 Hig, E6.ecte% an -er3 C,ec/ t,e %*a'ta*le .ace t,e ta*le .ace . If .ct'increa e i Zero+ 7;8. Pour u er get t,e follo-ing error3 9ie- for t,e 9alue of .ct'increa e for #on -ill not coale ce t,eir free .ace.

Le9el3 Inter#e%iate ORA-FFF;; #a6i#u# nu#*er of D(L loc/ W,at i e6cee%e%

t,e .ro*le# an% ,o- %o $ou fi6 it!

E6.ecte% an -er3 T,e nu#*er of D(L Loc/ i et *$ t,e initialiZation .ara#eter D(L'LOCKS. If t,i 9alue i et to lo- 0-,ic, it i *$ %efault" $ou -ill get t,i error. Increa e t,e 9alue of D(L'LOCKS. If $ou are ure t,at t,i i Nu t a te#.orar$ .ro*le#+ $ou can ,a9e t,e# -ait an% t,en tr$ again later an% t,e error ,oul% clear. 7;;. Pou get a call fro# $ou *ac/u. D?A -,ile $ou are on 9acation. He ,a

corru.te% all of t,e control file -,ile .la$ing -it, t,e ALTER DATA?ASE ?ACK:= CONTROLJILE co##an%. W,at %o $ou %o! Le9el3 Hig, E6.ecte% an -er3 A long a all %atafile are afe an% ,e -a ?ACK:= controlfile co##an% $ou can %o t,e follo-ing3 CONNECT INTERNAL START:= (O:NT 0Ta/e an$ rea%-onl$ ta*le .ace DATAJILE .... OJJLINEG" offline *efore ne6t te. ALTER DATA?ASE ucce ful -it, t,e

RECOKER DATA?ASE :SING ?ACK:= CONTROLJILE ALTER DATA?ASE O=EN RESETLOGSG 0*ring rea%-onl$ ta*le .ace S,ut%o-n an% *ac/u. t,e *ac/ online"

$ te#+ t,en re tart

If t,e$ ,a9e a recent out.ut file fro# t,e ALTER DATA?ASE ?ACK:= CONTROL JILE TO TRACEG co##an%+ t,e$ can u e t,at to reco9er a -ell. If no *ac/u. of t,e control file i CONNECT INTERNAL START:= NO(O:NT CREATE CONTROL JILE .....G Ho-e9er+ t,e$ -ill nee% to /no- all of t,e %atafile + logfile + an% etting for (A<LOGJILES+ (A<LOG(E(?ERS+ (A<LOGHISTORP+ (A<DATAJILES for t,e %ata*a e to u e t,e co##an% 5@1.Ho- %o i /no- -,en t,e %ata*a e -a u.! SLLI SELECT in tance'na#e+ 9er ion+ to'c,ar0 tartu.'ti#e+RDD-(ON-PPPP HH583(I3SSR" >D? Startu. Ti#e> JRO( 9&in tanceG 5@5.Ho- %o i /no- -,en t,e %ata*a e -a create%! SLLI elect na#e+create%+log'#o%e fro# 9&%ata*a eG 5@7.W,at ,a..en if arc,i9elog'%e t i full! If t,e arc,i9e log file $ te# i full+ $our %ata*a e -ill ,ang 0ora-FF5;A" an% no one can login t,e %ata*a e until $ou #o9e t,e arc,i9e log to o#e ot,er file $ te# . 5@8.Ho- %o i /no- if an oracle account ,a *een loc/e% an% ,o- to unloc/ it! SLLI elect u erna#e+ loc/'%ate fro# %*a'u er -,ere loc/'%ate i not nullG SLLIalter u er cott account unloc/G 2Pou can unloc/ t,e account -it, t,e a*o9e co##an%4 5@;.Ho- %o i /no- all t,e %ata*a e u er na#e ! SLLI elect u erna#e fro# %*a'u er or%er *$ u erna#eG 5@A.Ho- to fin% out -,at o*Nect are in a .articular ta*le .ace! SLLI elect eg#ent'na#e+ eg#ent't$.e+ *$te )01F58" /* fro# %*a' eg#ent -,ere ta*le .ace'na#e D RE<A(=LERG 5@B.Ho- to fin% out -,at ta*le .ace t,e o*Nect i *elong to! SLLI elect eg#ent'na#e+ ta*le .ace'na#e+ *$te )01F58" /* fro# %*a' eg#ent -,ere eg#ent'na#e D RSALESRG a9aila*le t,en t,e follo-ing -ill *e re1uire%3

5@E.Ho- %o i /no- if #$ %atafile i autoe6ten% 0PES)NO"! SLLI elect file'na#e+ autoe6ten i*le+ #a6*$te )01F58H1F58H1F58" (A<'G? fro# %*a'%ata'file G 5AF.Ho- to increa e ga'#a6' iZe! SLLIalter $ te# et ga'#a6' iZeD17F# co.eD .fileG SLLIcreate .file fro# .fileG 5A1.Ho- %o i /no- if #$ %ata*a e i u ing a =JILE or S=JILE! ,o- .ara#eter .file 0if N:LL+ t,en $our %* -a tarte% u. u ing .file initSID.ora" 5A5. 5A7. 5A8. 5A;. 5A@. 5AA. 5AB. 5AE. 5BF. 5B1. 5B5. 5B7. 5B8. 5B;. 5B@. 5BA. 5BB. 5BE. 5EF. 5E1. 5E5. 5E7. 5E8. 5E;. 5E@. 5EA. 5EB. 5EE. 7FF.

You might also like