interview point

Upload: raaji

Post on 05-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/16/2019 Interview Point

    1/204

    1. What DBA activities did you to do today?

    Wow, this is a loaded question and almost begs for you to answer it with "What DBA activities do

    you !# to do on a daily basis?." And that is how ! would answer this question. Again, do not getcaught u$ in the "ty$ical" day%to%day o$erational issues of database administration. &ure, you can tal' about the inde( you rebuilt, the monitoring of system and session waits that were occurring, or thes$ace you added to a data file, these are all good and great and you should convey that youunderstand the day%to%day o$erational issues. What you should also throw into this answer are themeetings that you attend to $rovide direction in the database arena, the $eo$le that you meet and tal'with daily to answer adhoc questions about database use, the modeling of business needs within thedatabase, and the e(tra time you s$end early in the morning or late at night to get the )ob done. *ust because the question sti$ulates "today" do not ta'e "today" to mean "today." +a'e sure you wra$ u$ afew good days into "today" and tal' about them. his question also begs you to as' the question of"What ty$ical DBA activities are $erformed day to day within - or$oration?"

    /. What is your ty$ical day li'e?

    !f you s$end enough time on question 1, this question will never be as'ed. !t is really a continuationof question 1 to try and get you to o$en u$ and tal' about the ty$e of things you li'e to do. 0ersonally,! would continue with the theme of question 1 if you are cut short or this question is as'ed later in theinterview $rocess. *ust note that this question is not all geared toward the day%to%day o$erationalissues you e($erience as a DBA. his question also gives you the o$$ortunity to see if they want to'now about you as an individual. &ince the question did not sti$ulate "on the )ob" ! would throw in afew items li'e, ! get u$ at 233am to get into wor' and get some quiet time to read u$ on new trendsor you hel$ coach your son4daughter5s soccer team. *ust test the waters to what is acce$table. !f the

    interviewer starts to $ull you bac' to ")ob" related issues, do not go to $ersonal. Also, if you go to theoffice of the interviewer $lease notice the surroundings, if there are $ictures of his4her family, it is $robably a good idea to venture down the $ersonal $ath. !f there is a fly%fishing $icture on the wall,do not say you li'e dee$%sea fishing. 6ou get the $icture.

    7. What other $arts of your organi8ation do you interact with and how?

    Again, if you have e(hausted question 1 and / you may never get to this question. But if you have been a$$rehensive to o$ening u$ and e($laining yourself, ta'e note that you may have an issue andthe interviewer might also be already getting tired of the interview $rocess. !f you get to this questionconsider yourself in trouble. 6ou really need to forget all your hang%u$s and start e($laining what it is

    that you li'e to do as a DBA, and why you want to wor' for this $articular com$any. 6ou are going tohave to reel this interviewer bac' into the interview $rocess or you might not get to the true technicalquestion $art of the interview.

    9. Do you consider yourself a develo$ment DBA or a $roduction DBA and why?

    ! ta'e this as a tric' question and e($lain it that way. :ever in my database carrier have !distinguished between "develo$ment" and "$roduction." *ust as' your develo$ment staff or ;0 of

    Page 1 of 204

  • 8/16/2019 Interview Point

    2/204

    engineering how much time and money is lost if develo$ment systems are down. #($lain to theinterviewer that both systems are equally im$ortant to the o$eration of the com$any and both should be considered as $roduction systems because there are $eo$le relying on them and money is lost if

    either one of them is down. ! environment and $refers the command line to e(ecute commands and

    accom$lish tas's. A nuts%n%bolts DBA li'e to feel in control of the database and only feelscomfortable at the command line and vi as an editor. he tools%n%$ro$s DBA is mostly the o$$osite of a nuts%n%bolts DBA, they li'e the feel of a >!, the ease at which things can be accom$lished without'nowing much about the database. hey want to get the )ob done with the least amount ofintervention from having to figure out what everything is doing behind the scenes. :ow the answer, !would e($lain myself as a combination of the two. !, having been in this business for over /3 years,have grown u$ in a command line era where the >!s never seemed to wor'. here was highcom$le(ity in systems and not much good documentation on how things wor'ed. hus, ! had to learneverything about most as$ects of the database environment ! was wor'ing in and thus became a nuts%n%bolts DBA. ! was a true command line and vi bigot. imes have changed and the >!s are veryreliable, understand the environment they are installed on, and can generally get the )ob done quic'er

    for individuals new to database administration. ! too am slowly sli$$ing over to the dar' side of >!administration. !f you find yourself as a tools%n%$ro$s DBA, try to convey that you are aware of sometas's that require you to be a nuts%n%bolts DBA.

    1. #($lain the difference between a hot bac'u$ and a cold bac'u$ and the benefits associated witheach.

    A hot bac'u$ is basically ta'ing a bac'u$ of the database while it is still u$ and running and it must be in archive log mode. A cold bac'u$ is ta'ing a bac'u$ of the database while it is shut down anddoes not require being in archive log mode. he benefit of ta'ing a hot bac'u$ is that the database isstill available for use while the bac'u$ is occurring and you can recover the database to any $oint in

    time. he benefit of ta'ing a cold bac'u$ is that it is ty$ically easier to administer the bac'u$ andrecovery $rocess. !n addition, since you are ta'ing cold bac'u$s the database does not require beingin archive log mode and thus there will be a slight $erformance gain as the database is not cuttingarchive logs to dis'.

    Page 2 of 204

  • 8/16/2019 Interview Point

    3/204

    /. 6ou have )ust had to restore from bac'u$ and do not have any control files. =ow would you goabout bringing u$ this database?

    ! would create a te(t based bac'u$ control file, sti$ulating where on dis' all the data files where andthen issue the recover command with the using bac'u$ control file clause.

    7. =ow do you switch from an init.ora file to a s$file?

    !ssue the create s$file from $file command.

    9. #($lain the difference between a data bloc', an e(tent and a segment.

    A data bloc' is the smallest unit of logical storage for a database ob)ect. As ob)ects grow they ta'echun's of additional storage that are com$osed of contiguous data bloc's. hese grou$ings of

    contiguous data bloc's are called e(tents. All the e(tents that an ob)ect ta'es when grou$ed togetherare considered the segment of the database ob)ect.

    . >ive two e(am$les of how you might determine the structure of the table D#0.

    se the describe command or use the [email protected]@ddl $ac'age.

    . Where would you loo' for errors from the database engine?

    !n the alert log.

    . om$are and contrast C:A# and D### for a table.

    Both the truncate and delete command have the desired outcome of getting rid of all the rows in atable. he difference between the two is that the truncate command is a DD o$eration and )ustmoves the high water mar' and $roduces a now rollbac'. he delete command, on the other hand, is aD+ o$eration, which will $roduce a rollbac' and thus ta'e longer to com$lete.

    . >ive the reasoning behind using an inde(.

    Easter access to data bloc's in a table.

    F. >ive the two ty$es of tables involved in $roducing a star schema and the ty$e of data they hold.

    Eact tables and dimension tables. A fact table contains measurements while dimension tables willcontain data that will hel$ describe the fact tables.

    Page 3 of 204

  • 8/16/2019 Interview Point

    4/204

    13. . What ty$e of inde( should you use on a fact table?

    A Bitma$ inde(.

    11. >ive two e(am$les of referential integrity constraints.

    A $rimary 'ey and a foreign 'ey.

    1/. A table is classified as a $arent table and you want to dro$ and re%create it. =ow would you dothis without affecting the children tables?

    Disable the foreign 'ey constraint to the $arent, dro$ the table, re%create the table, enable the foreign'ey constraint.

    17. #($lain the difference between AC=!;# mode and :

  • 8/16/2019 Interview Point

    5/204

    6ou get this error when you get a sna$shot too old within rollbac'. !t can usually be solved byincreasing the undo retention or increasing the si8e of rollbac's. 6ou should also loo' at the logicinvolved in the a$$lication getting the error message.

    /3. #($lain the difference between G

  • 8/16/2019 Interview Point

    6/204

    79. >ive two methods you could use to determine what DD changes have been made.6ou could use ogminer or &treams7. What does coalescing a tables$ace do?

    oalescing is only valid for dictionary%managed tables$aces and de%fragments s$ace by combiningneighboring free e(tents into large single e(tents.7. What is the difference between a #+0rant the

  • 8/16/2019 Interview Point

    7/204

    /. What is the ma(imum buffer si8e that can be s$ecified using the DB+&@

  • 8/16/2019 Interview Point

    8/204

    +animara N7. &witch to D

  • 8/16/2019 Interview Point

    9/204

    9 99 C:#C. ! 'now the nvl function only allows the same data ty$eQie. number or char or date :vlQcomm, 3RR,if commission is null then the te(t ?:ot A$$licable? want to dis$lay, instead of blan' s$ace. =ow do !

    write the query?&IN select [email protected],5:A5R from em$K

  • 8/16/2019 Interview Point

    10/204

    %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%33 eight hundred133 one thousand si( hundred

    1/3 one thousand two hundred fifty!f you want to add some te(t li'e,Cs. hree housand only.&IN select sal "&alary ",Q5 Cs. 5SS Qto@charQto@dateQsal,5)5R, 5*s$5RRSS 5 only.5RR"&al in Words" from em$4&alary &al in Words%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%33 Cs. #ight =undred only.133 Cs.

  • 8/16/2019 Interview Point

    11/204

    /. What?s the command to change the &I $rom$t name?&IN set sql$rom$t ?database%1 N ?database%1 N

    database%1 N7. =ow do you switch to D

  • 8/16/2019 Interview Point

    12/204

    $ renie 'priorit) pid

    . &wa$ $artition must be how much the si8e of CA+?

    *ou+le the si,e of RA-

    . =ow do you automate starting and shutting down of databases in :!-?. using d+start/sh and d+stop/sh sripts and mentioning 012 in orata+ file

    F. =ow do you set ernel 0arameters in Ced =at inu(, A!- and &olaris?. entering parameters with 3alues in 4et4sstl/onf file

    13. What are ;+&A and &==++A-?5-67A7 is used to know memor oupation details

    68--AX is maximum memor 69A an use from the total RA- si,e

    11. =ow can a DBA see only the files which are modified today?

    At :6 le3el& using ls –ltr& whih will show latest date if it was modified

    In windows& we an see in details ta+

    1/. =ow can a DBA see only the files which were created / days ago?$ find / !mtime ;< !print|xargs ls !l

    17. =ow can a DBA delete only the files which were created days ago? Q&ay 1%3/%/313R?$ find / !mtime ;= !print|xargs rm

    19. =ow can DBA see the si8e of CA+?We an use 5-67A7 or 7:> ommands for unix

    We an see through m omputer !% properties in windows

    1. =ow can a DBA see only the si8e of directory?

    $ du –skh #diretor name% (this will gi3e si,e in 9.

    1. Difference between TduU and TdfU commands?du – disk used& df – disk free/ 6o one will gi3e used spae and other will use free spae

    1. =ow can a DBA see the number of networ' connections to a database?$ ps –ef | grep orale

    If we see onnetions with loal?@:& then the are network onnetions

    1. =ow can DBA 'now whether the database is o$en or not? !n other words how can DBA see thestatus of database?6elet from 3$instaneB

    :r

    Page 12 of 204

  • 8/16/2019 Interview Point

    13/204

    6elet name&openCmode from 3$data+aseB

    If from :6 le3el& we an use ps –ef | grep smon

    1F. =ow can DBA &ee the number of TlistenersU available for a database?$ ps –ef | grep tns

    /3. What is stored in oratab file?7he 6I* name& its home path and whether *. is autostarta+le in ase of re+oot

    /1. What is the difference between &oft in' and =ard in'?8ard Dinks E

    F/ All Dinks ha3e same inode num+er/

  • 8/16/2019 Interview Point

    14/204

    /. Which subdirectory contains the message files the

  • 8/16/2019 Interview Point

    15/204

    R =ow will you find the system wide 1R default $ermanent tables$ace, /R default tem$orarytables$ace 7R Database time 8one?

    6elet propertCname&propertC3alue from data+aseCproperties where propertCname likeOP*LAUD7PNB

    R =ow will you find the current users who are using tem$orary tables$ace segments?5$7L->6L9CU6A9L

    FR =ow will you convert an e(isting dictionary managed $ermanent tables$ace to tem$orarytables$ace?@ot possi+le

    13R !s media recovery requird if a tables$ace is ta'en offline immediate?

    @ot reMuired

    11R =ow will you convert dictionary managed tables$ace to locally managed tables$ace?Lxe d+msCspaeCadmin/ta+lespaeCmigrateCtoCloal(O7A.DL6>AKLC@A-LNB

    1/R !f you have given command to ma'e a tables$ace offline normal, but its not ha$$ening.it is intransactional read%only mode. =ow will you find which are the transactions which are $reventingtheconversion?. looking at Mueries using + those 6I* (u an get sript from net/ I suspet Muestion is not

    lear/

    17R !f you dro$ a tables$ace containing 9 datafiles, how many datafiles will be dro$ed at a time bygiving a single dro$ tables$ace command?

    All datafiles

    19R !f database is not in A78N offline dropB

    1R =ow will you convert the locally managed tables$ace to dictionay managed?What are thelimitations?

    Lxe d+msCspaeCadmin/ta+lespaeCmigrateCfromCloal(O7A.DL6>AKLC@A-LNB

    6167L- ta+lespae should +e ditionar

    1R Which $arameter defines the ma( number of datafile in database?*+Cfiles and -AX*A7AIDL6 in ontrol file

    1R an a single datafile be allocated to two tables$aces?Why?

    Page 15 of 204

  • 8/16/2019 Interview Point

    16/204

    @o/ +eause segments annot spae multiple datafiles

    1R =ow will you chec' if a datafile is Autoe(tinsible?

    6elet autoextensi+le from d+aCdataCfiles where fileCname?NNB

    1FR Write command to ma'e all datafiles of a tables$ace offline without ma'ing the tabls$ace offlineitself?Alter data+ase datafile O>A78N offline normalB

    /3R !n 13g, =ow to allocate more than one tem$orary tables$ace as default tem$orary tables$ace to asingle user?. using temporar ta+lespae group

    /1R What is the relation between db@files and ma(datafiles $arameters?

    .oth will restrit no of datafiles in the data+ase

    //R !s it $ossible to ma'e tem$files as read only?es

    /7R What is the common column between dba@tables$aces and dba@datafiles?7a+lespaeCname

    /9R Write a query to dis$lay the names of all dynamic $erformance views?6elet ta+leCname from ditionar where ta+leCname like O3$PNB

    /R :ame the scri$t that needs to be e(ecuted to create the data dictionary views after databasecreation?Katalog/sMl

    /R >rant to the user &

  • 8/16/2019 Interview Point

    17/204

    73R Write a query to dis$lay the fileV and the status of all datafiles that are offline?6elet file&status from 3$datafile where status?N:DI@LNB

    71R Write the statement to dis$lay the si8e of the &ystem >lobal Area Q&>AR?6how parameter sga

    :r

    6how sga

    7/R

  • 8/16/2019 Interview Point

    18/204

    Kreate password file

    If windows& reate instane using :RA*I- utilit

    91R What does the scri$t utle(c$t.sql create? What is this table used for?

    It will reate LXLKL>7I:@6 ta+le/ 6ee +elow link 

    httpE44searhorale/tehtarget/om4news4"HSTGH4ind!and!remo3e!dupliate!rows!using!

    onstraint!exeptions

    9/R !n which

  • 8/16/2019 Interview Point

    19/204

    1R write down two reasons why automatic e(tent allocation for an e(tent may fail?If the disk spae reahed max limit

    If autoextend reahed maxsi,e limit

    /R Iuery the DBA@

  • 8/16/2019 Interview Point

    20/204

    :rale QuestionsE

    *.-6 ! 9eneral

    Question Expected Answer Notes

    What is a relationaldatabase managementsystem?

    &ystems software that stores and managesaccess to data held in relational form

    What is &I? :on%$rocedural language to access data in adatabase

    What is a transaction 4 unitof wor'?

    &et of &I statements that form atomic unit

    What is the transaction log

    4 redo log?

    Data fileQsR used to store before and after

    images of changes to data in the dbWhat is the $ur$ose ofloc'ing?

    0revent access to uncommitted data0revent lost u$datesX

    What is a deadloc'? ser A has 1 and wants / while user B has /and wants 1

    What is a timeout? ser has waited too long for a resource

    =ow do you count thenumber of rows in a table?

    # countQOR EC

  • 8/16/2019 Interview Point

    21/204

    What are $rimary andforeign 'eys?

    !dentifier and relationshi$

    What o$tions are available

    when creating a referentialconstraint

    restrict, cascade, set null

    :rale *.A

    Question Expected Answer Notes

    What is an instance? &>A Z bac'ground $rocesses

    What is the &>A? &ystem >lobal Area % holds database buffercache, redo log buffer and shared $ool

    What are the bac'ground

     $rocesses and which aremandatory?

    DBWC, >WC, &+

  • 8/16/2019 Interview Point

    22/204

    =ow do the contents of thefree list change?

    !f an insert is unable to $lace row on bloc', itis removed from free list. After delete oru$date ma'es used used s$ace on bloc' less

    than $ctused, bloc' goes to head of list. Afterdelete or u$date ma'es free s$ace on bloc'less than free s$ace, removed from free list

    What is a cluster? Able to store more than one table. Cows withsame cluster 'ey are $ut in same bloc's

    What is a distributeddatabase?

    &ingle logical database s$read amongdifferent $hysical databases on differentservers

    What is the $arallel queryo$tion?

    ives ability for more than one instance too$en the same database Q+00 machinesR

    What is a sna$shot? =olds co$y of data from another tableQsR

    =ow is a sna$shotrefreshed?

    &low or fast. :eed sna$shot log for fast.Cefresh auto at intervals or manually.

    :rale *e3elopmentQuestion Expected Answer Notes

    What is a trigger? $iece of code attached to a table that ise(ecuted after s$ecified D+ statements

    e(ecuted on that tableWhat is dynamic &I? te(t of statement built at e(ection time

    What are the three $arts ofa 04&I $rogram?

    declare, e(ecution, e(ce$tion

    What do you find in each? variables Z cursor defns.logic, inc. &I statementslogic to handle e(ce$tions

    Describe o$eration ofcursors in a $rog.

    declare, o$en, fetch ..., close

    What is an im$licit cursor? hose built to satisfy singleton selects

    What does the o$timi8erdo?

    hooses e(ecution $lan

    =ow can you tell whataccess $ath it has chosen?

    #-0A!: 0A:

    What is a $rocedure? :amed $iece of atomic code that can becalled

    What is a stored $rocedure?

    Ditto, e(ce$t created as an ob)ect

    Page 22 of 204

  • 8/16/2019 Interview Point

    23/204

    What is a function Ditto, e(ce$t returns a value

    What ha$$ens to a stored $rocedure when dro$ table

    on which it de$ends?

    Becomes invalid % requires recom$ile at ne(te(ecution Qwill fail unless table is recreatedR

    =ow do you find out whattables you own?

    C@AB#&

    Ditto $rocedures? C@

  • 8/16/2019 Interview Point

    24/204

    #($ected answer2 his ha$$ens with triggers. !t occurs because the trigger is trying to u$date a row it is currently using.he usual fi( involves either use of views or tem$orary tables so the database is selecting from one while u$dating theother.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. Describe the use of PC

  • 8/16/2019 Interview Point

    25/204

    #($ected answer2 &I

  • 8/16/2019 Interview Point

    26/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. 6ou have a rollbac' segment in a version ./ database that has e($anded beyond o$timal, how can it be restored too$timal?

    evel2 ow

    #($ected answer2 se the A#C AB#&0A# ..... &=C!: command.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. !f the D#EA and #+0

  • 8/16/2019 Interview Point

    27/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    F. What ha$$ens if a $rimary 'ey constraint is disabled and then enabled without fully s$ecifying the inde( clause?evel2 !ntermediate

    #($ected answer2 he inde( is created in the userXs default tables$ace and all si8ing information is lost.

  • 8/16/2019 Interview Point

    28/204

    1. A develo$er is trying to create a view and the database wonXt let him. =e has the TD#;#

  • 8/16/2019 Interview Point

    29/204

    6QD4 6QD>lus

    1. =ow can variables be $assed to a &I routine?

    evel2 ow

    #($ected answer2 By use of the L symbol. Eor $assing in variables the numbers 1% can be used QL1, L/,...,LR to $assthe values after the command into the &I0& session. o be $rom$ted for a s$ecific variable, $lace the am$ersandedvariable in the code itself2 Tselect O from dba@tables where ownerHLowner@nameKU . se of double am$ersands tells &I0& to resubstitute thevalue for each subsequent use of the variable, a single am$ersand will cause a re$rom$t for the value unless an A#0statement is used to get the value from the user.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. 6ou want to include a carriage return4linefeed in your out$ut from a &I scri$t, how can you do this?evel2 !ntermediate to high

    #($ected answer2 he best method is to use the =CQR function Q=CQ13R is a return4linefeedR and the concatenationfunction TSSU. Another method, although it is hard to document and isnXt always $ortable is to use the return4linefeed as a $art of a quoted string.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. =ow can you call a 04&I $rocedure from &I?evel2 !ntermediate

    #($ected answer2 By use of the #-## Qshort form #-#R command.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. =ow do you e(ecute a host o$erating system command from within &I?evel2 ow

    #($ected answer2 By use of the e(clamation $oint TYU Qin :!- and some other

  • 8/16/2019 Interview Point

    30/204

    . What &I0lus command is used to format out$ut from a select?evel2 low

    #($ected answer2 his is best done with the

  • 8/16/2019 Interview Point

    31/204

    11. 6ou are )oining a local and a remote table, the networ' manager com$lains about the traffic involved, how can youreduce the networ' traffic?evel2 =igh

    #($ected answer2 0ush the $rocessing of the remote data to the remote instance by using a view to $re%select theinformation for the )oin. his will result in only the data required for the )oin being sent across.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1/. What is the default ordering of an #&!J# 3 !:#&!J# 3 will generate re$orts that are 3 lines long with a linewidth of 3 characters. he 0A>#&!J# and !:#&!J# o$tions can be shortened to 0A>#& and !:#&.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. =ow do you $revent out$ut from coming to the screen?evel2 ow

    #($ected answer2 he o$tion #C+

  • 8/16/2019 Interview Point

    32/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. =ow do you $revent

  • 8/16/2019 Interview Point

    33/204

    . What is the general guideline for si8ing db@bloc'@si8e and db@multi@bloc'@read for an a$$lication that does many fulltable scans?evel2 =igh

    #($ected answer2

  • 8/16/2019 Interview Point

    34/204

    11. Describe hit ratio as it $ertains to the database buffers. What is the difference between instantaneous and cumulativehit ratio and which should be used for tuning?evel2 !ntermediate

    #($ected answer2 he hit ratio is a measure of how many times the database was able to read a value from the buffersverses how many times it had to re%read a data value from the dis's. A value greater than 3%F3P is good, less couldindicate $roblems. !f you sim$ly ta'e the ratio of e(isting $arameters this will be a cumulative value since the databasestarted. !f you do a com$arison between $airs of readings based on some arbitrary time s$an, this is the instantaneousratio for that time s$an. >enerally s$ea'ing an instantaneous reading gives more valuable data since it will tell you whatyour instance is doing for the time it was generated over.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1/. Discuss row chaining, how does it ha$$en? =ow can you reduce it? =ow do you correct it?evel2 high

    #($ected answer2 Cow chaining occurs when a ;AC=AC/ value is u$dated and the length of the new value is longer

    than the old value and wonXt fit in the remaining bloc' s$ace. his results in the row chaining to another bloc'. !t can bereduced by setting the storage $arameters on the table to a$$ro$riate values. !t can be corrected by e($ort and im$ort ofthe effected table.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    17. When loo'ing at the estat events re$ort you see that you are getting busy buffer waits. !s this bad? =ow can you findwhat is causing it?evel2 high

    #($ected answer2 Buffer busy waits could indicate contention in redo, rollbac' or data bloc's. 6ou need to chec' thevGwaitstat view to see what areas are causing the $roblem. he value of the TcountU column tells where the $roblem is,the TclassU column tells you with what. :D< is rollbac' segments, DAA is data base buffers.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    19. !f you see contention for library caches how can you fi( it?evel2 !ntermediate

    #($ected answer2 !ncrease the si8e of the shared $ool.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f you see statistics that deal with TundoU what are they really tal'ing about?evel2 !ntermediate

    #($ected answer2 Collbac' segments and associated structures.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f a tables$ace has a default $ctincrease of 8ero what will this cause Qin relationshi$ to the smon $rocessR?evel2 =igh

    #($ected answer2 he &+

  • 8/16/2019 Interview Point

    35/204

    1. !f a tables$ace shows e(cessive fragmentation what are some methods to defragment the tables$ace? Q.1,./ and .7onlyRevel2 =igh

    #($ected answer2 !n

  • 8/16/2019 Interview Point

    36/204

    #($ected answer2 6es, you should strive for 8ero reloads if $ossible. !f you see e(cessive reloads then increase the si8e ofthe shared $ool.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /7. 6ou loo' at the dba@rollbac'@segs view and see that there is a large number of shrin's and they are of relatively smallsi8e, is this a $roblem? =ow can it be fi(ed if it is a $roblem?evel2 =igh

    #($ected answer2 A large number of small shrin's indicates a need to increase the si8e of the rollbac' segment e(tents.!deally you should have no shrin's or a small number of large shrin's. o fi( this )ust increase the si8e of the e(tents andad)ust o$timal accordingly.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /9. 6ou loo' at the dba@rollbac'@segs view and see that you have a large number of wra$s is this a $roblem?

    evel2 =igh

    #($ected answer2 A large number of wra$s indicates that your e(tent si8e for your rollbac' segments are $robably toosmall. !ncrease the si8e of your e(tents to reduce the number of wra$s. 6ou can loo' at the average transaction si8e in thesame view to get the information on transaction si8e.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. !n a system with an average of 93 concurrent users you get the following from a query on rollbac' e(tents2

    C

  • 8/16/2019 Interview Point

    37/204

    Installation4Konfiguration

    1. Define

  • 8/16/2019 Interview Point

    38/204

    . What must be installed with

  • 8/16/2019 Interview Point

    39/204

    *ata -odelerE

    1. Describe third normal form?evel2 ow

    #($ected answer2 &omething li'e2 !n third normal form all attributes in an entity are related to the $rimary 'ey and only tothe $rimary 'ey

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. !s the following statement true or false2

    TAll relational databases must be in third normal formU

    Why or why not?evel2 !ntermediate

    #($ected answer2 Ealse. While 7:E is good for logical design most databases, if they have more than )ust a few tables,will not $erform well using full 7:E. sually some entities will be denormali8ed in the logical to $hysical transfer $rocess.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. What is an #CD?evel2 ow

    #($ected answer2 An #CD is an #ntity%Celationshi$%Diagram. !t is used to show the entities and relationshi$s for adatabase logical model.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. Why are recursive relationshi$s bad? =ow do you resolve them?evel2 !ntermediate

    A recursive relationshi$ Qone where a table relates to itselfR is bad when it is a hard relationshi$ Qi.e. neither side is aTmayU both are TmustUR as this can result in it not being $ossible to $ut in a to$ or $erha$s a bottom of the table Qfore(am$le in the #+0

  • 8/16/2019 Interview Point

    40/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . What is an artificial QderivedR $rimary 'ey? When should an artificial Qor derivedR $rimary 'ey be used?

    evel2 !ntermediate

    #($ected answer2 A derived 'ey comes from a sequence. sually it is used when a concatenated 'ey becomes toocumbersome to use as a foreign 'ey.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . When should you consider denormali8ation?evel2 !ntermediate

    #($ected answer2 Whenever $erformance analysis indicates it would be beneficial to do so without com$romising dataintegrity.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    &ection average score2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ evel2 @@@@@@@@@@@@@@@@@@@@@@@@@@ 

    U@IXE

    1. =ow can you determine the s$ace left in a file system?evel2 ow

    #($ected answer2 here are several commands to do this2 du, df, or bdf 

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. =ow can you determine the number of &I:# users logged in to the :!- system?evel2 !ntermediate

    #($ected answer2 &I:# users will show u$ with a $rocess unique name that begins with oracleM&!DN, if you do a $s%efSgre$ oracleM&!DNSwc %l you can get a count of the number of users.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. What command is used to ty$e files to the screen?evel2 ow

    #($ected answer2 cat, more, $g

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. What command is used to remove a file?evel2 ow

    #($ected answer2 rm

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . an you remove an o$en file under :!-?

    Page 40 of 204

  • 8/16/2019 Interview Point

    41/204

    evel2 ow

    #($ected answer2 yes

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . =ow do you create a decision tree in a shell scri$t?evel2 intermediate

    #($ected answer2 de$ending on shell, usually a case%esac or an if%endif or fi structure

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . What is the $ur$ose of the gre$ command?evel2 ow

    #($ected answer2 gre$ is a string search command that $arses the s$ecified string from the s$ecified file or files

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . he system has a $rogram that always includes the word nocom$ in its name, how can you determine the number of $rocesses that are using this $rogram?evel2 intermediate

    #($ected answer2 $s %efSgre$ Onocom$OSwc %l

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    F. What is an inode?evel2 !ntermediate

    #($ected answer2 an inode is a file status indicator. !t is stored in both dis' and memory and tracts file status. here is oneinode for each file on the system.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    13. he system administrator tells you that the system hasnXt been rebooted in months, should he be $roud of this?evel2 =igh

    #($ected answer2 +aybe. &ome :!- systems donXt clean u$ well after themselves. !node $roblems and dead user $rocesses can accumulate causing $ossible $erformance and corru$tion $roblems. +ost :!- systems should have ascheduled $eriodic reboot so file systems can be chec'ed and cleaned and dead or 8ombie $rocesses cleared out.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    11. What is redirection and how is it used?evel2 !ntermediate

    #($ected answer2 redirection is the $rocess by which in$ut or out$ut to or from a $rocess is redirected to another $rocess.his can be done using the $i$e symbol TSU, the greater than symbol TNT or the TteeU command. his is one of thestrengths of :!- allowing the out$ut from one command to be redirected directly into the in$ut of another command.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    Page 41 of 204

  • 8/16/2019 Interview Point

    42/204

    1/. =ow can you find dead $rocesses?evel2 !ntermediate

    #($ected answer2 $s %efSgre$ 8ombie %% or %% who %d de$ending on the system.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    17. =ow can you find all the $rocesses on your system?evel2 ow

    #($ected answer2 se the $s command

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    19. =ow can you find your id on a system?evel2 ow

    #($ected answer2 se the Twho am iU command.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. What is the finger command?evel2 ow

    #($ected answer2 he finger command uses data in the $asswd file to give information on system users.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. What is the easiest method to create a file on :!-?

    evel2 ow

    #($ected answer2 se the touch command

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. What does NN do?evel2 !ntermediate

    #($ected answer2 he TNNT redirection symbol a$$ends the out$ut from the command s$ecified into the file s$ecified.he file must already have been created.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f you arenXt sure what command does a $articular :!- function what is the best way to determine the command?

    #($ected answer2 he :!- man %' MvalueN command will search the man $ages for the value s$ecified. Ceview theresults from the command to find the command of interest.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    &ection average score2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ evel2 @@@@@@@@@@@@@@@@@@@@@@@@@@ 

    Page 42 of 204

  • 8/16/2019 Interview Point

    43/204

    :rale 7rou+leshootingE

    1. =ow can you determine if an

  • 8/16/2019 Interview Point

    44/204

  • 8/16/2019 Interview Point

    45/204

    11. 6ou get a call from you bac'u$ DBA while you are on vacation. =e has corru$ted all of the control files while $layingwith the A#C DAABA BA0

  • 8/16/2019 Interview Point

    46/204

    I.9. What is the term

  • 8/16/2019 Interview Point

    47/204

  • 8/16/2019 Interview Point

    48/204

    I./1. What are the ty$e of loc's available in &I. ?Ans2 6hare Doks 2 !t can be $laced by more than one user at a time. !t enable any number of users to accessthe data, but not to change it. hese are used for queries.

    Lxlusi3e loks 2 !t allows no one but the owner of the loc' to access the data at all. hese are used for commands that change the content or structure of the table. !t will be in effect until the end of the transaction.

    I.// What do you mean by 0C!;!#># in oracle ?Ans2 A $rivileges is a right to e(ecute a $articular ty$e of &I statement or right to access another usersob)ects.

  • 8/16/2019 Interview Point

    49/204

     Eoreign 'ey % When you are referring to the $rimary 'ey of some other table.

    I.73. What is the difference between integrity constraint and database triggers ?

    Ans2 riggers and declarative integrity constraints can both be used to constrain data in$ut. =owever, triggersand integrity constraints have significant differences. A declarative integrity constraints is a statement about thedatabase that is always true. A onstraint a$$lies

    to e(isting data in the table and any statement that mani$ulates the table. riggers constrains whattransactions can do. A triggers does not a$$ly to data loaded before the definitions of the triggersKtherefore, itdoes not guarantee all data in a table conforms to the rules established by an associated trigger. A trigger enforces transactional constraints, i.e. a trigger only forces constraints at the time that the data changestherefore a constraint such as "ma'e sure that the delivery date is at least seven days from today " should beenforced by a trigger not a declarative constraint.

    I. 71 What is an e(ce$tion hierarchy in 04&I ?Ans2 When an e(ce$tion is raised, if 04 &I cannot find a handler for it in the current bloc' or sub$rogram,

    the e(ce$tion $ro$agates. hat is, the e(ce$tion re$roduces it self in successive enclosing bloc's until ahandler is found or there are no more bloc's to search. !n the latter case 04&I returns an unhandlede(ce$tion error to the host environment . he e(ce$tion for inner bloc' can be raised in outer bloc' sowhenever e(ce$tion not handled in inner bloc', outer bloc' ta'es care of it.

    I.7/. What is the result of greatest Q1, : R ?Ans2 1.

    I.77. What do you mean by $ragma #-#0!

  • 8/16/2019 Interview Point

    50/204

    I.79. What is the result of least Q1, : R ?Ans2 1.

    I7. !n any database you are firing the command with order byQascR column@name and if that $articular contains : values then the : values will a$$ear at to$ or bottom?Ans. he : values will a$$ear on to$.

    I7. What are macros in +#:&?Ans. 6ou can use macros commands to incor$orate function 'eys $rocesses into selectable menu choices.6ou enter macros into the command line followed by a semicolon as follows2 0C;+#:K &I%+#: will now move to the $revious menu. 6ou can combine more than one macro on the commandline terminating each with a semicolon. !n some cases you enter command line arguments li'e thisK 

  • 8/16/2019 Interview Point

    51/204

    Ans2 A 'ey trigger is a s$ecial &I%Eorms macro language trigger for redefining function 'eys. #.g. you canredefine the 0revious Bloc' 'ey to $erform another $rocess instead,such as :e(t Bloc'. 6ou can disable thesefunction 'eys by redefining them to the neutral functionQ:

  • 8/16/2019 Interview Point

    52/204

      &6&DA# % he system date.  : % A null value.  !D % he user5s descri$tion number.

      C % he user5s logon name.

    I.9. What are log files ?Ans. . When

  • 8/16/2019 Interview Point

    53/204

    I.. What is a orrelated query ?Ans. A orrelated query is a form of query used in #, 0DA# or D### to force to oracle to

    evaluate the query once $er row or the $arent query rather than once for the entire row. A correlated query isused to answer multi%$art questions whose answer de$ends u$on the value in row of the $arent query.

    I.. What is an inde(?Ans. !nde( is a way to enhance the $erformance. !t $rovides a fast access $ath to the columns that areinde(ed. !nde(es can ensure that no du$licate values are entered into a column.

  • 8/16/2019 Interview Point

    54/204

    &ystem@rigger@Cecord variable records the sequence number of the record that &I forms is $rocessing.his number re$resent the record5s current $hysical order in the bloc'5s list of records. he recorded value isalways in the form of a character string.

    I.7 What do you mean by &et@Eield ?Ans. &et@field modifies a field by changing a s$ecified field characteristic. 6ou an only change one fieldcharacteristic. 6ou can only change one field characteristic at a time.

    I.9. What do you mean by Anchor%;iew ?Ans2 Anchor%;iew moves a view of a $age to a new location on the screen. his $rocedure effectivelychanges where on the screen the o$erator sees the view.&ynta( 2 Anchor@;iew Q $age@no, ( % coordinate, y % coordinateRK where $age@no s$ecifies the integer no. the $age in the current form of which the view consists. ( % coordinate s$ecifies the integer no. of the ( %coordinate on the screen where you want to $lace the u$$er left corner of view. y % coordinate s$ecifies theinteger no. of the y % coordinate on the screen where you want to $lace the u$$er left corner of view. 6ou

    cannot move a view so that any $art of it would dis$lay outside of the screen area. &uch a move causes anerror. 6ou can use Anchor@;iew for $o$@u$ $ages only.

    I. What is an anonymous bloc' in 04&I ?Ans.2 An Anonymous bloc' is a 04&I bloc', that unli'e a form@level@$rocedure, has no name. his meansthat you can only e(ecute an anonymous bloc' from the trigger in which it is defined. Also, in &I % forms,an anonymous bloc' does not require the e($licit $resence of the B#>!: and #:D 'eywords to enclose thee(ecutive statements. &I % E!: and #:D 'eywords. 6ou muste($licitly state B#>!: and #:D if the $rocedure includes a declaration section. !n this case, 04&I needsthe e($licit B#>!: and #:D to se$arate the declaration section from the e(ecutable statements. AnAnonymous bloc' requires a declaration section if the bloc' uses local variables, cursors or named e(ce$tionhandlers.

    I. #($lain client server Architecture.Ans2 !n

  • 8/16/2019 Interview Point

    55/204

    two%$hase commit mechanism. he changes made by all &I statements in a transaction are either committed or rolled bac' as unit. he commit of a non%distributed transaction Qone that contains &Istatements that modify data only at a local databaseR is sim$le % all changes are either committed or rolled

     bac' as a unit in the non distributed database. =owever, the commit or rollbac' of a distributed transactionmust be co%ordinated over a networ', so that $artici$ating nodes either all commit or rollbac' thetransaction,even if a networ' failure or a system failure of any number nodes occur during the $rocess. hetwo%$hase commit mechanism guarantees that the nodes $artici$ating in a distributed transaction either allcommit or rollbac' the transaction, thus maintaining the integrity of the global database.

    I.3. =ow many database triggers are there in

  • 8/16/2019 Interview Point

    56/204

     &: %based recovery % system change nos. Q&:sR can be used recovery o$erations, allowing to recover u$toa s$ecific transaction. Whenever a transaction is recorded in the table unique &: isassigned to it.

     +irrored on%line redo log files % oracle $rovides the ca$ability to maintain "mirror images " of the on%lineredo log. When a mirrored on%line redo files are configured, the WC bac'ground $rocesses concurrentlywrites the same information to multi$ly active on%line redo log files.

    c. hanges to views 2  reating a view with error % views can be created even though underlying table does not e(ists or itsdefinition does not match that of the view. errors can be corrected later on. "&elect O " in view definition %

  • 8/16/2019 Interview Point

    57/204

     wo%$hase commit % Deadloc' detection % also detects distributeddeadloc' condition. +ulti%:ode read consistency % for a single query that s$ans multi$le notes, read consistency is guaranteed.

     &na$shot ca$ability % you can ma'e read only co$ies of master table at remote sites. DB@Domain $arameter % any legal string of name com$onents se$arated by $eriods. losing database lin's % a database lin' can be closed when it is not needed longssu$$orted % long data items can be referenced in queries , u$dates and deletes. !m$rovement in distributedquery $rocessing. =eterogeneous distributed database systems % with non%oracle database. 0arallel server o$tion % su$$orts database access from two or moreloosely cou$led systems at a time.

    g. 0erformance #nhancement %

    +ulti % threaded server architecture % it can reduce system overhead on multi%user. hec'$oint $rocess % ta'es over the wor' of chec'%$ointing from the W>C.  lobal variables are variables used to $ass arguments across forms.

    Page 57 of 204

  • 8/16/2019 Interview Point

    58/204

    hese variables are of ty$e char only. hey cannot be used unless declaredand should avoid using to $ass values within a form.  &ynta( 2 2global.Mvar@nameN

    I. What are le(ical and bind $arameters ?Ans.2 e(ical and bind $arameters can be used to re$lace a value, or valuesin a # statement.Bind $arameter % one value is substituted into the $arameter reference. !t may be used anywhere in thequery where a single literal value, such as a character string, number or date could be used. A defaultdefinition is $rovided for each bind $arameter if it has not been not been created manually. hus, you cancreate a bind $arameter )ust by entering a colon and then a $arameter name Q no s$aces between R in your # statement. e(ical 0arameter % several values may be substituted into the $arameter reference . !t can be used in theW=#C#, >C

  • 8/16/2019 Interview Point

    59/204

     $rocedure. 0o$%u$ $age is not active until the cursor navigates to a field on that $age. !t disa$$ears when thecursor navigates out of the $age and the remove on #-! $age characteristics is turned or when the=!D#@0A># $ac'aged $rocedure e($licitly removes it. When you define a $age as a 0o$%u$ $age Q on the

     $age definition form or s$read table R, you can s$ecify $age characteristics that affect how the $age a$$ears.hese characteristics determine the following s$ecifications 2aR the initial si8e of the view Q i.e. how much of the $age you enclosed R bR how much of the view on the $age Q i.e. what $art of the $age you see RcR the initial location of the view on the screen Q i.e. where on the screen you see the view of the $age RdR the title of the vieweR whether the view should have a border fR whether the view should have a scroll bars.

     :ote that the si8e of the view, the location of the view on the $age and the location of the view on the screenare dynamic characteristics i.e. they can be changed during e(ecution of the form by the Cesi8e@view,Anchor@view and +ove@view $ac'aged $rocedures. he location of the view on the $age can also be

    changed through navigational events during e(ecution.

    I.FR What is an #vent ?Ans2 #vents are the things that occur when a form is e(ecuted. All $rocessing centres around events. &Iforms 'nows about events and handles them by e(ecuting functions e.g. the o$erator $ressing the\ ne(t@field ] 'ey is even . When this event occurs, &I%forms e(ecutes a $redefined a behaviour, which can be the default behaviour Q e(ecuting the :e(t@field function which moves the cursor to the ne(t field in thesequence R or a custom behaviour that you have defined Q such as e(ecuting the +#&&A># function and the :#-@E!#D function to dis$lay a message for the o$erator before moving the cursor R. During $rocessing,events are usually nested i.e. the occurrence of one event usually invo'es functions that invo'e other events.

    I.3R What is the difference between

  • 8/16/2019 Interview Point

    60/204

      Eield Attributes % indicates the following things about a field 2 aR basic information, including the fieldslocation in a form and seq. no in a bloc'. bR how an o$erator can interact with a $articular field

    cR the ty$e of data that an o$erator can enter in a field and the format in which the data must be entered. fieldname, sequence, data ty$e, select attribute Q either on or off R, base table, $rimary 'ey, dis$layed, required,in$ut, allowed, u$date allowed, u$date if null, query allowed, u$$er case, echo in$ut, fi(ed length, automatics'i$, automatic hint, field length, query length, dis$lay length, screen $osition includes ( co%ordinate, y co%ordinate, $age no. Eorm Attributes % indicates the following things about a form 2 aR basic information , including oracle refers to the form bR how the form interacts with &IO+enu u$on e(ecution cR the validation unit title, validation unit, mouse navigation unit Qincluding field bloc', record,formR, defaultmenu a$$lication, starting menu name, security grou$ name, comment.

    I./ What is the ist of values ?Ans.2 !t is a window that a$$ears on the screen, overlaying a $ortion of the current dis$lay. #ach list of values

    corres$onds to one and only one field in the design interface. !t can consist of a title, a list area and a searchfield Qnot all lists contain a search fieldR. 6ou can use a list of values to view currently valid values and toenter a value into the field to which the list of value corres$onds. o enter a value into the field, move thecursor to the item you want in the list of values list area and $ress \select]. 6ou need not use the list of valuesto enter a value into a fieldthat has a list of values.

    I.7 What is a user%e(it ?Ans.2 ser%e(it calls the user e(it named in the user@e(it@string. &ynta( % user@e(itQuser@e(it@string,\error string] R K where user@e(it@string %s$ecifies the name of the user e(it you want to call and any $arameters. error@string % s$ecifies an error message that &I forms ma'eaccessible if the user e(it fails.

    I.9 What are the different ob)ects in

  • 8/16/2019 Interview Point

    61/204

    I. What is an instance and bac'ground $rocess ?Ans.2 !nstance % every time a database started on a database server, a memory area called the &>A, isallocated and one or more A and the

  • 8/16/2019 Interview Point

    62/204

    all queries refer to the same sna$shot of the database, $roviding a multitable, multiquery, read consistentview.

  • 8/16/2019 Interview Point

    63/204

    he(torawQcharR converts char containing he(adecimal digits to a raw value. CAW

  • 8/16/2019 Interview Point

    64/204

    &tored 0rocedures % hec'list

    • #nsure that every e(it $ath has a return statement• Avoid using !#4+A=#& in a query that has a large number of )oins % use it on a smaller set

    of data.

    • Avoid • When using +A-4+!:4

  • 8/16/2019 Interview Point

    65/204

    What is a deadloc'? ser A has 1 and wants / while user B has / andwants 1

    What is a timeout? ser has waited too long for a resource

    =ow do you count thenumber of rows in a table?

    # countQOR ECA? &ystem >lobal Area % holds database buffer cache,

    redo log buffer and shared $ool

    What are the bac'ground $rocesses and which aremandatory?

    DBWC, >WC, &+

  • 8/16/2019 Interview Point

    66/204

    When might you )ustmount rather than o$en?

    During media recovery

    =ow do you close

  • 8/16/2019 Interview Point

    67/204

    e(ecuted after s$ecified D+ statementse(ecuted on that table

    What is dynamic &I? te(t of statement built at e(ection time

    What are the three $arts of a 04&I $rogram?

    declare, e(ecution, e(ce$tion

    What do you find in each? variables Z cursor defns.logic, inc. &I statementslogic to handle e(ce$tions

    Describe o$eration of cursors in a $rog.

    declare, o$en, fetch ..., close

    What is an im$licit cursor? hose built to satisfy singleton selects

    What does the o$timi8er do?

    hooses e(ecution $lan

    =ow can you tell whataccess $ath it has chosen?

    #-0A!: 0A:

    What is a $rocedure? :amed $iece of atomic code that can becalled

    What is a stored $rocedure?

    Ditto, e(ce$t created as an ob)ect

    What is a function Ditto, e(ce$t returns a value

    What ha$$ens to a stored $rocedure when dro$ tableon which it de$ends?

    Becomes invalid % requires recom$ile at ne(te(ecution Qwill fail unless table is recreatedR

    =ow do you find out what

    tables you own?

    C@AB#&

    Ditto $rocedures? C@

  • 8/16/2019 Interview Point

    68/204

    Inter3iew Questions for :rale& *.A& *e3eloper Kandidates

    &core each question on a 1% or 1%13 scale.

    *.A 6etionsE 6QD46QD>DU6& >D46QD& 7uning& Konfiguration& 7rou+le shooting

    *e3eloper 6etionsE 6QD46QD>DU6& >D46QD& *ata -odeling

    *ata -odelerE *ata -odeling

    All andidates for U@IX shopE U@IX

    >D46QD QuestionsE

    1. Describe the difference between a $rocedure, function and anonymous $l4sql bloc'.evel2 ow

    #($ected answer 2 andidate should mention use of D#AC# statement, a function must return avalue while a $rocedure doesnXt have to.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. What is a mutating table error and how can you get around it?evel2 !ntermediate

    #($ected answer2 his ha$$ens with triggers. !t occurs because the trigger is trying to u$date a row itis currently using. he usual fi( involves either use of views or tem$orary tables so the database is

    selecting from one while u$dating the other.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. Describe the use of PC

  • 8/16/2019 Interview Point

    69/204

  • 8/16/2019 Interview Point

    70/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    F. =ow can you find within a 04&I bloc', if a cursor is o$en?evel2 ow

    #($ected answer2 se the P!&

  • 8/16/2019 Interview Point

    71/204

    #($ected Answer2 here are several $ossible methods, e($ort%im$ort, C#A# AB#... A&#, or

  • 8/16/2019 Interview Point

    72/204

    DB+&@&:A0&= !:D#- and AB#&0A# clause for $rimary 'eys.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    F. What ha$$ens if a $rimary 'ey constraint is disabled and then enabled without fully s$ecifying the

    inde( clause?evel2 !ntermediate

    #($ected answer2 he inde( is created in the userXs default tables$ace and all si8ing information islost.

  • 8/16/2019 Interview Point

    73/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    13. Q

  • 8/16/2019 Interview Point

    74/204

    19. A user is getting an

  • 8/16/2019 Interview Point

    75/204

    1. A user selects from a sequence and gets bac' two values, his select is2

    # $'@seq.ne(tval EC

  • 8/16/2019 Interview Point

    76/204

    /. 6ou want to include a carriage return4linefeed in your out$ut from a &I scri$t, how can you dothis?evel2 !ntermediate to high

    #($ected answer2 he best method is to use the =CQR function Q=CQ13R is a return4linefeedR andthe concatenation function TSSU. Another method, although it is hard to document and isnXt always $ortable is to use the return4linefeed as a $art of a quoted string.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. =ow can you call a 04&I $rocedure from &I?evel2 !ntermediate

    #($ected answer2 By use of the #-## Qshort form #-#R command.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. =ow do you e(ecute a host o$erating system command from within &I?evel2 ow

    #($ected answer2 By use of the e(clamation $oint TYU Qin :!- and some other

  • 8/16/2019 Interview Point

    77/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . What &I0lus command is used to format out$ut from a select?evel2 low

    #($ected answer2 his is best done with the

  • 8/16/2019 Interview Point

    78/204

    where (.em$@no H e.em$@noRK

    !n the situation where multi$le columns ma'e u$ the $ro$osed 'ey, they must all be used in the where

    clause.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    13. What is a artesian $roduct?evel2 ow

    #($ected answer2 A artesian $roduct is the result of an unrestricted )oin of two or more tables. heresult set of a three table artesian $roduct will have ( O y O 8 number of rows where (, y, 8corres$ond to the number of rows in each table involved in the )oin.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    11. 6ou are )oining a local and a remote table, the networ' manager com$lains about the trafficinvolved, how can you reduce the networ' traffic?evel2 =igh

    #($ected answer2 0ush the $rocessing of the remote data to the remote instance by using a view to $re%select the information for the )oin. his will result in only the data required for the )oin being sentacross.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1/. What is the default ordering of an

  • 8/16/2019 Interview Point

    79/204

    file and then loo' at the out$ut from the t'$rof tool. his can also be used to generate e($lain $lanout$ut.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    19. What is e($lain $lan and how is it used?evel2 !ntermediate to high

    #($ected answer2 he #-0A!: 0A: command is a tool to tune &I statements. o use it youmust have an e($lain@table generated in the user you are running the e($lain $lan for. his is createdusing the utl($lan.sql scri$t.

  • 8/16/2019 Interview Point

    80/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. =ow do you generate file out$ut from &I?evel2 ow

    #($ected answer2 By use of the &0

  • 8/16/2019 Interview Point

    81/204

    9. What are some indications that you need to increase the &=AC#D@0

  • 8/16/2019 Interview Point

    82/204

    #($ected answer2 !f you get e(cessive dis' sorts this is bad. his indicates you need to tune the sortarea $arameters in the initiali8ation files. he ma)or sort are $arameter is the &

  • 8/16/2019 Interview Point

    83/204

    1/. Discuss row chaining, how does it ha$$en? =ow can you reduce it? =ow do you correct it?evel2 high

    #($ected answer2 Cow chaining occurs when a ;AC=AC/ value is u$dated and the length of thenew value is longer than the old value and wonXt fit in the remaining bloc' s$ace. his results in therow chaining to another bloc'. !t can be reduced by setting the storage $arameters on the table toa$$ro$riate values. !t can be corrected by e($ort and im$ort of the effected table.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    17. When loo'ing at the estat events re$ort you see that you are getting busy buffer waits. !s this bad?=ow can you find what is causing it?evel2 high

    #($ected answer2 Buffer busy waits could indicate contention in redo, rollbac' or data bloc's. 6ouneed to chec' the vGwaitstat view to see what areas are causing the $roblem. he value of the TcountUcolumn tells where the $roblem is, the TclassU column tells you with what. :D< is rollbac' segments, DAA is data base buffers.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    19. !f you see contention for library caches how can you fi( it?evel2 !ntermediate

    #($ected answer2 !ncrease the si8e of the shared $ool.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f you see statistics that deal with TundoU what are they really tal'ing about?evel2 !ntermediate

    #($ected answer2 Collbac' segments and associated structures.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f a tables$ace has a default $ctincrease of 8ero what will this cause Qin relationshi$ to the smon $rocessR?evel2 =igh

    #($ected answer2 he &+

  • 8/16/2019 Interview Point

    84/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f a tables$ace shows e(cessive fragmentation what are some methods to defragment thetables$ace? Q.1,./ and .7 onlyRevel2 =igh

    #($ected answer2 !n

  • 8/16/2019 Interview Point

    85/204

  • 8/16/2019 Interview Point

    86/204

  • 8/16/2019 Interview Point

    87/204

    #($ected answer2

  • 8/16/2019 Interview Point

    88/204

    evel2 !ntermediate

    #($ected answer2 !:!!A!JA!

  • 8/16/2019 Interview Point

    89/204

  • 8/16/2019 Interview Point

    90/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    /. !s the following statement true or false2

    TAll relational databases must be in third normal formU

    Why or why not?evel2 !ntermediate

    #($ected answer2 Ealse. While 7:E is good for logical design most databases, if they have more than )ust a few tables, will not $erform well using full 7:E. sually some entities will be denormali8ed inthe logical to $hysical transfer $rocess.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. What is an #CD?evel2 ow

    #($ected answer2 An #CD is an #ntity%Celationshi$%Diagram. !t is used to show the entities andrelationshi$s for a database logical model.

    &core2 @@@@@@@@@@@@ omment2

     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. Why are recursive relationshi$s bad? =ow do you resolve them?evel2 !ntermediate

    A recursive relationshi$ Qone where a table relates to itselfR is bad when it is a hard relationshi$ Qi.e.neither side is a TmayU both are TmustUR as this can result in it not being $ossible to $ut in a to$ or  $erha$s a bottom of the table Qfor e(am$le in the #+0

  • 8/16/2019 Interview Point

    91/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . =ow should a many%to%many relationshi$ be handled?evel2 !ntermediate

    #($ected answer2 By adding an intersection entity table

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . What is an artificial QderivedR $rimary 'ey? When should an artificial Qor derivedR $rimary 'ey beused?

    evel2 !ntermediate

    #($ected answer2 A derived 'ey comes from a sequence. sually it is used when a concatenated 'ey becomes too cumbersome to use as a foreign 'ey.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . When should you consider denormali8ation?evel2 !ntermediate

    #($ected answer2 Whenever $erformance analysis indicates it would be beneficial to do so withoutcom$romising data integrity.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    &ection average score2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ evel2 @@@@@@@@@@@@@@@@@@@@@@@@@@ 

    U@IXE

    1. =ow can you determine the s$ace left in a file system?evel2 ow

    #($ected answer2 here are several commands to do this2 du, df, or bdf 

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    Page 91 of 204

  • 8/16/2019 Interview Point

    92/204

    /. =ow can you determine the number of &I:# users logged in to the :!- system?evel2 !ntermediate

    #($ected answer2 &I:# users will show u$ with a $rocess unique name that begins withoracleM&!DN, if you do a $s %efSgre$ oracleM&!DNSwc %l you can get a count of the number of users.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. What command is used to ty$e files to the screen?evel2 ow

    #($ected answer2 cat, more, $g

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    9. What command is used to remove a file?evel2 ow

    #($ected answer2 rm

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . an you remove an o$en file under :!-?evel2 ow

    #($ected answer2 yes

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . =ow do you create a decision tree in a shell scri$t?evel2 intermediate

    #($ected answer2 de$ending on shell, usually a case%esac or an if%endif or fi structure

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . What is the $ur$ose of the gre$ command?evel2 ow

    Page 92 of 204

  • 8/16/2019 Interview Point

    93/204

    #($ected answer2 gre$ is a string search command that $arses the s$ecified string from the s$ecifiedfile or files

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . he system has a $rogram that always includes the word nocom$ in its name, how can youdetermine the number of $rocesses that are using this $rogram?evel2 intermediate

    #($ected answer2 $s %efSgre$ Onocom$OSwc %l

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    F. What is an inode?evel2 !ntermediate

    #($ected answer2 an inode is a file status indicator. !t is stored in both dis' and memory and tractsfile status. here is one inode for each file on the system.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    13. he system administrator tells you that the system hasnXt been rebooted in months, should he be

     $roud of this?evel2 =igh

    #($ected answer2 +aybe. &ome :!- systems donXt clean u$ well after themselves. !node $roblemsand dead user $rocesses can accumulate causing $ossible $erformance and corru$tion $roblems. +ost:!- systems should have a scheduled $eriodic reboot so file systems can be chec'ed and cleanedand dead or 8ombie $rocesses cleared out.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    11. What is redirection and how is it used?evel2 !ntermediate

    #($ected answer2 redirection is the $rocess by which in$ut or out$ut to or from a $rocess is redirectedto another $rocess. his can be done using the $i$e symbol TSU, the greater than symbol TNT or theTteeU command. his is one of the strengths of :!- allowing the out$ut from one command to beredirected directly into the in$ut of another command.

    Page 93 of 204

  • 8/16/2019 Interview Point

    94/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1/. =ow can you find dead $rocesses?evel2 !ntermediate

    #($ected answer2 $s %efSgre$ 8ombie %% or %% who %d de$ending on the system.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    17. =ow can you find all the $rocesses on your system?evel2 ow

    #($ected answer2 se the $s command

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    19. =ow can you find your id on a system?evel2 ow

    #($ected answer2 se the Twho am iU command.

    &core2 @@@@@@@@@@@@ omment2

     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. What is the finger command?evel2 ow

    #($ected answer2 he finger command uses data in the $asswd file to give information on systemusers.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. What is the easiest method to create a file on :!-?evel2 ow

    #($ected answer2 se the touch command

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    Page 94 of 204

  • 8/16/2019 Interview Point

    95/204

    1. What does NN do?evel2 !ntermediate

    #($ected answer2 he TNNT redirection symbol a$$ends the out$ut from the command s$ecified intothe file s$ecified. he file must already have been created.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    1. !f you arenXt sure what command does a $articular :!- function what is the best way todetermine the command?

    #($ected answer2 he :!- man %' MvalueN command will search the man $ages for the value

    s$ecified. Ceview the results from the command to find the command of interest.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    &ection average score2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ evel2 @@@@@@@@@@@@@@@@@@@@@@@@@@ 

    :rale 7rou+leshootingE

    1. =ow can you determine if an

  • 8/16/2019 Interview Point

    96/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    7. sers from the 0 clients are getting the following error stac'2evel2 ow

    #CC

  • 8/16/2019 Interview Point

    97/204

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . Where would you loo' to find out if a redo log was corru$ted assuming you are using C $rograms duringstartu$ in this situation, you must chec' the alertM&!DN.log file for this information.

    &core2 @@@@@@@@@@@@ omment2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 

    . 6ou attem$t to add a datafile and get2

    evel2 !ntermediate

  • 8/16/2019 Interview Point

    98/204

    What is the $roblem and how do you fi( it?

    #($ected answer2 he number of D+ oc's is set by the initiali8ation $arameter D+@

  • 8/16/2019 Interview Point

    99/204

    !nterview average score2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ evel2 @@@@@@@@@@@@@@@@@@@@@@@@@ 

    omments2

    CDB+&I. What is Ceferential !ntegrity?in'ing one relation QtableR to another ty$ically involves an attribute that is common to bothrelations. he common attribute are usually a $rimary 'ey from one table and a foreign from other.

    Eoreign 'ey rules dictate that foreign 'ey values in one relation reference the $rimary 'ey values inanoher relation.

    I. What is :ormali8ation ? :ormali8ation is the $rocess to reduce data redundancy from the database. A database is callednormali8ed if each atomic data element a$$er only once in a database. here five levels of normali8ation.

    I. What is denormali8ation? Where do you use it?Denormali8ation is $rocess of brea'ing the normali8ation rules to gain $erformance increases. Bydenormali8ing database $to some e(tents may im$rove retrieval $erformance of the database.

    I. What are the advantages of using

  • 8/16/2019 Interview Point

    100/204

    connect system $rivilege enables resource system $rivilege enablesA#C &&!#C  C#A# I#:# C#A# AB#C#A# &&!>#C  C#A# AB# :!+!#D AB#&0A#C#A# ;!#WC#A# &6:ive e(am$les.

    he definitions of certain ob)ects , such as views and $rocedures, reference other ob)ects such astables. herefore some ob)ects are de$endent on the ob)ects referenced in their definition this is calledob)ect de$endencies.

    I. What is a database instance?he combination of &>A Qmemory areaR and bac'ground $rocesses Qserver $rocessesR is calleddatabase instance.

    I. What is user role and what are they used for?

    ser role is one that created for a grou$ of database users with common $rivilege requirements. ser  $rivilege management is controlled by granting a$$lication roles and $rivileges to the user role andthen granting the user role to different users.

    I. =ow can you store long binary ob)ects in a database?

    With the use of long raw dataty$e we can store long binary ob)ects in a database.

    I. #($lain !nde(es and cluster and their ty$es.

    !nde(es are o$tional structures associated with tables and clusters.We can create inde(es e($licitly tos$eed &ql statement e(ecution on a table.Because an oracle inde( $rovides a faster $athQactual $hysical address of row R to table data.!f $ro$erly used , !nde(es are $rimary means of reducing dis' !4

  • 8/16/2019 Interview Point

    101/204

    A cluster is a grou$ of tables that share the same data bloc's because they share common columnsand are often used together.Because clusters store related rows of different tables together in the samedatabloc' two $rimary benefits are achieved when clusters are $ro$erly used.

    % Dis' !4< is reduced and access time im$roves for )oins of clustered tables.% ess storage is required in memory.y$es of cluster are !nde(ed cluster and hash cluster.

    I. What is hashing technique?

    A hash cluster stores related rows together in the same databloc's.Cows in hash cluster are storedtogether based on their hash value. his hash value is achieved by oracle by a$$lying hash 'ey valueto the hash function.

    I. #($lain 0EC## and 0D.

    0EC## and 0D are two storage management $arameters to control the use of free s$acefor insert of and u$date to rows of data bloc's.hese $arameters we can s$ecify in create4alter table ,inde( or cluster commands.

    I. What is the difference between &>A and 0>A? what is a shared $ool area?&>A is shared memory region allocated by oracle that contains data and control information for one oracle instance.

    0>A Q$rogram global areaR is memory buffer that contains data and control information for a server  $rocess.he &hared $ool area is an area in &>A that contains constructs such as shared sql areas and the datadioctionary cache.&hared sql area contains the $arse tree and e(ecution $lan for a single sql statrement.

    I. What is a rollbac' segment and what is its use?

    Collbac' segment is a $ortion of database that records the actions of a transaction that should berolled bac' under certain circumstances. hey are used to $rovide read consistancy, to rollbac' transaction , and to recover the database.

    I. What is meant by a distributed database?

    A distributed database is a set of databases stored on multi$le com$uters. he data on severalcom$uter can be simultaneously accessed and modified using a networ'.

    I. What is a two%$hase%commit.

    wo $hase commit mechanism guarantees that all the database servers $artici$ating in distributedtransaction either all commit or rollbac' the statement in transaction.&o with this mechanism data will be synchroni8ed at all the $laces.

    I. What is a $ac'age and state its advantages.

    Page 101 of 204

  • 8/16/2019 Interview Point

    102/204

    A $ac'age may collect a set of related $rocedure and functions that serve as a subsystem to enforces$ecific business rules. Also $ac'age may contain standard dataty$es , e(ce$tions , variables , or cursors.

    0ac'ages are ty$ically constucted of two main $arts2 Package Specification 2 ontains declaration $art Package Body 2 !m$lements the $ac'age s$ecification

     Major advantages 2#asier a$$lication develo$ment#nca$sulation and !nformation hidingBetter $erformance#asier +aintananceO #asier a$$lication develo$ment 0ac'ages allow to grou$ logically related functions and $rocedures into a single named module. #ach

     $ac'age has a clearly defined s$ecification that is easy to understand and $rovides an interface that issim$le , clear and well%defined. !n short $ac'age allows a moduler $rogramming a$$roach whichma'es a$$lication develo$ment organi8ed and easier.O #nca$sulation and !nformation hiding  0ac'ages allow enca$sulation of access to $ac'age contents and the hiding of information thatshould not be accessed outside the $ac'age boundries. he $ac'age s$ecification defines all theob)ects that are public Qaccessible outside $ac'ageR. he $ac'age body hides details of the $ac'agecontents and the definition of $rivate $rogram ob)ects so that only the $ac'age contents are affected if the $ac'age body changes. Also by hiding body details , the integrity of the $ac'age is itself $rotectedfrom acsidental modifications at runtime.O Better $erformance

      When a $ac'aged $rocedure or function is called in a session for the first time, whole $ac'age isloaded into the memory. herefore subsequent calls to other $ac'aged ob)ect in that $ac'age arealready in memory and avoid any more dis' access.O #asier +aintanance 0ac'ages $rovide easier a$$lication maintanace because they sto$ cascading de$endencies that oftenoccure in stored $rocedures and functions. By avoiding cascading de$endencies unnecessaryrecom$ilations are avoided. Eor e(am$le, if you change a $rocedure or function and recom$ile it,

  • 8/16/2019 Interview Point

    103/204

      O im$lement com$le( security authori8ationsO maintain re$licate tables

    6ou can associate u$ to 1/ database triggers with a given table.

    I. What is a table ty$e? =ow do you declare it and what is its use?

  • 8/16/2019 Interview Point

    104/204

    I. !n a $ac'age s$ecification , there are $rocedures and rest are functions.=ow will you resrict theunauthorised users from calling / $rocedures out of .his is not $ossible because if the $rocedures are declared in s$ecification then those $rocedures are

     become global and there is no grant o$tion for restricting individual $rocedure within $ac'age.

    I. What are the different ty$es of able *oins? What is an outer )oin?.

    here four ty$es of table )oins.#qui *oin, :on #qui *oin, &elf *oin, ive e(am$le.

    !f a sub%query references any column of $arent query in its where clause then it is calles co%relatedsub%query. he sub%query is e(ecuted once for each row of $arent.

    Q. How Can you get a tree structured output from a query?

    With the use of connect by , $rior and start with clause we can get tree li'e structure.

    I. =ave you used $arallel query o$tion.

    he $arallel query o$tions distributes queries among the available $rocessors to com$lete com$le(tas's much more quic'ly than a single 0 can $rocess.

    I. Which are $sudo columns.

    Cownum, Cowid, :e(tval, urrval, evel

    Q. !at are t!e different rules w!ic! define an "#$%& 

    Q. !at is mutating ta'les ?

    A mutating table is a table that is currently being modified by an u$date, delete or insert statement or a table that might need to be u$dated by the effects of a declarative D### A&AD# referentialintegrity action.

    Q. !at are t!e differences 'etween (er ).* and (er ).+? :ew features of

  • 8/16/2019 Interview Point

    105/204

    Bitma$ !nde( 2 A bitma$ inde( $rovides $erformance im$rovement. A bitma$ inde( is most useful for tables with low cardinality columns Qcolumns that have a relatively small number of distinct valuesfor e( gender columnR.

    =ash *oins 2 he hash%)oin algorithm can $roduce better $erformance for com$le( queries than sort%merge )oin algorithm and nested%loo$s )oin algorithms. he hash%)oin algorithm considerd only by thecost%based o$timi8er, not by the rule%based o$timi8er.0artition ;iews 2 he $artition view feature enables users to divide a large table into a multi$lesmaller $artitions. sers and a$$lication can access the $artition views as a single ob)ect by using:!

  • 8/16/2019 Interview Point

    106/204

    ??oc'ing??&torage management

  • 8/16/2019 Interview Point

    107/204

    • he default si8e of the shared $ool is 7. +B is defined in shared@$ool@si8e $arameter of init.ora

    file.he ma(imum no of db lin's that can be used in a single query is set via o$en@lin's $arameter in

    init.ora file. it is not $ossible for one user to grant access on a $rivate db lin' to another user.

    7pes of 7ransations

    oncurrent transactions, discreet transaction

    he $arameter mode is always !: for cursor $arameters.

    Was to :ptimi,e the Quer

    • sing =ash )oins

    !n the init.ora file set hash@)oin@enabled H true

    • Bitma$$ed !nde(

  • 8/16/2019 Interview Point

    108/204

    /. $erforming data dictionary loo'u$s to chec' table and column definitions7. acquiring $arse loc's on required ob)ects so that their definitions do not change during the

    statementXs $arsing

    9. chec'ing $rivileges to access referenced schema ob)ects. determining the o$timal e(ecution $lan for the statement. loading it into a shared &I area. for distributed statements, routing all or $art of the statement to remote nodes that contain

    referenced data

    7R What is a ransaction in A stores all the redo log entries.

    iR Cedo og Eiles 22 Cedo log files are set of files that $rotect altered database data in memory thathas not been written to Data Eiles. hey are basically used for bac'u$ when a database crashes. )R 0rocess 22 A 0rocess is a 5thread of control5 or mechansim in

  • 8/16/2019 Interview Point

    109/204

    0rocedures do not Ceturn values while Eunctions return one

  • 8/16/2019 Interview Point

    110/204

    he e(clusive loc' is useful for loc'ing the row when an insert,u$date or delete is being done.hisloc' should not be a$$lied when we do only select from the row.&hare loc' 

    We can do the table as &hare@oc' as many share@loc's can be $ut on the same resource.

     Pre,ileges and /rants

    /1R 0revileges are the right to e(ecute a $articulare ty$e of &I statements.e.g 22 Cight to onnect, Cight to create, Cight to resource>rants are given to the ob)ects so that the ob)ect might be accessed accordingly.he grant has to begiven by the owner of the ob)ect.

    //Rable &$ace,Data Eiles,0arameter Eile, ontrol Eiles//Rable &$ace 22 he table s$ace is useful for storing the data in the database.When a database is

    created two table s$aces are created.&ystem able s$ace 22 his data file stores all the tables related to the system and dba tables bR ser able s$ace 22 his data file stores all the user related tablesWe should have se$erate table s$aces for storing the tables and inde(es so that the access is fast.Data Eiles 22 #very

  • 8/16/2019 Interview Point

    111/204

    !at are t!e Pct 0ree and Pct 1sed 

    /9R 0ct Eree is used to denote the $ercentage of the free s$ace that is to be left when creating a table.&imilarly 0ct sed is used to denote the $ercentage of the used s$ace that is to be used when creating

    a tableeg.22 0ctfree /3, 0ctused 93

    !at is "ow C!aining 

    /R he data of a row in a table may not be able to fit the same data bloc'.Data for row is stored in achain of data bloc's .

    !at is a 2 P!ase Commit 

    /R wo 0hase commit is used in distributed data base systems. his is useful to maintain the

    integrity of the database so that all the users see the same values. !t contains D+ statements or Cemote 0rocedural calls that reference a remote ob)ect. here are basically / $hases in a / $hasecommit.0re$are 0hase 22 >lobal coordinator as's $artici$ants to $re$areommit 0hase 22 ommit all $artici$ants to coordinator to 0re$ared, Cead only or abort Ce$ly

    !at is t!e difference 'etween deleting and truncating of ta'les

    /R Deleting a table will not remove the rows from the table but entry is there in the databasedictionary and it can be retrieved But truncating a table deletes it com$letely and it cannot beretrieved.

    !at are mutating ta'les

    /R When a table is in state of transition it is said to be mutating. eg 22 !f a row has been deleted thenthe table is said to be mutating and no o$erations can be done on the table e(ce$t select.

    !at are Codd "ules

    /FR odd Cules describe the ideal nature of a CDB+&. :o CDB+& satisfies all the 1/ codd rules and

  • 8/16/2019 Interview Point

    112/204

     #eleting t!e #uplicate rows in t!e ta'le

    7/R We can delete the du$licate rows in the table by using the Cowidan disable database trigger? =ow?77R 6es. With res$ect to tableA#C AB# AB#\ D!&AB# all@trigger ]What is $seudo columns ? :ame them?79R A $seudocolumn behaves li'e a table column, but is not actuallystored in the table. 6ou can select from $seudocolumns, but youcannot insert, u$date, or delete their values. his sectiondescribes these $seudocolumns2CC;A

     :#-;A#;#C

  • 8/16/2019 Interview Point

    113/204

    D#AC#  file=andler @E!#.E!#@60#KB#>!:

      file=andler 2H @E!#.E

  • 8/16/2019 Interview Point

    114/204

    racle Arc!itecture and Back ground Processes

    #very time a database is started on a database server, a memory area called the &ystem >lobal AreaQ&>AR is allocated and one or more A andthe

  • 8/16/2019 Interview Point