Sie sind auf Seite 1von 74

Oracle Interview Questions : The Interviewers Prespective

"We're interviewing an Oracle guy tomorrow, can you give me a few questions to ask him?" Not an uncommon request. The pro lem is, there are literally thousan!s of potential Oracle questions, ut it all !epen!s on what are you trying to achieve. "o # pushe! ack$ "What kin! of Oracle%relate! skills woul! the can!i!ate nee! that you want to ask for?" "&ou tell us. We 'ust want to know if he knows Oracle. Whatever an Oracle guy woul! nee! to know." (retty soon thereafter # figure! out that it was a pointless conversation to continue, although # !i! love the way he summari)e! !o)ens of very !ifferent positions into that one term$ "Oracle *uy." Nevertheless, it got me thinking. What makes for a goo! technical question? # have con!ucte!, or een invite! to, several interviews, so it got me to thinking a out which questions were most effective at getting to the heart of the matter$ "Will this can!i!ate succee! technically in this role?" +lements of a *oo! Technical #nterview ,uestion. -. .ust require knowle!ge of the area, inclu!ing !omain an! philosophy, to solve. # !on't think it's enough that a can!i!ate !emonstrates proficiency with the technology. # like to see if they un!erstan! the overall philosophy of the pro!uct /Oracle, in this case0$ What nee!s was it meant to provi!e, what kin! of pro lems was it !esigne! to solve, how !oes it accomplish those tasks. 1. .ust require overall technical skill2e3perience2un!erstan!ing to solve. # mean to say that a goo! question shows if the can!i!ate un!erstan!s /for e3ample0 relational !ata ases themselves, not 'ust a particular relational !ata ase. 4arrying this e3ample, !oes your 455 !eveloper un!erstan! algorithms an! software !esign? 6. 7oes not require knowle!ge of precise synta3 #n my min!, anyone can look something up in a manual. &ou !on't nee! to walk into an empty oar!room an! know e3actly how something is calle!. # !on't think knowle!ge of synta3 is a relia le in!icator of the suita ility of a can!i!ate. 8or e3ample, you coul! have a goo! can!i!ate " lank out" on the syntactic !etails, an! you coul! also have a a! can!i!ate who swallowe! a reference manual the night efore the interview. Now, # woul! e worrie! if the can!i!ate !i!n't know 9:"#4 synta3. 9ut # !on't want to waste precious time asking asic questions, an! if he is truly is that ine3perience!, # shoul! e a le to figure it out in other ways. ;. 4an e answere! quickly. Time is precious in an interview, an! you shoul!n't nee! long, convolute! questions to !etermine whether or not a can!i!ate "gets it." : goo! question !emonstrates quickly if the can!i!ate is on the right path, or woul!n't get it regar!less of how much time he ha!. <. #s not a "gotcha" #'ve met some interviewers that seem to use the opportunity not to evaluate the can!i!ate, ut to prove how clever they are /either to the can!i!ate or the manager0. They !o this y asking really o scure tricks, sometimes referre! to as "gotchas." The pro lem with asking questions in the o scure corners is that even very e3perience! can!i!ates may not have worke! in that area an!, if they have, may not have stum le! across that particular gem. =ust remem er, the purpose of the interview isn't to make &O> look clever, an! asking silly questions might make a great can!i!ate think "what kin! of clown show am # getting myself into?" ?. @as many possi le solutions an! approaches The most effective questions # have ever aske!, or een aske!, were the ones that triggere! lively technical !iscussions etween the interviewer an! the can!i!ate. Why? &ou get to catch a glimpse not only of the can!i!ates thinking process, ut also how he communicates. # also like the a!!e! enefit of not punishing /in fact, rewar!ing0 those that approach pro lems !ifferently than the interviewer.

Page 1 of 74

A. Bequires asking for more information /or make assumptions0. (ersonally, # elieve one of the keys to success in #T is to !efine a pro lem efore approaching it. That's why # lean towar!s these types of questions. 7i! the can!i!ate come ack, or 'ust try to solve it? #f he came ack, what kin! of questions !i! he ask? #n the face of an incompletely%!efine! pro lem, !i! he get stuck, or !i! he make some assumptions an! continue? #f so, what assumptions !i! he make? C. #s relevant to the usiness2'o eing consi!ere!

Woul! you hire a cleaning service with awar!%winning carpet cleaning if you ha! har!woo! floors? Woul! you hire a running ack who e3cels in a! weather if you playe! in a !ome? Woul! you hire an accomplishe! science%fiction writer to author your iography? No? Then why pro e for technical skills that !on't !irectly apply to the position you're attempting to fill? 4losing Thoughts #nci!entally, in the en! # referre! the manager in question to a couple of links which have hun!re!s of Oracle%interview questions. &ou can pick your favourites ut, more likely, you can rea! them until you come up with goo! i!eas that suit your nee!s. http$22www.orafaq.com2forum2t2DA?E212 http$22www.!ata ase'ournal.com2features2oracle2article.php26EC<-A:s an asi!e, that last article was written y one of my preferre! columnists, =ames Foopmann. @e hasn't written much recently, ut check out his archives, he's got some great articles there. 8or instance, check out his series on Oracle "ession Tracing. Set 1 Oracle Technical #nterview ,uestions :nswere! G (art=ames Foopmann, 'koopmannHqwest.net

The interview process can e quite stressful. @ere is the first part of a two part series on helping you answer those tough questions that you might e3perience in your quest for an Oracle 79: position. +ver since # wrote the past article on the Oracle Technical #nterview, # have een om ar!e! with e%mails asking for help on getting through the interview questions that # presente!. .ost of you # have answere!, others # was reluctant to post all of the answers so that you coul! egin your own quest for the answers. Now, however, # have !eci!e! to post the answers knowing that we can all enefit from them. #f there are any questions here that you still nee! clarification on, please e%mail me an! # will !o my est to further e3plain the answer # have given. (lease remem er that as you go through the article, it is not enough to know the answer to a particular question, you must try an! put yourself in an interview situation an! e3perience answering the question for yourself. Therefore, after you have gone through the questions an! answers rea! the question yourself an! then answer it with your own wor!s. :s always, goo! luck, an! cheers. (ersonal This part of the interview question is not to e regar!e! as insignificant. #f the interviewer asks you these questions take it as a sign that they are intereste! in you, your qualities, an! how you interact with people throughout the !ay. Take it as an opportunity to prove that you have een aroun! the lock a few times, are willing to work with other people, an! en'oy the 'o you !o. .any times people see 79: types as stuffy an! pointe!, not willing to work with others, an! only concerne! with the !ata ase an! its !ay%to%!ay operational nee!s. (ut asi!e the nee!s of the !ata ase an! talk a out how you work with people an! the !ifferent !epartments in the organi)ation an! are concerne! with provi!ing them with top notch !ata ase services. -. What 79: activities !i! you to !o to!ay?

Wow, this is a loa!e! question an! almost egs for you to answer it with "What 79: activities !o you I#F+ to !o on a !aily asis?." :n! that is how # woul! answer this question. :gain, !o not get caught up in the "typical" !ay%to%!ay operational issues of !ata ase a!ministration. "ure, you can talk a out the in!e3 you re uilt, the monitoring of system an! session waits that were occurring, or the space you a!!e! to a !ata file, these are all goo! an! great an! you shoul! convey that you un!erstan! the !ay%to%!ay operational issues. What you shoul! also throw into this answer are the meetings that you atten! to provi!e !irection in the !ata ase arena, the people that you meet an! talk with !aily to answer a!hoc questions a out !ata ase use, the mo!eling of usiness nee!s within the !ata ase, an! the e3tra time

Page 2 of 74

you spen! early in the morning or late at night to get the 'o !one. =ust ecause the question stipulates "to!ay" !o not take "to!ay" to mean "to!ay." .ake sure you wrap up a few goo! !ays into "to!ay" an! talk a out them. This question also egs you to ask the question of "What typical 79: activities are performe! !ay to !ay within J 4orporation?" 1. What is your typical !ay like?

#f you spen! enough time on question -, this question will never e aske!. #t is really a continuation of question - to try an! get you to open up an! talk a out the type of things you like to !o. (ersonally, # woul! continue with the theme of question - if you are cut short or this question is aske! later in the interview process. =ust note that this question is not all geare! towar! the !ay%to%!ay operational issues you e3perience as a 79:. This question also gives you the opportunity to see if they want to know a out you as an in!ivi!ual. "ince the question !i! not stipulate "on the 'o " # woul! throw in a few items like, # get up at <$EEam to get into work an! get some quiet time to rea! up on new tren!s or you help coach your son2!aughter's soccer team. =ust test the waters to what is accepta le. #f the interviewer starts to pull you ack to "'o " relate! issues, !o not go to personal. :lso, if you go to the office of the interviewer please notice the surroun!ings, if there are pictures of his2her family, it is pro a ly a goo! i!ea to venture !own the personal path. #f there is a fly%fishing picture on the wall, !o not say you like !eep%sea fishing. &ou get the picture. 6. What other parts of your organi)ation !o you interact with an! how?

:gain, if you have e3hauste! question - an! 1 you may never get to this question. 9ut if you have een apprehensive to opening up an! e3plaining yourself, take note that you may have an issue an! the interviewer might also e alrea!y getting tire! of the interview process. #f you get to this question consi!er yourself in trou le. &ou really nee! to forget all your hang%ups an! start e3plaining what it is that you like to !o as a 79:, an! why you want to work for this particular company. &ou are going to have to reel this interviewer ack into the interview process or you might not get to the true technical question part of the interview. ;. 7o you consi!er yourself a !evelopment 79: or a pro!uction 79: an! why?

# take this as a trick question an! e3plain it that way. Never in my !ata ase carrier have # !istinguishe! etween "!evelopment" an! "pro!uction." =ust ask your !evelopment staff or K( of engineering how much time an! money is lost if !evelopment systems are !own. +3plain to the interviewer that oth systems are equally important to the operation of the company an! oth shoul! e consi!ere! as pro!uction systems ecause there are people relying on them an! money is lost if either one of them is !own. Ok you may e saying, an! # know you are, that we lose more money if the pro!uction system is !own. Ok, convey that to the interviewer an! you won't get anyone to !isagree with you unless your company sells software or there are million !ollar !eals on the ta le that are e3pecting the ne3t release of your pro!uct or service. <. :re you a nuts%n% olts 79: or a tools%n%props 79:

This question egs for me to give !efinition aroun! the terms # asically group 79:s into. These are not goo! or a! groups ut something # like to think a out when talking to 79:s. : nuts%n% olts 79: is the type that likes to figure out every little item a out how the !ata ase works. @e2she is a 79: who typically hates a *># environment an! prefers the comman! line to e3ecute comman!s an! accomplish tasks. : nuts%n% olts 79: like to feel in control of the !ata ase an! only feels comforta le at the comman! line an! vi as an e!itor. The tools%n%props 79: is mostly the opposite of a nuts%n% olts 79:, they like the feel of a *>#, the ease at which things can e accomplishe! without knowing much a out the !ata ase. They want to get the 'o !one with the least amount of intervention from having to figure out what everything is !oing ehin! the scenes. Now the answer, # woul! e3plain myself as a com ination of the two. #, having een in this usiness for over 1E years, have grown up in a comman! line era where the *>#s never seeme! to work. There was high comple3ity in systems an! not much goo! !ocumentation on how things worke!. Thus, # ha! to learn everything a out most aspects of the !ata ase environment # was working in an! thus ecame a nuts%n% olts 79:. # was a true comman! line an! vi igot. Times have change! an! the *>#s are very relia le, un!erstan! the environment they are installe! on, an! can generally get the 'o !one quicker for in!ivi!uals new to !ata ase a!ministration. # too am slowly slipping over to the !ark si!e of *># a!ministration. #f you fin! yourself as a tools%n%props 79:, try to convey that you are aware of some tasks that require you to e a nuts%n% olts 79:. Technical G Oracle This is the part you have all een waiting on. (lease if you have 'ust skippe! to this section, go ack to the personal section an! rea! it. There is much to e gaine! y the personal section an! conveying to your interviewer who you are an! how you tick from !ay to !ay. :lso, the answers # am giving here are off the cuff an! are not inten!e! to e the !efinitive answer to these questions. There are many aspects to these questions that 'ust cannot e answere! here an! honestly, you will not have time to e3plain any of these questions fully in the interview process. #t is up to you to make sure your interviewer un!erstan!s that you un!erstan! the question an! have given enough information that they know you un!erstan! the concept. -. +3plain the !ifference etween a hot ackup an! a col! ackup an! the enefits associate! with each.

Page 3 of 74

: hot ackup is asically taking a ackup of the !ata ase while it is still up an! running an! it must e in archive log mo!e. : col! ackup is taking a ackup of the !ata ase while it is shut !own an! !oes not require eing in archive log mo!e. The enefit of taking a hot ackup is that the !ata ase is still availa le for use while the ackup is occurring an! you can recover the !ata ase to any point in time. The enefit of taking a col! ackup is that it is typically easier to a!minister the ackup an! recovery process. #n a!!ition, since you are taking col! ackups the !ata ase !oes not require eing in archive log mo!e an! thus there will e a slight performance gain as the !ata ase is not cutting archive logs to !isk. 1. &ou have 'ust ha! to restore from ackup an! !o not have any control files. @ow woul! you go a out ringing up this !ata ase? # woul! create a te3t ase! ackup control file, stipulating where on !isk all the !ata files where an! then issue the recover comman! with the using ackup control file clause. 6. @ow !o you switch from an init.ora file to a spfile?

#ssue the create spfile from pfile comman!. ;. +3plain the !ifference etween a !ata lock, an e3tent an! a segment.

: !ata lock is the smallest unit of logical storage for a !ata ase o 'ect. :s o 'ects grow they take chunks of a!!itional storage that are compose! of contiguous !ata locks. These groupings of contiguous !ata locks are calle! e3tents. :ll the e3tents that an o 'ect takes when groupe! together are consi!ere! the segment of the !ata ase o 'ect. <. *ive two e3amples of how you might !etermine the structure of the ta le 7+(T.

>se the !escri e comman! or use the ! msLmeta!ata.getL!!l package. ?. Where woul! you look for errors from the !ata ase engine?

#n the alert log. A. 4ompare an! contrast TB>N4:T+ an! 7+I+T+ for a ta le.

9oth the truncate an! !elete comman! have the !esire! outcome of getting ri! of all the rows in a ta le. The !ifference etween the two is that the truncate comman! is a 77I operation an! 'ust moves the high water mark an! pro!uces a now roll ack. The !elete comman!, on the other han!, is a 7.I operation, which will pro!uce a roll ack an! thus take longer to complete. C. *ive the reasoning ehin! using an in!e3.

8aster access to !ata locks in a ta le. D. *ive the two types of ta les involve! in pro!ucing a star schema an! the type of !ata they hol!.

8act ta les an! !imension ta les. : fact ta le contains measurements while !imension ta les will contain !ata that will help !escri e the fact ta les. -E. . What type of in!e3 shoul! you use on a fact ta le? : 9itmap in!e3. --. *ive two e3amples of referential integrity constraints. : primary key an! a foreign key. -1. : ta le is classifie! as a parent ta le an! you want to !rop an! re%create it. @ow woul! you !o this without affecting the chil!ren ta les? 7isa le the foreign key constraint to the parent, !rop the ta le, re%create the ta le, ena le the foreign key constraint. -6. +3plain the !ifference etween :B4@#K+IO* mo!e an! NO:B4@#K+IO* mo!e an! the enefits an! !isa!vantages to each. :B4@#K+IO* mo!e is a mo!e that you can put the !ata ase in for creating a ackup of all transactions that have occurre! in the !ata ase so that you can recover to any point in time. NO:B4@#K+IO* mo!e is asically the a sence

Page 4 of 74

of :B4@#K+IO* mo!e an! has the !isa!vantage of not eing a le to recover to any point in time. NO:B4@#K+IO* mo!e !oes have the a!vantage of not having to write transactions to an archive log an! thus increases the performance of the !ata ase slightly. -;. What comman! woul! you use to create a ackup control file? :lter !ata ase ackup control file to trace. -<. *ive the stages of instance startup to a usa le state where normal users may access it. "T:BT>( NO.O>NT % #nstance startup "T:BT>( .O>NT % The !ata ase is mounte! "T:BT>( O(+N % The !ata ase is opene! -?. What column !ifferentiates the KM views to the *KM views an! how? The #N"TL#7 column which in!icates the instance in a B:4 environment the information came from. -A. @ow woul! you go a out generating an +J(I:#N plan? 4reate a plan ta le with utl3plan.sql. >se the e3plain plan set statementLi! N 'tst-' into planLta le for a ",I statement Iook at the e3plain plan with utl3plp.sql or utl3pls.sql -C. @ow woul! you go a out increasing the uffer cache hit ratio? >se the uffer cache a!visory over a given workloa! an! then query the vM! LcacheLa!vice ta le. #f a change was necessary then # woul! use the alter system set ! LcacheLsi)e comman!. -D. +3plain an OB:%E-<<< &ou get this error when you get a snapshot too ol! within roll ack. #t can usually e solve! y increasing the un!o retention or increasing the si)e of roll acks. &ou shoul! also look at the logic involve! in the application getting the error message. 1E. +3plain the !ifference etween MOB:4I+L@O.+ an! MOB:4I+L9:"+. OB:4I+L9:"+ is the root !irectory for oracle. OB:4I+L@O.+ locate! eneath OB:4I+L9:"+ is where the oracle pro!ucts resi!e. 7ecem er -1, 1EE6 Oracle Technical #nterview ,uestions :nswere! % (art1 9y =ames Foopmann

This is the secon! part of the two part series on helping you answer those tough questions that you might e3perience in your quest for an Oracle 79: position. The Oracle Technical #nterview can e quite !aunting. &ou never quite know what to stu!y for an! how to prepare. # am fully aware of this, as # have receive! many emails since my original article on interview questions was release!. While these questions are only gui!elines as to what shoul! an! more than likely will e aske!, # hope that you fin! some comfort in the review of them. :s always, !o not 'ust memori)e the answers, as there are 'ewels to e foun! in the quest of figuring out the answer from the question. :s always, remem er that as you go through the article, it is not enough to know the answer to a particular questionO you must try to put yourself in an interview situation an! e3perience answering the question for yourself. Therefore, after you have gone through the questions an! answers rea! the question again an! then answer it with your own wor!s. :s always, goo! luck, an! cheers. Technical % Oracle Iast time, we answere! questions - thru 1E of the technical part of the interview. @ere are the ne3t 6E in this section. 7epen!ing on the moo! of the interview an! your a ility to ela orate on the answer, try to give some insight that you

Page 5 of 74

know more than 'ust the simple answer to some of these questions. :lso, e sensitive to the interviewer getting tire! of you talking too much. Well here they are. 1-. @ow woul! you !etermine the time )one un!er which a !ata ase was operating? select 79T#.+PON+ from !ualO 11. +3plain the use of setting *IO9:ILN:.+" equal to TB>+. "etting *IO9:ILN:.+" !ictates how you might connect to a !ata ase. This varia le is either TB>+ or 8:I"+ an! if it is set to TB>+ it enforces !ata ase links to have the same name as the remote !ata ase to which they are linking. 16. What comman! woul! you use to encrypt a (I2",I application? WB:( 1;. +3plain the !ifference etween a 8>N4T#ON, (BO4+7>B+ an! (:4F:*+. : function an! proce!ure are the same in that they are inten!e! to e a collection of (I2",I co!e that carries a single task. While a proce!ure !oes not have to return any values to the calling application, a function will return a single value. : package on the other han! is a collection of functions an! proce!ures that are groupe! together ase! on their commonality to a usiness function or application. 1<. +3plain the use of ta le functions. Ta le functions are !esigne! to return a set of rows through (I2",I logic ut are inten!e! to e use! as a normal ta le or view in a ",I statement. They are also use! to pipeline information in an +TI process. 1?. Name three a!visory statistics you can collect. 9uffer 4ache :!vice, "egment Ievel "tatistics, Q Time! "tatistics 1A. Where in the Oracle !irectory tree structure are au!it traces place!? #n uni3 MOB:4I+L@O.+2r! ms2au!it, in Win!ows the event viewer 1C. +3plain materiali)e! views an! how they are use!. .ateriali)e! views are o 'ects that are re!uce! sets of information that have een summari)e!, groupe!, or aggregate! from ase ta les. They are typically use! in !ata warehouse or !ecision support systems. 1D. When a user process fails, what ackgroun! process cleans up after it? (.ON 6E. What ackgroun! process refreshes materiali)e! views? The =o ,ueue (rocesses. 6-. @ow woul! you !etermine what sessions are connecte! an! what resources they are waiting for? >se of KM"+""#ON an! KM"+""#ONLW:#T 61. 7escri e what re!o logs are. Be!o logs are logical an! physical structures that are !esigne! to hol! all the changes ma!e to a !ata ase an! are inten!e! to ai! in the recovery of a !ata ase. 66. @ow woul! you force a log switch? :IT+B "&"T+. "W#T4@ IO*8#I+O 6;. *ive two metho!s you coul! use to !etermine what 77I changes have een ma!e. &ou coul! use Iogminer or "treams 6<. What !oes coalescing a ta lespace !o?

Page 6 of 74

4oalescing is only vali! for !ictionary%manage! ta lespaces an! !e%fragments space y com ining neigh oring free e3tents into large single e3tents. 6?. What is the !ifference etween a T+.(OB:B& ta lespace an! a (+B.:N+NT ta lespace? : temporary ta lespace is use! for temporary o 'ects such as sort structures while permanent ta lespaces are use! to store those o 'ects meant to e use! as the true o 'ects of the !ata ase. 6A. Name a ta lespace automatically create! when you create a !ata ase. The "&"T+. ta lespace. 6C. When creating a user, what permissions must you grant to allow them to connect to the !ata ase? *rant the 4ONN+4T to the user. 6D. @ow !o you a!! a !ata file to a ta lespace? :IT+B T:9I+"(:4+ Rta lespaceLnameS :77 7:T:8#I+ R!atafileLnameS "#P+ Rsi)eS ;E. @ow !o you resi)e a !ata file? :IT+B 7:T:9:"+ 7:T:8#I+ R!atafileLnameS B+"#P+ RnewLsi)eSO ;-. What view woul! you use to look at the si)e of a !ata file? 79:L7:T:L8#I+" ;1. What view woul! you use to !etermine free space in a ta lespace? 79:L8B++L"(:4+ ;6. @ow woul! you !etermine who has a!!e! a row to a ta le? Turn on fine grain au!iting for the ta le. ;;. @ow can you re uil! an in!e3? :IT+B #N7+J Rin!e3LnameS B+9>#I7O ;<. +3plain what partitioning is an! what its enefit is. (artitioning is a metho! of taking large ta les an! in!e3es an! splitting them into smaller, more managea le pieces. ;?. &ou have 'ust compile! a (I2",I package ut got errors, how woul! you view the errors? "@OW +BBOB" ;A. @ow can you gather statistics on a ta le? The :N:I&P+ comman!. ;C. @ow can you ena le a trace for a session? >se the 79."L"+""#ON."+TL",ILTB:4+ or >se :IT+B "+""#ON "+T ",ILTB:4+ N TB>+O ;D. What is the !ifference etween the ",ITIoa!er an! #.(OBT utilities? These two Oracle utilities are use! for loa!ing !ata into the !ata ase. The !ifference is that the import utility relies on the !ata eing pro!uce! y another Oracle utility +J(OBT while the ",ITIoa!er utility allows !ata to e loa!e! that has een pro!uce! y other utilities from !ifferent !ata sources 'ust so long as it conforms to :"4## formatte! or !elimite! files. <E. Name two files use! for network connection to a !ata ase. TN"N:.+".OB: an! ",IN+T.OB: Technical % >N#J +very 79: shoul! know something a out the operating system that the !ata ase will e running on. The questions here are relate! to >N#J ut you shoul! equally e a le to answer questions relate! to common Win!ows environments.

Page 7 of 74

-. @ow !o you list the files in an >N#J !irectory while also showing hi!!en files? ls %ltra 1. @ow !o you e3ecute a >N#J comman! in the ackgroun!? >se the "Q" 6. What >N#J comman! will control the !efault file permissions when files are create!? >mask ;. +3plain the rea!, write, an! e3ecute permissions on a >N#J !irectory. Bea! allows you to see an! list the !irectory contents. Write allows you to create, e!it an! !elete files an! su !irectories in the !irectory. +3ecute gives you the previous rea!2write permissions plus allows you to change into the !irectory an! e3ecute programs or shells from the !irectory. <. the !ifference etween a soft link an! a har! link? : sym olic /soft0 linke! file an! the targete! file can e locate! on the same or !ifferent file system while for a har! link they must e locate! on the same file system. ?. *ive the comman! to !isplay space usage on the >N#J file system. !f %lk A. +3plain iostat, vmstat an! netstat. #ostat reports on terminal, !isk an! tape #2O activity. Kmstat reports on virtual memory statistics for processes, !isk, tape an! 4(> activity. Netstat reports on the contents of network !ata structures. C. @ow woul! you change all occurrences of a value using K#? >se $Us2Rol!S2RnewS2g D. *ive two >N#J kernel parameters that effect an Oracle install "@..:J Q "@..N# -E. 9riefly, how !o you install Oracle software on >N#J. 9asically, set up !isks, kernel parameters, an! run orainst. # hope that these interview questions were not too har!. Bemem er these are "core" 79: questions an! not necessarily relate! to the Oracle options that you may encounter in some interviews. Take a close look at the requirements for any 'o an! try to e3tract questions that interviewers may ask from manuals an! real life e3periences. 8or instance, if they are looking for a 79: to run their !ata ases in B:4 environments, you shoul! try to !etermine what har!ware an! software they are using 9+8OB+ you get to the interview. This woul! allow you to rush up on particular environments an! not e caught off%guar!. *oo! luckV Set 1 #nterview ,uestions for Oracle, 79:, 7eveloper 4an!i!ates (I2",I ,uestions$ -. 7escri e the !ifference etween a proce!ure, function an! anonymous pl2sql lock. Ievel$ Iow

Page 8 of 74

+3pecte! answer $ 4an!i!ate shoul! mention use of 7+4I:B+ statement, a function must return a value while a proce!ure !oesn?t have to. 1. What is a mutating ta le error an! how can you get aroun! it? Ievel$ #nterme!iate +3pecte! answer$ This happens with triggers. #t occurs ecause the trigger is trying to up!ate a row it is currently using. The usual fi3 involves either use of views or temporary ta les so the !ata ase is selecting from one while up!ating the other. 6. 7escri e the use of UBOWT&(+ an! UT&(+ in (I2",I Ievel$ Iow +3pecte! answer$ UBOWT&(+ allows you to associate a varia le with an entire ta le row. The UT&(+ associates a varia le with a single column type. ;. What packages /if any0 has Oracle provi!e! for use y !evelopers? Ievel$ #nterme!iate to high +3pecte! answer$ Oracle provi!es the 79."L series of packages. There are many which !evelopers shoul! e aware of such as 79."L",I, 79."L(#(+, 79."LTB:N":4T#ON, 79."LIO4F, 79."L:I+BT, 79."LO>T(>T, 79."L=O9, 79."L>T#I#T&, 79."L77I, >TIL8#I+. #f they can mention a few of these an! !escri e how they use! them, even etter. #f they inclu!e the ",I routines provi!e! y Oracle, great, ut not really what was aske!. <. 7escri e the use of (I2",I ta les Ievel$ #nterme!iate +3pecte! answer$ (I2",I ta les are scalar arrays that can e reference! y a inary integer. They can e use! to hol! values for use in later queries or calculations. #n Oracle C they will e a le to e of the UBOWT&(+ !esignation, or B+4OB7. ?. When is a !eclare statement nee!e! ? Ievel$ Iow The 7+4I:B+ statement is use! in (I2",I anonymous locks such as with stan! alone, non%store! (I2",I proce!ures. #t must come first in a (I2",I stan! alone file if it is use!. A. #n what or!er shoul! a open2fetch2loop set of comman!s in a (I2",I lock e implemente! if you use the UNOT8O>N7 cursor varia le in the e3it when statement? Why? Ievel$ #nterme!iate +3pecte! answer$ O(+N then 8+T4@ then IOO( followe! y the e3it when. #f not specifie! in this or!er will result in the final return eing !one twice ecause of the way the UNOT8O>N7 is han!le! y (I2",I. C. What are ",I4O7+ an! ",I+BB. an! why are they important for (I2",I !evelopers? Ievel$ #nterme!iate +3pecte! answer$ ",I4O7+ returns the value of the error num er for the last error encountere!. The ",I+BB. returns the actual error message for the last error encountere!. They can e use! in e3ception han!ling to report, or, store in an error log ta le, the error that occurre! in the co!e. These are especially useful for the W@+N OT@+B" e3ception. D. @ow can you fin! within a (I2",I lock, if a cursor is open? Ievel$ Iow +3pecte! answer$ >se the U#"O(+N cursor status varia le. -E. @ow can you generate !e ugging output from (I2",I? Ievel$#nterme!iate to high +3pecte! answer$ >se the 79."LO>T(>T package. :nother possi le metho! is to 'ust use the "@OW +BBOB comman!, ut this only shows errors. The 79."LO>T(>T package can e use! to show interme!iate results from loops an! the status of varia les as the proce!ure is e3ecute!. The new package >TIL8#I+ can also e use!. --. What are the types of triggers? Ievel$#nterme!iate to high

Page 9 of 74

+3pecte! :nswer$ There are -1 types of triggers in (I2",I that consist of com inations of the 9+8OB+, :8T+B, BOW, T:9I+, #N"+BT, >(7:T+, 7+I+T+ an! :II key wor!s$ 9+8OB+ :II BOW #N"+BT :8T+B :II BOW #N"+BT 9+8OB+ #N"+BT :8T+B #N"+BT etc. 79:$ -. *ive one metho! for transferring a ta le from one schema to another$ Ievel$#nterme!iate +3pecte! :nswer$ There are several possi le metho!s, e3port%import, 4B+:T+ T:9I+... :" "+I+4T, or 4O(&. 1. What is the purpose of the #.(OBT option #*NOB+? What is it?s !efault setting? Ievel$ Iow +3pecte! :nswer$ The #.(OBT #*NOB+ option tells import to ignore "alrea!y e3ists" errors. #f it is not specifie! the ta les that alrea!y e3ist will e skippe!. #f it is specifie!, the error is ignore! an! the ta les !ata will e inserte!. The !efault value is N. 6. &ou have a roll ack segment in a version A.1 !ata ase that has e3pan!e! eyon! optimal, how can it e restore! to optimal? Ievel$ Iow +3pecte! answer$ >se the :IT+B T:9I+"(:4+ ..... "@B#NF comman!. ;. #f the 7+8:>IT an! T+.(OB:B& ta lespace clauses are left out of a 4B+:T+ >"+B comman! what happens? #s this a! or goo!? Why? Ievel$ Iow +3pecte! answer$ The user is assigne! the "&"T+. ta lespace as a !efault an! temporary ta lespace. This is a! ecause it causes user o 'ects an! temporary segments to e place! into the "&"T+. ta lespace resulting in fragmentation an! improper ta le placement /only !ata !ictionary o 'ects an! the system roll ack segment shoul! e in "&"T+.0. <. What are some of the Oracle provi!e! packages that 79:s shoul! e aware of? Ievel$ #nterme!iate to @igh +3pecte! answer$ Oracle provi!es a num er of packages in the form of the 79."L packages owne! y the "&" user. The packages use! y 79:s may inclu!e$ 79."L"@:B+7L(OOI, 79."L>T#I#T&, 79."L",I, 79."L77I, 79."L"+""#ON, 79."LO>T(>T an! 79."L"N:("@OT. They may also try to answer with the >TIT.",I or 4:TT.",I series of ",I proce!ures. These can e viewe! as e3tra cre!it ut aren?t part of the answer. ?. What happens if the constraint name is left out of a constraint clause? Ievel$ Iow +3pecte! answer$ The Oracle system will use the !efault name of "&"L43333 where 3333 is a system generate! num er. This is a! since it makes tracking which ta le the constraint elongs to or what the constraint !oes har!er. A. What happens if a ta lespace clause is left off of a primary key constraint clause? Ievel$ Iow +3pecte! answer$ This results in the in!e3 that is automatically generate! eing place! in then users !efault ta lespace. "ince this will usually e the same ta lespace as the ta le is eing create! in, this can cause serious performance pro lems. C. What is the proper metho! for !isa ling an! re%ena ling a primary key constraint? Ievel$ #nterme!iate +3pecte! answer$ &ou use the :IT+B T:9I+ comman! for oth. @owever, for the ena le clause you must specify the >"#N* #N7+J an! T:9I+"(:4+ clause for primary keys. D. What happens if a primary key constraint is !isa le! an! then ena le! without fully specifying the in!e3 clause? Ievel$ #nterme!iate

Page 10 of 74

+3pecte! answer$ The in!e3 is create! in the user?s !efault ta lespace an! all si)ing information is lost. Oracle !oesn?t store this information as a part of the constraint !efinition, ut only as part of the in!e3 !efinition, when the constraint was !isa le! the in!e3 was !roppe! an! the information is gone. -E. /On >N#J0 When shoul! more than one 79 writer process e use!? @ow many shoul! e use!? Ievel$ @igh +3pecte! answer$ #f the >N#J system eing use! is capa le of asynchronous #O then only one is require!, if the system is not capa le of asynchronous #O then up to twice the num er of !isks use! y Oracle num er of 79 writers shoul! e specifie! y use of the ! Lwriters initiali)ation parameter. --. &ou are using hot ackup without eing in archivelog mo!e, can you recover in the event of a failure? Why or why not? Ievel$ @igh +3pecte! answer$ &ou can?t use hot ackup without eing in archivelog mo!e. "o no, you coul!n?t recover. -1. What causes the "snapshot too ol!" error? @ow can this e prevente! or mitigate!? Ievel$ #nterme!iate +3pecte! answer$ This is cause! y large or long running transactions that have either wrappe! onto their own roll ack space or have ha! another transaction write on part of their roll ack space. This can e prevente! or mitigate! y reaking the transaction into a set of smaller transactions or increasing the si)e of the roll ack segments an! their e3tents. -6. @ow can you tell if a !ata ase o 'ect is invali!? Ievel$ Iow +3pecte! answer$ 9y checking the status column of the 79:L, :IIL or >"+BLO9=+4T" views, !epen!ing upon whether you own or only have permission on the view or are using a 79: account. -;. : user is getting an OB:%EED;1 error yet you know you have grante! them permission on the ta le, what else shoul! you check? Ievel$ Iow +3pecte! answer$ &ou nee! to check that the user has specifie! the full name of the o 'ect /select empi! from scott.empO instea! of select empi! from empO0 or has a synonym that points to the o 'ect /create synonym emp for scott.empO0 -<. : !eveloper is trying to create a view an! the !ata ase won?t let him. @e has the "7+K+IO(+B" role which has the "4B+:T+ K#+W" system privilege an! "+I+4T grants on the ta les he is using, what is the pro lem? Ievel$ #nterme!iate +3pecte! answer$ &ou nee! to verify the !eveloper has !irect grants on all ta les use! in the view. &ou can?t create a store! o 'ect with grants given through views. -?. #f you have an e3ample ta le, what is the est way to get si)ing !ata for the pro!uction ta le implementation? Ievel$ #nterme!iate +3pecte! answer$ The est way is to analy)e the ta le an! then use the !ata provi!e! in the 79:LT:9I+" view to get the average row length an! other pertinent !ata for the calculation. The quick an! !irty way is to look at the num er of locks the ta le is actually using an! ratio the num er of rows in the ta le to its num er of locks against the num er of e3pecte! rows. -A. @ow can you fin! out how many users are currently logge! into the !ata ase? @ow can you fin! their operating system i!? Ievel$ high +3pecte! answer$ There are several ways. One is to look at the vMsession or vMprocess views. :nother way is to check the currentLlogins parameter in the vMsysstat view. :nother if you are on >N#J is to !o a "ps %efWgrep oracleWwc %l? comman!, ut this only works against a single instance installation. -C. : user selects from a sequence an! gets ack two values, his select is$ "+I+4T pkLseq.ne3tval 8BO. !ualO

Page 11 of 74

What is the pro lem? Ievel$ #nterme!iate +3pecte! answer$ "omehow two values have een inserte! into the !ual ta le. This ta le is a single row, single column ta le that shoul! only have one value in it. -D. @ow can you !etermine if an in!e3 nee!s to e !roppe! an! re uilt? Ievel$ #nterme!iate +3pecte! answer$ Bun the :N:I&P+ #N7+J comman! on the in!e3 to vali!ate its structure an! then calculate the ratio of I8L9IFLI+N2I8L9IFLI+N59BL9IFLI+N an! if it isn?t near -.E /i.e. greater than E.A or so0 then the in!e3 shoul! e re uilt. Or if the ratio 9BL9IFLI+N2 I8L9IFLI+N59BL9IFLI+N is nearing E.6. ",I2 ",I(lus -. @ow can varia les e passe! to a ",I routine? Ievel$ Iow +3pecte! answer$ 9y use of the Q sym ol. 8or passing in varia les the num ers -%C can e use! /Q-, Q1,...,QC0 to pass the values after the comman! into the ",I(I>" session. To e prompte! for a specific varia le, place the ampersan!e! varia le in the co!e itself$ "select T from ! aLta les where ownerNQownerLnameO" . >se of !ou le ampersan!s tells ",I(I>" to resu stitute the value for each su sequent use of the varia le, a single ampersan! will cause a reprompt for the value unless an :44+(T statement is use! to get the value from the user. 1. &ou want to inclu!e a carriage return2linefee! in your output from a ",I script, how can you !o this? Ievel$ #nterme!iate to high +3pecte! answer$ The est metho! is to use the 4@B/0 function /4@B/-E0 is a return2linefee!0 an! the concatenation function "WW". :nother metho!, although it is har! to !ocument an! isn?t always porta le is to use the return2linefee! as a part of a quote! string. 6. @ow can you call a (I2",I proce!ure from ",I? Ievel$ #nterme!iate +3pecte! answer$ 9y use of the +J+4>T+ /short form +J+40 comman!. ;. @ow !o you e3ecute a host operating system comman! from within ",I? Ievel$ Iow +3pecte! answer$ 9y use of the e3clamation point "V" /in >N#J an! some other O"0 or the @O"T /@O0 comman!. <. &ou want to use ",I to uil! ",I, what is this calle! an! give an e3ample Ievel$ #nterme!iate to high +3pecte! answer$ This is calle! !ynamic ",I. :n e3ample woul! e$ set lines DE pages E termout off fee! ack off verify off spool !ropLall.sql select ?!rop user ?WWusernameWW? casca!eO? from ! aLusers where username not in /""&"?,?"&"T+.?0O spool off +ssentially you are looking to see that they know to inclu!e a comman! /in this case 7BO( >"+B...4:"4:7+O0 an! that you nee! to concatenate using the ?WW? the values selecte! from the !ata ase. ?. What ",I(lus comman! is use! to format output from a select? Ievel$ low +3pecte! answer$ This is est !one with the 4OI>.N comman!. A. &ou want to group the following set of select returns, what can you group on? .a3/sumLofLcost0, min/sumLofLcost0, count/itemLno0, itemLno Ievel$ #nterme!iate

Page 12 of 74

+3pecte! answer$ The only column that can e groupe! on is the "itemLno" column, the rest have aggregate functions associate! with them. C. What special Oracle feature allows you to specify how the cost ase! system treats a ",I statement? Ievel$ #nterme!iate to high +3pecte! answer$ The 4O"T ase! system allows the use of @#NTs to control the optimi)er path selection. #f they can give some e3ample hints such as 8#B"T BOW", :II BOW", >"#N* #N7+J, "T:B, even etter. D. &ou want to !etermine the location of i!entical rows in a ta le efore attempting to place a unique in!e3 on the ta le, how can this e !one? Ievel$ @igh +3pecte! answer$ Oracle ta les always have one guarantee! unique column, the rowi! column. #f you use a min2ma3 function against your rowi! an! then select against the propose! primary key you can squee)e out the rowi!s of the !uplicate rows pretty quick. 8or e3ample$ select rowi! from emp e where e.rowi! S /select min/3.rowi!0 from emp 3 where 3.empLno N e.empLno0O #n the situation where multiple columns make up the propose! key, they must all e use! in the where clause. -E. What is a 4artesian pro!uct? Ievel$ Iow +3pecte! answer$ : 4artesian pro!uct is the result of an unrestricte! 'oin of two or more ta les. The result set of a three ta le 4artesian pro!uct will have 3 T y T ) num er of rows where 3, y, ) correspon! to the num er of rows in each ta le involve! in the 'oin. --. &ou are 'oining a local an! a remote ta le, the network manager complains a out the traffic involve!, how can you re!uce the network traffic? Ievel$ @igh +3pecte! answer$ (ush the processing of the remote !ata to the remote instance y using a view to pre%select the information for the 'oin. This will result in only the !ata require! for the 'oin eing sent across. -1. What is the !efault or!ering of an OB7+B 9& clause in a "+I+4T statement? Ievel$ Iow +3pecte! answer$ :scen!ing -6. What is tkprof an! how is it use!? Ievel$ #nterme!iate to high +3pecte! answer$ The tkprof tool is a tuning tool use! to !etermine cpu an! e3ecution times for ",I statements. &ou use it y first setting time!Lstatistics to true in the initiali)ation file an! then turning on tracing for either the entire !ata ase via the sqlLtrace parameter or for the session using the :IT+B "+""#ON comman!. Once the trace file is generate! you run the tkprof tool against the trace file an! then look at the output from the tkprof tool. This can also e use! to generate e3plain plan output. -;. What is e3plain plan an! how is it use!? Ievel$ #nterme!iate to high +3pecte! answer$ The +J(I:#N (I:N comman! is a tool to tune ",I statements. To use it you must have an e3plainLta le generate! in the user you are running the e3plain plan for. This is create! using the utl3plan.sql script. Once the e3plain plan ta le e3ists you run the e3plain plan comman! giving as its argument the ",I statement to e e3plaine!. The e3plainLplan ta le is then querie! to see the e3ecution plan of the statement. +3plain plans can also e run using tkprof. -<. @ow !o you set the num er of lines on a page of output? The wi!th? Ievel$ Iow

Page 13 of 74

+3pecte! answer$ The "+T comman! in ",I(I>" is use! to control the num er of lines generate! per page an! the wi!th of those lines, for e3ample "+T (:*+"#P+ ?E I#N+"#P+ CE will generate reports that are ?E lines long with a line wi!th of CE characters. The (:*+"#P+ an! I#N+"#P+ options can e shortene! to (:*+" an! I#N+". -?. @ow !o you prevent output from coming to the screen? Ievel$ Iow +3pecte! answer$ The "+T option T+B.O>T controls output to the screen. "etting T+B.O>T O88 turns off screen output. This option can e shortene! to T+B.. -A. @ow !o you prevent Oracle from giving you informational messages !uring an! after a ",I statement e3ecution? Ievel$ Iow +3pecte! answer$ The "+T options 8++79:4F an! K+B#8& can e set to O88. -C. @ow !o you generate file output from ",I? Ievel$ Iow +3pecte! answer$ 9y use of the "(OOI comman! Tuning ,uestions$ -. : ta lespace has a ta le with 6E e3tents in it. #s this a!? Why or why not. Ievel$ #nterme!iate +3pecte! answer$ .ultiple e3tents in an! of themselves aren?t a!. @owever if you also have chaine! rows this can hurt performance. 1. @ow !o you set up ta lespaces !uring an Oracle installation? Ievel$ Iow +3pecte! answer$ &ou shoul! always attempt to use the Oracle 8le3i le :rchitecture stan!ar! or another partitioning scheme to ensure proper separation of "&"T+., BOII9:4F, B+7O IO*, 7:T:, T+.(OB:B& an! #N7+J segments. 6. &ou see multiple fragments in the "&"T+. ta lespace, what shoul! you check first? Ievel$ Iow +3pecte! answer$ +nsure that users !on?t have the "&"T+. ta lespace as their T+.(OB:B& or 7+8:>IT ta lespace assignment y checking the 79:L>"+B" view. ;. What are some in!ications that you nee! to increase the "@:B+7L(OOIL"#P+ parameter? Ievel$ #nterme!iate +3pecte! answer$ (oor !ata !ictionary or li rary cache hit ratios, getting error OB:%E;E6-. :nother in!ication is stea!ily !ecreasing performance with all other tuning parameters the same. <. What is the general gui!eline for si)ing ! L lockLsi)e an! ! LmultiL lockLrea! for an application that !oes many full ta le scans? Ievel$ @igh +3pecte! answer$ Oracle almost always rea!s in ?;k chunks. The two shoul! have a pro!uct equal to ?; or a multiple of ?;. ?. What is the fastest query metho! for a ta le? Ievel$ #nterme!iate +3pecte! answer$ 8etch y rowi! A. +3plain the use of TF(BO8? What initiali)ation parameter shoul! e turne! on to get full TF(BO8 output? Ievel$ @igh +3pecte! answer$ The tkprof tool is a tuning tool use! to !etermine cpu an! e3ecution times for ",I statements. &ou use it y first setting time!Lstatistics to true in the initiali)ation file an! then turning on tracing for either the entire !ata ase via the sqlLtrace parameter or for the session using the :IT+B "+""#ON comman!. Once the trace file is generate! you run the tkprof tool against the trace file an! then look at the output from the tkprof tool. This can also e use! to generate e3plain plan output.

Page 14 of 74

C. When looking at vMsysstat you see that sorts /!isk0 is high. #s this a! or goo!? #f a! %@ow !o you correct it? Ievel$ #nterme!iate +3pecte! answer$ #f you get e3cessive !isk sorts this is a!. This in!icates you nee! to tune the sort area parameters in the initiali)ation files. The ma'or sort are parameter is the "OBTL:B+:L"#Pe parameter. D. When shoul! you increase copy latches? What parameters control copy latches? Ievel$ high +3pecte! answer$ When you get e3cessive contention for the copy latches as shown y the "re!o copy" latch hit ratio. &ou can increase copy latches via the initiali)ation parameter IO*L"#.>IT:N+O>"L4O(#+" to twice the num er of 4(>s on your system. -E. Where can you get a list of all initiali)ation parameters for your instance? @ow a out an in!ication if they are !efault settings or have een change!? Ievel$ Iow +3pecte! answer$ &ou can look in the init.ora file for an in!ication of manually set parameters. 8or all parameters, their value an! whether or not the current value is the !efault value, look in the vMparameter view. --. 7escri e hit ratio as it pertains to the !ata ase uffers. What is the !ifference etween instantaneous an! cumulative hit ratio an! which shoul! e use! for tuning? Ievel$ #nterme!iate +3pecte! answer$ The hit ratio is a measure of how many times the !ata ase was a le to rea! a value from the uffers verses how many times it ha! to re%rea! a !ata value from the !isks. : value greater than CE%DEU is goo!, less coul! in!icate pro lems. #f you simply take the ratio of e3isting parameters this will e a cumulative value since the !ata ase starte!. #f you !o a comparison etween pairs of rea!ings ase! on some ar itrary time span, this is the instantaneous ratio for that time span. *enerally speaking an instantaneous rea!ing gives more valua le !ata since it will tell you what your instance is !oing for the time it was generate! over. -1. 7iscuss row chaining, how !oes it happen? @ow can you re!uce it? @ow !o you correct it? Ievel$ high +3pecte! answer$ Bow chaining occurs when a K:B4@:B1 value is up!ate! an! the length of the new value is longer than the ol! value an! won?t fit in the remaining lock space. This results in the row chaining to another lock. #t can e re!uce! y setting the storage parameters on the ta le to appropriate values. #t can e correcte! y e3port an! import of the effecte! ta le. -6. When looking at the estat events report you see that you are getting usy uffer waits. #s this a!? @ow can you fin! what is causing it? Ievel$ high +3pecte! answer$ 9uffer usy waits coul! in!icate contention in re!o, roll ack or !ata locks. &ou nee! to check the vMwaitstat view to see what areas are causing the pro lem. The value of the "count" column tells where the pro lem is, the "class" column tells you with what. >N7O is roll ack segments, 7:T: is !ata ase uffers. -;. #f you see contention for li rary caches how can you fi3 it? Ievel$ #nterme!iate +3pecte! answer$ #ncrease the si)e of the share! pool. -<. #f you see statistics that !eal with "un!o" what are they really talking a out? Ievel$ #nterme!iate +3pecte! answer$ Boll ack segments an! associate! structures. -?. #f a ta lespace has a !efault pctincrease of )ero what will this cause /in relationship to the smon process0? Ievel$ @igh +3pecte! answer$ The ".ON process won?t automatically coalesce its free space fragments. -A. #f a ta lespace shows e3cessive fragmentation what are some metho!s to !efragment the ta lespace? /A.-,A.1 an! A.6 only0 Ievel$ @igh

Page 15 of 74

+3pecte! answer$ #n Oracle A.E to A.1 The use of the 'alter session set events 'imme!iate trace name coalesce level tsX'O? comman! is the easiest way to !efragment contiguous free space fragmentation. The tsX parameter correspon!s to the tsX value foun! in the tsM "&" ta le. #n version A.6 the ?alter ta lespace coalesceO? is est. #f the free space isn?t contiguous then e3port, !rop an! import of the ta lespace contents may e the only way to reclaim non%contiguous free space. -C. @ow can you tell if a ta lespace has e3cessive fragmentation? Ievel$ #nterme!iate #f a select against the ! aLfreeLspace ta le shows that the count of a ta lespaces e3tents is greater than the count of its !ata files, then it is fragmente!. -D. &ou see the following on a status report$ re!o log space requests 16 re!o log space wait time E #s this something to worry a out? What if re!o log space wait time is high? @ow can you fi3 this? Ievel$ #nterme!iate +3pecte! answer$ "ince the wait time is )ero, no. #f the wait time was high it might in!icate a nee! for more or larger re!o logs. 1E. What can cause a high value for recursive calls? @ow can this e fi3e!? Ievel$ @igh +3pecte! answer$ : high value for recursive calls is cause y improper cursor usage, e3cessive !ynamic space management actions, an! or e3cessive statement re%parses. &ou nee! to !etermine the cause an! correct it 9y either relinking applications to hol! cursors, use proper space management techniques /proper storage an! si)ing0 or ensure repeat queries are place! in packages for proper reuse. 1-. #f you see a pin hit ratio of less than E.C in the estat li rary cache report is this a pro lem? #f so, how !o you fi3 it? Ievel$ #nterme!iate +3pecte! answer$ This in!icate that the share! pool may e too small. #ncrease the share! pool si)e. 11. #f you see the value for reloa!s is high in the estat li rary cache report is this a matter for concern? Ievel$ #nterme!iate +3pecte! answer$ &es, you shoul! strive for )ero reloa!s if possi le. #f you see e3cessive reloa!s then increase the si)e of the share! pool. 16. &ou look at the ! aLroll ackLsegs view an! see that there is a large num er of shrinks an! they are of relatively small si)e, is this a pro lem? @ow can it e fi3e! if it is a pro lem? Ievel$ @igh +3pecte! answer$ : large num er of small shrinks in!icates a nee! to increase the si)e of the roll ack segment e3tents. #!eally you shoul! have no shrinks or a small num er of large shrinks. To fi3 this 'ust increase the si)e of the e3tents an! a!'ust optimal accor!ingly. 1;. &ou look at the ! aLroll ackLsegs view an! see that you have a large num er of wraps is this a pro lem? Ievel$ @igh +3pecte! answer$ : large num er of wraps in!icates that your e3tent si)e for your roll ack segments are pro a ly too small. #ncrease the si)e of your e3tents to re!uce the num er of wraps. &ou can look at the average transaction si)e in the same view to get the information on transaction si)e. 1<. #n a system with an average of ;E concurrent users you get the following from a query on roll ack e3tents$ BOII9:4F 4>B +JT+NT" %%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% BE- -BE1 C BE6 -1 BE; D "&"T+. ; &ou have room for each to grow y 1E more e3tents each. #s there a pro lem? "houl! you take any action?

Page 16 of 74

Ievel$ #nterme!iate +3pecte! answer$ No there is not a pro lem. &ou have ;E e3tents showing an! an average of ;E concurrent users. "ince there is plenty of room to grow no action is nee!e!. 1?. &ou see multiple e3tents in the temporary ta lespace. #s this a pro lem? Ievel$ #nterme!iate +3pecte! answer$ :s long as they are all the same si)e this isn?t a pro lem. #n fact, it can even improve performance since Oracle won?t have to create a new e3tent when a user nee!s one. #nstallation24onfiguration -. 7efine O8:. Ievel$ Iow +3pecte! answer$ O8: stan!s for Optimal 8le3i le :rchitecture. #t is a metho! of placing !irectories an! files in an Oracle system so that you get the ma3imum fle3i ility for future tuning an! file placement. 1. @ow !o you set up your ta lespace on installation? Ievel$ Iow +3pecte! answer$ The answer here shoul! show an un!erstan!ing of separation of re!o an! roll ack, !ata an! in!e3es an! isolation os "&"T+. ta les from other ta les. :n e3ample woul! e to specify that at least A !isks shoul! e use! for an Oracle installation so that you can place "&"T+. ta lespace on one, re!o logs on two /mirrore! re!o logs0 the T+.(OB:B& ta lespace on another, BOII9:4F ta lespace on another an! still have two for 7:T: an! #N7+J+". They shoul! in!icate how they will han!le archive logs an! e3ports as well. :s long as they have a logical plan for com ining or further separation more or less !isks can e specifie!. 6. What shoul! e !one prior to installing Oracle /for the O" an! the !isks0? Ievel$ Iow +3pecte! :nswer$ a!'ust kernel parameters or O" tuning parameters in accor!ance with installation gui!e. 9e sure enough contiguous !isk space is availa le. ;. &ou have installe! Oracle an! you are now setting up the actual instance. &ou have een waiting an hour for the initiali)ation script to finish, what shoul! you check first to !etermine if there is a pro lem? Ievel$ #nterme!iate to high +3pecte! :nswer$ 4heck to make sure that the archiver isn?t stuck. #f archive logging is turne! on !uring install a large num er of logs will e create!. This can fill up your archive log !estination causing Oracle to stop to wait for more space. <. When configuring ",IN+T on the server what files must e set up? Ievel$ #nterme!iate +3pecte! answer$ #N#T#:I#P:T#ON file, TN"N:.+".OB: file, ",IN+T.OB: file ?. When configuring ",IN+T on the client what files nee! to e set up? Ievel$ #nterme!iate +3pecte! answer$ ",IN+T.OB:, TN"N:.+".OB: A. What must e installe! with O794 on the client in or!er for it to work with Oracle? Ievel$ #nterme!iate +3pecte! answer$ ",IN+T an! (BOTO4OI /for e3ample$ T4(#( a!apter0 layers of the transport programs. C. &ou have 'ust starte! a new instance with a large "*: on a usy e3isting server. (erformance is terri le, what shoul! you check for? Ievel$ #nterme!iate +3pecte! answer$ The first thing to check with a large "*: is that it isn?t eing swappe! out. D. What O" user shoul! e use! for the first part of an Oracle installation /on >N#J0? Ievel$ low

Page 17 of 74

+3pecte! answer$ &ou must use root first. -E. When shoul! the !efault values for Oracle initiali)ation parameters e use! as is? Ievel$ Iow +3pecte! answer$ Never --. @ow many control files shoul! you have? Where shoul! they e locate!? Ievel$ Iow +3pecte! answer$ :t least 1 on separate !isk spin!les. 9e sure they say on separate !isks, not 'ust file systems. -1. @ow many re!o logs shoul! you have an! how shoul! they e configure! for ma3imum recovera ility? Ievel$ #nterme!iate +3pecte! answer$ &ou shoul! have at least three groups of two re!o logs with the two logs each on a separate !isk spin!le /mirrore! y Oracle0. The re!o logs shoul! not e on raw !evices on >N#J if it can e avoi!e!. -6. &ou have a simple application with no "hot" ta les /i.e. uniform #O an! access requirements0. @ow many !isks shoul! you have assuming stan!ar! layout for "&"T+., >"+B, T+.( an! BOII9:4F ta lespaces? +3pecte! answer$ :t least A, see !isk configuration answer a ove. 7ata .o!eler$ -. 7escri e thir! normal form? Ievel$ Iow +3pecte! answer$ "omething like$ #n thir! normal form all attri utes in an entity are relate! to the primary key an! only to the primary key 1. #s the following statement true or false$ ":ll relational !ata ases must e in thir! normal form" Why or why not? Ievel$ #nterme!iate +3pecte! answer$ 8alse. While 6N8 is goo! for logical !esign most !ata ases, if they have more than 'ust a few ta les, will not perform well using full 6N8. >sually some entities will e !enormali)e! in the logical to physical transfer process. 6. What is an +B7? Ievel$ Iow +3pecte! answer$ :n +B7 is an +ntity%Belationship%7iagram. #t is use! to show the entities an! relationships for a !ata ase logical mo!el. ;. Why are recursive relationships a!? @ow !o you resolve them? Ievel$ #nterme!iate : recursive relationship /one where a ta le relates to itself0 is a! when it is a har! relationship /i.e. neither si!e is a "may" oth are "must"0 as this can result in it not eing possi le to put in a top or perhaps a ottom of the ta le /for e3ample in the +.(IO&++ ta le you coul!n?t put in the (B+"#7+NT of the company ecause he has no oss, or the 'unior 'anitor ecause he has no su or!inates0. These type of relationships are usually resolve! y a!!ing a small intersection entity. <. What !oes a har! one%to%one relationship mean /one where the relationship on oth en!s is "must"0? Ievel$ Iow to interme!iate +3pecte! answer$ This means the two entities shoul! pro a ly e ma!e into one entity. ?. @ow shoul! a many%to%many relationship e han!le!? Ievel$ #nterme!iate +3pecte! answer$ 9y a!!ing an intersection entity ta le

Page 18 of 74

A. What is an artificial /!erive!0 primary key? When shoul! an artificial /or !erive!0 primary key e use!? Ievel$ #nterme!iate +3pecte! answer$ : !erive! key comes from a sequence. >sually it is use! when a concatenate! key ecomes too cum ersome to use as a foreign key. C. When shoul! you consi!er !enormali)ation? Ievel$ #nterme!iate +3pecte! answer$ Whenever performance analysis in!icates it woul! e eneficial to !o so without compromising !ata integrity. >N#J$ -. @ow can you !etermine the space left in a file system? Ievel$ Iow +3pecte! answer$ There are several comman!s to !o this$ !u, !f, or !f 1. @ow can you !etermine the num er of ",IN+T users logge! in to the >N#J system? Ievel$ #nterme!iate +3pecte! answer$ ",IN+T users will show up with a process unique name that egins with oracle, if you !o a ps %efW grep oracleWwc %l you can get a count of the num er of users. 6. What comman! is use! to type files to the screen? Ievel$ Iow +3pecte! answer$ cat, more, pg ;. What comman! is use! to remove a file? Ievel$ Iow +3pecte! answer$ rm <. 4an you remove an open file un!er >N#J? Ievel$ Iow +3pecte! answer$ yes ?. @ow !o you create a !ecision tree in a shell script? Ievel$ interme!iate +3pecte! answer$ !epen!ing on shell, usually a case%esac or an if%en!if or fi structure A. What is the purpose of the grep comman!? Ievel$ Iow +3pecte! answer$ grep is a string search comman! that parses the specifie! string from the specifie! file or files C. The system has a program that always inclu!es the wor! nocomp in its name, how can you !etermine the num er of processes that are using this program? Ievel$ interme!iate +3pecte! answer$ ps %efWgrep TnocompTWwc %l D. What is an ino!e? Ievel$ #nterme!iate +3pecte! answer$ an ino!e is a file status in!icator. #t is store! in oth !isk an! memory an! tracts file status. There is one ino!e for each file on the system. -E. The system a!ministrator tells you that the system hasn?t een re oote! in ? months, shoul! he e prou! of this? Ievel$ @igh

Page 19 of 74

+3pecte! answer$ .ay e. "ome >N#J systems !on?t clean up well after themselves. #no!e pro lems an! !ea! user processes can accumulate causing possi le performance an! corruption pro lems. .ost >N#J systems shoul! have a sche!ule! perio!ic re oot so file systems can e checke! an! cleane! an! !ea! or )om ie processes cleare! out. --. What is re!irection an! how is it use!? Ievel$ #nterme!iate +3pecte! answer$ re!irection is the process y which input or output to or from a process is re!irecte! to another process. This can e !one using the pipe sym ol "W", the greater than sym ol "S" or the "tee" comman!. This is one of the strengths of >N#J allowing the output from one comman! to e re!irecte! !irectly into the input of another comman!. -1. @ow can you fin! !ea! processes? Ievel$ #nterme!iate +3pecte! answer$ ps %efWgrep )om ie %% or %% who %! !epen!ing on the system. -6. @ow can you fin! all the processes on your system? Ievel$ Iow +3pecte! answer$ >se the ps comman! -;. @ow can you fin! your i! on a system? Ievel$ Iow +3pecte! answer$ >se the "who am i" comman!. -<. What is the finger comman!? Ievel$ Iow +3pecte! answer$ The finger comman! uses !ata in the passw! file to give information on system users. -?. What is the easiest metho! to create a file on >N#J? Ievel$ Iow +3pecte! answer$ >se the touch comman! -A. What !oes SS !o? Ievel$ #nterme!iate +3pecte! answer$ The "SS" re!irection sym ol appen!s the output from the comman! specifie! into the file specifie!. The file must alrea!y have een create!. -C. #f you aren?t sure what comman! !oes a particular >N#J function what is the est way to !etermine the comman!? +3pecte! answer$ The >N#J man %k comman! will search the man pages for the value specifie!. Beview the results from the comman! to fin! the comman! of interest. Oracle Trou leshooting$ -. @ow can you !etermine if an Oracle instance is up from the operating system level? Ievel$ Iow +3pecte! answer$ There are several ase Oracle processes that will e running on multi%user operating systems, these will e smon, pmon, ! wr an! lgwr. :ny answer that has them using their operating system process showing feature to check for these is accepta le. 8or e3ample, on >N#J a ps %efWgrep ! wr will show what instances are up. 1. >sers from the (4 clients are getting messages in!icating $ Ievel$ Iow OB:%E?--;$ /4nct err, can't get err t3t. "ee "ervr .sgs Q 4o!es .anual0 What coul! the pro lem e? +3pecte! answer$ The instance name is pro a ly incorrect in their connection string.

Page 20 of 74

6. >sers from the (4 clients are getting the following error stack$ Ievel$ Iow +BBOB$ OB:%E-E6;$ OB:4I+ not availa le OB:%EA6-C$ smsget$ open error when opening sga!ef.! f file. @(%>J +rror$ 1$ No such file or !irectory What is the pro a le cause? +3pecte! answer$ The Oracle instance is shut!own that they are trying to access, restart the instance. ;. @ow can you !etermine if the ",IN+T process is running for ",IN+T K-? @ow a out K1? Ievel$ Iow +3pecte! answer$ 8or ",IN+T K- check for the e3istence of the orasrv process. &ou can use the comman! "tcpctl status" to get a full status of the K- T4(#( server, other protocols have similar comman! formats. 8or ",IN+T K1 check for the presence of the I#"T+N+B process/s0 or you can issue the comman! "lsnrctl status". <. What file will give you Oracle instance status information? Where is it locate!? Ievel$ Iow +3pecte! answer$ The alert.ora log. #t is locate! in the !irectory specifie! y the ackgroun!L!umpL!est parameter in the vMparameter ta le. ?. >sers aren?t eing allowe! on the system. The following message is receive!$ Ievel$ #nterme!iate OB:%EE1<A archiver is stuck. 4onnect internal only, until free! What is the pro lem? +3pecte! answer$ The archive !estination is pro a ly full, ackup the archive logs an! remove them an! the archiver will re%start. A. Where woul! you look to fin! out if a re!o log was corrupte! assuming you are using Oracle mirrore! re!o logs? Ievel$ #nterme!iate +3pecte! answer$ There is no message that comes to the ",I79: or "BK.*B programs !uring startup in this situation, you must check the alert.log file for this information. C. &ou attempt to a!! a !atafile an! get$ Ievel$ #nterme!iate OB:%E---C$ cannot a!! anymore !atafiles$ limit of ;E e3cee!e! What is the pro lem an! how can you fi3 it? +3pecte! answer$ When the !ata ase was create! the ! Lfiles parameter in the initiali)ation file was set to ;E. &ou can shut!own an! reset this to a higher value, up to the value of .:JL7:T:8#I+" as specifie! at !ata ase creation. #f the .:JL7:T:8#I+" is set to low, you will have to re uil! the control file to increase it efore procee!ing. D. &ou look at your fragmentation report an! see that smon hasn?t coalesce! any of you ta lespaces, even though you know several have large chunks of contiguous free e3tents. What is the pro lem? Ievel$ @igh +3pecte! answer$ 4heck the ! aLta lespaces view for the value of pctLincrease for the ta lespaces. #f pctLincrease is )ero, smon will not coalesce their free space. -E. &our users get the following error$ Ievel$ #nterme!iate OB:%EEE<< ma3imum num er of 7.I locks e3cee!e! What is the pro lem an! how !o you fi3 it? +3pecte! answer$ The num er of 7.I Iocks is set y the initiali)ation parameter 7.ILIO4F". #f this value is set to low /which it is y !efault0 you will get this error. #ncrease the value of 7.ILIO4F". #f you are sure that this is 'ust a temporary pro lem, you can have them wait an! then try again later an! the error shoul! clear.

Page 21 of 74

--. &ou get a call from you ackup 79: while you are on vacation. @e has corrupte! all of the control files while playing with the :IT+B 7:T:9:"+ 9:4F>( 4ONTBOI8#I+ comman!. What !o you !o? Ievel$ @igh +3pecte! answer$ :s long as all !atafiles are safe an! he was successful with the 9:4F>( controlfile comman! you can !o the following$ 4ONN+4T #NT+BN:I "T:BT>( .O>NT /Take any rea!%only ta lespaces offline efore ne3t step :IT+B 7:T:9:"+ 7:T:8#I+ .... O88I#N+O0 B+4OK+B 7:T:9:"+ >"#N* 9:4F>( 4ONTBOI8#I+ :IT+B 7:T:9:"+ O(+N B+"+TIO*"O / ring rea!%only ta lespaces ack online0 "hut!own an! ackup the system, then restart #f they have a recent output file from the :IT+B 7:T:9:"+ 9:4F>( 4ONTBOI 8#I+ TO TB:4+O comman!, they can use that to recover as well. #f no ackup of the control file is availa le then the following will e require!$ 4ONN+4T #NT+BN:I "T:BT>( NO.O>NT 4B+:T+ 4ONTBOI 8#I+ .....O @owever, they will nee! to know all of the !atafiles, logfiles, an! settings for .:JIO*8#I+", .:JIO*.+.9+B", .:JIO*@#"TOB&, .:J7:T:8#I+" for the !ata ase to use the comman!. SET 3 -. To see current user name "qlS show userO 1. 4hange ",I prompt name ",IS set sqlprompt Y.animara S Y .animara S .animara S 6. "witch to 7O" prompt ",IS host ;. @ow !o # eliminate the !uplicate rows ? ",IS !elete from ta leLname where rowi! not in /select ma3/rowi!0 from ta le group y !uplicateLvaluesLfiel!Lname0O or ",IS !elete from ta leLname ta where rowi! S/select min/rowi!0 from ta leLname t where ta.!vNt .!v an! .....0O +3ample. Ta le +mp +mpno +name -E"cott -E1 =iyo -E6 .illor -E; =iyo -E< "mith !elete from emp a where rowi! R / select ma3/rowi!0 from emp where a.ename N .ename 0O The output like, +mpno +name -E"cott -E6 .illor -E; =iyo -E< "mith <. @ow !o # !isplay row num er with recor!s? To achive this use rownum pseu!ocolumn with query, like ",IS ",IS select rownum, ename from empO Output$ "cott 1 .illor

Page 22 of 74

6 ;

=iyo "mith

?. 7isplay the recor!s etween two range select rownum, empno, ename from emp where rowi! in /select rowi! from emp where rownum RNQupto minus select rowi! from emp where rownumRQ"tart0O +nter value for upto$ -E +nter value for "tart$ A BOWN>. +.(NO +N:.+ %%%%%%%%% %%%%%%%%% %%%%%%%%%% AAC1 4I:BF 1 AACC "4OTT 6 AC6D F#N* ; AC;; T>BN+B A. # know the nvl function only allows the same !ata type/ie. num er or char or !ate Nvl/comm, E00, if commission is null then the te3t YNot :pplica leZ want to !isplay, instea! of lank space. @ow !o # write the query? ",IS select nvl/toLchar/comm.0,'N:'0 from empO Output $ NKI/TOL4@:B/4O..0,'N:'0 %%%%%%%%%%%%%%%%%%%%%%% N: 6EE <EE N: -;EE N: N: C. Oracle cursor $ #mplicit Q +3plicit cursors Oracle uses work areas calle! private ",I areas to create ",I statements. (I2",I construct to i!entify each an! every work are use!, is calle! as 4ursor. 8or ",I queries returning a single row, (I2",I !eclares all implicit cursors. 8or queries that returning more than one row, the cursor nee!s to e e3plicitly !eclare!. D. +3plicit 4ursor attri utes There are four cursor attri utes use! in Oracle cursorLnameU8oun!, cursorLnameUNOT8O>N7, cursorLnameUBOW4O>NT, cursorLnameU#"O(+N -E. #mplicit 4ursor attri utes "ame as e3plicit cursor ut prefi3e! y the wor! ",I ",IU8oun!, ",IUNOT8O>N7, ",IUBOW4O>NT, ",IU#"O(+N Tips $ -. @ere ",IU#"O(+N is false, ecause oracle automatically close! the implicit cursor after e3ecuting ",I statements. $ 1. :ll are 9oolean attri utes. --. 8in! out nth highest salary from emp ta le "+I+4T 7#"T#N4T /a.sal0 8BO. +.( : W@+B+ QN N /"+I+4T 4O>NT /7#"T#N4T / .sal00 8BO. +.( 9 W@+B+ a.salRN .sal0O +nter value for n$ 1 ":I %%%%%%%%% 6AEE -1. To view installe! Oracle version information ",IS select anner from vMversionO

Page 23 of 74

-6. 7isplay the num er value in Wor!s ",IS select sal, /toLchar/toL!ate/sal,'''0, ''sp'00 from empO the output like, ":I /TOL4@:B/TOL7:T+/":I,'='0,'="('00 %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CEE eight hun!re! -?EE one thousan! si3 hun!re! -1<E one thousan! two hun!re! fifty #f you want to a!! some te3t like, Bs. Three Thousan! only. ",IS select sal ""alary ", /' Bs. 'WW /toLchar/toL!ate/sal,'''0, '=sp'00WW ' only.'00 ""al in Wor!s" from emp 2 "alary "al in Wor!s %%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CEE Bs. +ight @un!re! only. -?EE Bs. One Thousan! "i3 @un!re! only. -1<E Bs. One Thousan! Two @un!re! 8ifty only. -;. 7isplay O!!2 +ven num er of recor!s O!! num er of recor!s$ select T from emp where /rowi!,-0 in /select rowi!, mo!/rownum,10 from emp0O 6 < +ven num er of recor!s$ select T from emp where /rowi!,E0 in /select rowi!, mo!/rownum,10 from emp0 1 ; ? -<. Which !ate function returns num er value? monthsL etween -?. :ny three (I2",I +3ceptions? TooLmanyLrows, NoL7ataL8oun!, KalueL+rror, PeroL+rror, Others -A. What are (I2",I 4ursor +3ceptions? 4ursorL:lrea!yLOpen, #nvali!L4ursor -C. Other way to replace query result null value with a te3t ",IS "et N>II [N2:\ to reset ",IS "et N>II [\ -D. What are the more common pseu!o%columns? "&"7:T+, >"+B , >#7, 4>BK:I, N+JTK:I, BOW#7, BOWN>. 1E. What is the output of "#*N function? - for positive value, E for Pero, %- for Negative value. 1-. What is the ma3imum num er of triggers, can apply to a single ta le? -1 triggers.

Set 4 : PL/SQL interview questions


Which of the following statements is true a out implicit cursors? #mplicit cursors are use! for ",I statements that are not name!. 7evelopers shoul! use implicit cursors with great care. #mplicit cursors are use! in cursor for loops to han!le !ata processing. #mplicit cursors are no longer a feature in Oracle.

Page 24 of 74

Which of the following is not a feature of a cursor 8OB loop? Becor! type !eclaration. Opening an! parsing of ",I statements. 8etches recor!s from cursor. Bequires e3it con!ition to e !efine!. : !eveloper woul! like to use referential !atatype !eclaration on a varia le. The varia le name is +.(IO&++LI:"TN:.+, an! the correspon!ing ta le an! column is +.(IO&++, an! IN:.+, respectively. @ow woul! the !eveloper !efine this varia le using referential !atatypes? >se employee.lnameUtype. >se employee.lnameUrowtype. Iook up !atatype for +.(IO&++ column on I:"TN:.+ ta le an! use that. 7eclare it to e type ION*. Which three of the following are implicit cursor attri utes? Ufoun! UtooLmanyLrows Unotfoun! Urowcount Urowtype #f left out, which of the following woul! cause an infinite loop to occur in a simple loop? IOO( +N7 IOO( #8%T@+N +J#T Which line in the following statement will pro!uce an error? cursor actionLcursor is select name, rate, action into actionLrecor! from actionLta leO There are no errors in this statement. The comman! use! to open a 4>B"OB 8OB loop is open fetch parse None, cursor for loops han!le cursor opening implicitly. What happens when rows are foun! using a 8+T4@ statement #t causes the cursor to close #t causes the cursor to open #t loa!s the current row values into varia les #t creates the varia les to hol! the current row values Bea! the following co!e$ 4B+:T+ OB B+(I:4+ (BO4+7>B+ fin!Lcpt /vLmovieLi! ]:rgument .o!e^ N>.9+B, vLcostLperLticket ]argument mo!e^ N>.9+B0 #" 9+*#N #8 vLcostLperLticket S C.< T@+N "+I+4T costLperLticket #NTO vLcostLperLticket 8BO. grossLreceipt W@+B+ movieLi! N vLmovieLi!O +N7 #8O +N7O Which mo!e shoul! e use! for KL4O"TL(+BLT#4F+T? #N O>T B+T>BN #N O>T

Page 25 of 74

Bea! the following co!e$ 4B+:T+ OB B+(I:4+ TB#**+B up!ateLshowLgross ]trigger information^ 9+*#N ]a!!itional co!e^ +N7O The trigger co!e shoul! only e3ecute when the column, 4O"TL(+BLT#4F+T, is greater than M6. Which trigger information will you a!!? W@+N /new.costLperLticket S 6.A<0 W@+N /$new.costLperLticket S 6.A< W@+B+ /new.costLperLticket S 6.A<0 W@+B+ /$new.costLperLticket S 6.A<0 What is the ma3imum num er of han!lers processe! efore the (I2",I lock is e3ite! when an e3ception occurs? Only one :ll that apply :ll reference! None 8or which trigger timing can you reference the N+W an! OI7 qualifiers? "tatement an! Bow "tatement only Bow only Oracle 8orms trigger Bea! the following co!e$ 4B+:T+ OB B+(I:4+ 8>N4T#ON getL u!get/vLstu!ioLi! #N N>.9+B0 B+T>BN num er #" vLyearlyL u!get N>.9+BO 9+*#N "+I+4T yearlyL u!get #NTO vLyearlyL u!get 8BO. stu!io W@+B+ i! N vLstu!ioLi!O B+T>BN vLyearlyL u!getO +N7O Which set of statements will successfully invoke this function within ",IT(lus? K:B#:9I+ gLyearlyL u!get N>.9+B +J+4>T+ gLyearlyL u!get $N *+TL9>7*+T/--0O K:B#:9I+ gLyearlyL u!get N>.9+B +J+4>T+ $gLyearlyL u!get $N *+TL9>7*+T/--0O K:B#:9I+ $gLyearlyL u!get N>.9+B +J+4>T+ $gLyearlyL u!get $N *+TL9>7*+T/--0O K:B#:9I+ gLyearlyL u!get N>.9+B $gLyearlyL u!get $N *+TL9>7*+T/--0O 4B+:T+ OB B+(I:4+ (BO4+7>B+ up!ateLtheater /vLname #N K:B4@:B vLtheaterLi! #N N>.9+B0 #" 9+*#N >(7:T+ theater "+T name N vLname W@+B+ i! N vLtheaterLi!O +N7 up!ateLtheaterO When invoking this proce!ure, you encounter the error$ OB:%EEE$ >nique constraint/"4OTT.T@+:T+BLN:.+L>F0 violate!.@ow shoul! you mo!ify the function to han!le this error?

Page 26 of 74

:n user !efine! e3ception must e !eclare! an! associate! with the error co!e an! han!le! in the +J4+(T#ON section. @an!le the error in +J4+(T#ON section y referencing the error co!e !irectly. @an!le the error in the +J4+(T#ON section y referencing the >N#,>+L+BBOB pre!efine! e3ception. 4heck for success y checking the value of ",IU8O>N7 imme!iately after the >(7:T+ statement. Bea! the following co!e$ 4B+:T+ OB B+(I:4+ (BO4+7>B+ calculateL u!get #" vL u!get stu!io.yearlyL u!getUT&(+O 9+*#N vL u!get $N getL u!get/--0O #8 vL u!get R 6EEEE T@+N setL u!get/--,6EEEEEEE0O +N7 #8O +N7O &ou are a out to a!! an argument to 4:I4>I:T+L9>7*+T. What effect will this have? The *+TL9>7*+T function will e marke! invali! an! must e recompile! efore the ne3t e3ecution. The "+TL9>7*+T function will e marke! invali! an! must e recompile! efore the ne3t e3ecution. Only the 4:I4>I:T+L9>7*+T proce!ure nee!s to e recompile!. :ll three proce!ures are marke! invali! an! must e recompile!. Which proce!ure can e use! to create a customi)e! error message? B:#"+L+BBOB ",I+BB. B:#"+L:((I#4:T#ONL+BBOB B:#"+L"+BK+BL+BBOB The 4@+4FLT@+:T+B trigger of the T@+:T+B ta le has een !isa le!. Which comman! can you issue to ena le this trigger? :IT+B TB#**+B checkLtheater +N:9I+O +N:9I+ TB#**+B checkLtheaterO :IT+B T:9I+ checkLtheater +N:9I+ checkLtheaterO +N:9I+ checkLtheaterO +3amine this !ata ase trigger 4B+:T+ OB B+(I:4+ TB#**+B preventLgrossLmo!ification ]a!!itional trigger information^ 9+*#N #8 TOL4@:B/sys!ate, 7&0 N .ON T@+N B:#"+L:((I#4:T#ONL+BBOB/%1EEEE,*ross receipts cannot e !elete! on .on!ay0O +N7 #8O +N7O This trigger must fire efore each 7+I+T+ of the *BO""LB+4+#(T ta le. #t shoul! fire only once for the entire 7+I+T+ statement. What a!!itional information must you a!!? 9+8OB+ 7+I+T+ ON grossLreceipt :8T+B 7+I+T+ ON grossLreceipt 9+8OB+ /grossLreceipt 7+I+T+0 8OB +:4@ BOW 7+I+T+7 8BO. grossLreceipt +3amine this function$ 4B+:T+ OB B+(I:4+ 8>N4T#ON setL u!get /vLstu!ioLi! #N N>.9+B, vLnewL u!get #N N>.9+B0 #" 9+*#N >(7:T+ stu!io "+T yearlyL u!get N vLnewL u!get W@+B+ i! N vLstu!ioLi!O #8 ",IU8O>N7 T@+N

Page 27 of 74

B+T>BN TB>+lO +I"+ B+T>BN 8:I"+O +N7 #8O 4O..#TO +N7O Which co!e must e a!!e! to successfully compile this function? :!! B+T>BN right efore the #" keywor!. :!! B+T>BN num er right efore the #" keywor!. :!! B+T>BN oolean right after the #" keywor!. :!! B+T>BN oolean right efore the #" keywor!. >n!er which circumstance must you recompile the package o!y after recompiling the package specification? :ltering the argument list of one of the package constructs :ny change ma!e to one of the package constructs :ny ",I statement change ma!e to one of the package constructs Bemoving a local varia le from the 7+4I:B+ section of one of the package constructs (roce!ure an! 8unctions are e3plicitly e3ecute!. This is !ifferent from a !ata ase trigger. When is a !ata ase trigger e3ecute!? When the transaction is committe! 7uring the !ata manipulation statement When an Oracle supplie! package references the trigger 7uring a !ata manipulation statement an! when the transaction is committe! Which Oracle supplie! package can you use to output values an! messages from !ata ase triggers, store! proce!ures an! functions within ",IT(lus? 79."L7#"(I:& 79."LO>T(>T 79."LI#"T 79."L7+"4B#9+ What occurs if a proce!ure or function terminates with failure without eing han!le!? :ny 7.I statements issue! y the construct are still pen!ing an! can e committe! or rolle! ack. :ny 7.I statements issue! y the construct are committe! >nless a *OTO statement is use! to continue processing within the 9+*#N section, the construct terminates. The construct rolls ack any 7.I statements issue! an! returns the unhan!le! e3ception to the calling environment. +3amine this co!e 9+*#N theaterLpck.vLtotalLseatsLsol!Loverall $N theaterLpck.getLtotalLforLyearO +N7O 8or this co!e to e successful, what must e true? 9oth the KLTOT:IL"+:T"L"OI7LOK+B:II varia le an! the *+TLTOT:IL8OBL&+:B function must e3ist only in the o!y of the T@+:T+BL(4F package. Only the *+TLTOT:IL8OBL&+:B varia le must e3ist in the specification of the T@+:T+BL(4F package. Only the KLTOT:IL"+:T"L"OI7LOK+B:II varia le must e3ist in the specification of the T@+:T+BL(4F package. 9oth the KLTOT:IL"+:T"L"OI7LOK+B:II varia le an! the *+TLTOT:IL8OBL&+:B function must e3ist in the specification of the T@+:T+BL(4F package. : store! function must return a value ase! on con!itions that are !etermine! at runtime. Therefore, the "+I+4T statement cannot e har!%co!e! an! must e create! !ynamically when the function is e3ecute!. Which Oracle supplie! package will ena le this feature? 79."L77I 79."L7.I 79."L"&N 79."L",I nswers]
Thanks again for publishing my questions.

Page 28 of 74

Tech Interviews comment by Sachin Rastogi (rsachin@krify.com) . !.! ". #.( $"$#) %.! &." '.# (.! ).! *.("$#) . !.# ". #. %." &." '. (.( $#) ).# !*." ! .# !!.! !".# !#." !%.# please let me know how many answers are right. in this pl+sql test. Thanks , Regar-s$ Su-hir Rao. Tech Interviews comment by Su-hir .nswer to question/! is # Tech Interviews comment by 0nname!# IS # Tech Interviews comment by -c1 The answer to the question ( is wrong2 shoul- be ". Tech Interviews comment by Stephen 3acob .nswer to number ) shoul- be #. 4ow can you check for the initial value$ if there is no user input5 Tech Interviews comment by Stephen 3acob The .nswer to the question ( is "r- 6hoice. Tech Interviews comment by .hame- Tharik.7 8uestion " all the four answers are wrong $ the function e9ecute- like this S8:; select get<bu-get( >?T<@0A>?T( BBBBC ) ) into =g<yearly<bu-get from -ual2

:et me know$ if you have any Suggestions. Tech Interviews comment by .hame- Tharik.7 The .nswer to the question % is #r- 6hoice. If you are missing the ?7A :DDE (!)$ the loop -o not work$ proce-ure -oes not compile. Tech Interviews comment by Francisco 3. @an-a The .nswer to the question % is r- 6hoice. ItiGs imposible that both " an- # are correct. He -o not nee- location (where) we nee- time (when).

Page 29 of 74

Tech Interviews comment by Francisco 3. @an-a The .nswer to the question % is "r- 6hoice. The #r- (Dracle Forms trigger) is in some way correct$ but oracle triggers an- Forms triggers are not the same. This question is about Dracle triggers (not Forms). Tech Interviews comment by Francisco 3. @an-a 4i .hame- Tharik.7 your answer is correct$ but also answer number ! works to be able to see the result uses S8:;print g<yearly<bu-get. Tech Interviews comment by Francisco 3. @an-a The answer to the question " shoul- be !. I fully agree with Francisco 3. @an-a. For Francisco$ your answers are right$ Iust match question numbers. I trie- to -o an- here is the revise- answer list. (T means correct answer choice) .) = T !.)! / # = # / T ".) = T #.)( $"$#) / T %.)! / # = # / T &.)" / T '.)# / T (.)! / " / " = " / T ).)! / # = # / T *.)("$#) / .) / JI -ont know correct answerK !.)# / " = " / T ".) / 5 = ! / T Thanks. Tech Interviews comment by Eranav Lora . !.# ".! #. $"$% %.! &.!$" '. (." ).# *.# .# !. ".! #.# %." &.! '.! (. ).# !*." ! .# !!.! !".# !#.# !%.# Tech Interviews comment by .rti Shah The answer to the !" is # Tech Interviews comment by viIay answer for !! is ! Tech Interviews comment by viIay

Page 30 of 74

answer for ( is Tech Interviews comment by oraguru Right answer to 80S.% is #th option co1 if en- loop is misse- in programming it wu- through error while compiling $ but if u misse- ?MIT $ the program wu- not know where to e9it the loop Nan- loop wu- go on Tech Interviews comment by cobra . !. # ". #. $"$# %. ! &. !$" '. # (. " ). # *. .! !. " ". ! #.# %. " &. " '.! (. ). " !*." ! .# !!. ! Tech Interviews comment by aa

Set ! : SQL "PL/SQL # $%& Interview Questions


_message X1A;;?` 8ri, E6 Octo er 1EE6 E6$;6 *urusu ramanyam .essages$ AC -. @ow to implement #"N>.+B#4 function in ",I T(lus ? .etho! -$ "elect length /translate /trim /columnLname0,' 5%.E-16;<?ACD',' '00 from !ual O Will give you a )ero if it is a num er or greater than )ero if not numeric /actually gives the count of non numeric characters0 .etho! 1$ select instr/translate/'wwww', 'a c!efghi'klmnopqrstuvw3y):947+8*@#=FI.NO(,B"T>KWJ&P', 'JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ'0,'J'0 8BO. !ualO #t returns E if it is a num er, - if it is not. 1. @ow to "elect last N recor!s from a Ta le? select T from /select rownum a, 4I:""L4O7+,4I:""L7+"4 from clm0 where a S / select /ma3/rownum0%-E0 from clm0 @ere N N -E The following query has a (ro lem of performance in the e3ecution of the following query where the ta le ter.terLmaster have 1116- recor!s. "o the results are o taine! after hours.

Page 31 of 74

4ursor remLmaster/ repno K:B4@:B10 #" select a.T from ter.terLmaster a where NOT a.repno in /select repno from ermast0 an! / repno N ':II' or a.repno S repno0 Or!er y a.repno What are steps require! tuning this query to improve its performance? ?a @ave an in!e3 on T+BL.:"T+B.B+(NO an! one on +B.:"T.B+(NO ?a 9e sure to get familiar with +J(I:#N (I:N. This can help you !etermine the e3ecution path that Oracle takes. #f you are using 4ost 9ase! Optimi)er mo!e, then e sure that your statistics on T+BL.:"T+B are up%to%!ate. ?a :lso, you can change your ",I to$ "+I+4T a.T 8BO. ter.terLmaster a W@+B+ NOT +J#"T" /"+I+4T .repno 8BO. ermast W@+B+ a.repnoN .repno0 :N7 /a. repno N ':II' or a.repno S a. repno0 OB7+B 9& a.repnoO 6. What is the !ifference etween Truncate an! 7elete interms of Beferential #ntegrity? 7+I+T+ removes one or more recor!s in a ta le, checking referential 4onstraints /to see if there are !epen!ent chil! recor!s0 an! firing any 7+I+T+ triggers. #n the or!er you are !eleting /chil! first then parent0 There will e no pro lems. TB>N4:T+ removes :II recor!s in a ta le. #t !oes not e3ecute any triggers. :lso, it only checks for the e3istence /an! status0 of another foreign key (ointing to the ta le. #f one e3ists an! is ena le!, then you will get The following error. This is true even if you !o the chil! ta les first. OB:%E11??$ unique2primary keys in ta le reference! y ena le! foreign keys &ou shoul! !isa le the foreign key constraints in the chil! ta les efore issuing the TB>N4:T+ comman!, then re%ena le them afterwar!s. 4I#+NT2"+BK+B What !oes preemptive in preemptive multitasking mean ? (reemptive refers to the fact that each task is allote! fi3e! time slots an! at the en! of that time slot the ne3t task is starte!. What !oes the OIT( stan!s for ? OIT( stan!s for On Iine Transaction (rocessing What is the most important requirement for OIT( ? OIT( requires real time response. #n a client server environment, what woul! e the ma'or work that the client !eals with ? The client !eals with the user interface part of the system. Why is the most of the processing !one at the sever ? To re!uce the network traffic an! for application sharing an! implementing usiness rules. What !oes teh term upsi)ing refer to ? :pplications that have outgrown their environment are re%engineere! to run in a larger environment. This is upsi)ing. What !oes one !o when one is rightsi)ing ?

Page 32 of 74

With rightsi)ing, one woul! move applications to the most appropriate server platforms. What !oes the term !ownsi)ing refer to ? : host ase! application is re%engineere! to run in smaller or I:N ase! environment. What is event trigger ? :n event trigger, a segment of co!e which is associate! with each event an! is fire! when the event occurs. Why !o store! proce!ures re!uce network traffic ? When a store! proce!ure is calle!, only the proce!ure call is sent to the server an! not the statements that the proce!ure contains. What are the types of processes that a server runs ? 8oregroun! process an! 9ackgroun! process. What is a event han!ler ? :n event han!ler is a routine that is written to respon! to a particular event. What is an integrity constraint ? :n integrity constraint allows the !efinition of certain restrictions, at the ta le level, on the !ata that is entere! into a ta le. What are the various uses of !ata ase triggers ? 7ata ase triggers can e use! to enforce usiness rules, to maintain !erive! values an! perform value% ase! au!iting. What is a transaction ? : transaction is a set of operations that egin when the first 7.I is issue! an! en! when a commit or roll ack is issue!. 9+*#N 4O..#T2BOII9:4F are the oun!ries of a transaction. Why are the integrity constraints preferre! to !ata ase triggers ? 9ecause it is easier to !efine an integrity constraint than a !ata ase trigger. Why is it etter to use an integrity constraint to vali!ate !ata in a ta le than to use a store! proce!ure ? 9ecause an integrity constraint is automatically checke! while !ata is inserte! into a ta le. : store! has to e specifically invoke!. What are the three components of a client server mo!el ? : 4lient, : "erver an! : Network24ommunication software. What are the a!vantages of client2server mo!el ? 8le3i ility of the system, scala ility, cost saving, centralise! control an! implementation of usiness rules, increase of !evelopers pro!uctivity, porta ility, improve! network an! resource utili)ation. What are the !isa!vantages of the client2server mo!el ? @eterogeneity of the system results in re!uce! relia lity. .ay not e suita le for all applications. .anaging an! tuning networks ecomes !ifficult. What are the !ifferent topologies availa le for network ?

Page 33 of 74

"tar, 9us, Bing. What is the first work of 4lient process ? : client process at first esta lishes connection with the "erver. What are the responsi ilities of a "erver ? -. .anage resources optimally across multiple clients. 1. 4ontrolling !ata ase access an! security. 6. (rotecting the !ata se an! recovering it from crashes. ;. +nforcing integrity rules glo ally. #n a 4lient2"erver conte3t, what !oes :(# /:pplication (rogramming #nterface0 refer to ? :n :(#, in a 4lient2"erver conte3t, is a specification of a set of functions for communication etween the client an! the server. *ive some e3amples of stan!ar! :(#bcs ? Open 7ata ase 4onnectivity /O7940, #ntegrate! 7ata ase :pplication (rogramming #nterface /#7:(#0, JOpen ",I24I# What is the main a!vantage of !eveloping an application using an :(# ? The application can e connecte! to any ack en! server that is supporte! y the :(#. What is the main !isa!vantage of !eveloping an application using an :(# ? The application cannot use any special features of the acken! server. Why is an event !riven program referre! to a passive program ? 9ecause an event !riven program is always waiting for something to happen efore processing. What are the four types of events ? -. "ystem +vents. 1. 4ontrol +vents 6. >ser +vents ;. Other +vents. What is the !ifference etween file server an! a !ata ase server ? : file server 'ust transfers all the !ata requeste! y all its client an! the client processes the !ata while a !ata ase server runs the query an! sen!s only the query output. What is inheritance ? #nheritance is a metho! y which properties an! metho!s of an e3isting o 'ect are automatically passe! to any o 'ect !erive! from it. What are the two components of O794 ? -. :n O794 manager2a!ministrator an! 1. O794 !river. What is the function of a O794 manager ? The O794 .anager manages all the !ata sources that e3ists in the system. What is the function of a O794 7river ?

Page 34 of 74

The O794 7river allows the !eveloper to talk to the ack en! !ata ase. What !escription of a !ata source is require! for O794 ? The name of the 79.", the location of the source an! the !ata ase !epen!ent information. @ow is a connection esta lise! y O794 ? O794 uses the !escription of the !atasource availa le in the O794.#N# file to loa! the require! !rivers to access that particular ack en! !ata ase. B79." 8>N7:.+NT:I" #. #NTBO7>4#N* 7:T:9:"+" $ 4oncept of a 7ata ase $ Tra!itional :pproach $ #n this approach, in!epen!ent application programs access their own in!epen!ent !ata files. This results in many pro lems in !ata storage an! retrieval. 7ata ase :pproach $ #n this approach, all application access a common !ata ase, which is a centrali)e! !ata storage system. This approach has the following a!vantages $ Be!un!ancy of !ata storage is re!uce!, #nconsistency in !ata is eliminate! Q 7ata sharing etween applications is possi le. #nteracting with a 7ata ase $ 7ata ase .anagement "ystem /79."0 $ 79." is a software that interfaces etween applications an! a !ata ase for all !ata processing activities. >sers of a 79." $ +n! >sers, :pplication (rogrammers an! 7ata ase :!ministrators use a 79.", either !irectly or in!irectly. @ow users interact with a 7ata ase $ -. +n! users sen! queries to the 79." through applications. 1. The 79." translates the queries. 6. The 79." retrieves !ata from the !ata ase. ;. The 79." sen!s !ata to the application, which present the !ata to the en! users. 8unctions of a 79." $ 8unction of 79." 7escription (rovi!e! y using 7efining the !ata structure 7efining structure of !ata to e store! in !ata ase 7ata 7efinition Ianguage /77I0 .anipulating 7ata Betrieving, a!!ing, mo!ifying, !eleting !ata. 7ata .anipulation Ianguage /7.I0 7ata "ecurity (reventing unauthori)e! access to !ata. >ser%i!s an! (asswor!s. 4ontrol of 7ata :ccess :llowing users to use only relevant !ata 7ata 4ontrol Ianguage /74I0 :rchitecture of a 7ata ase $ Nee! for an :rchitecture $ The !etails a out comple3ity an! structure of !ata in a !ata ase in not require! y en!%users. Therefore, !ifferentiating what the en!%users see an! what is actually there in a !ata ase is important. :rchitecture of a 7ata ase $ The architecture of a !ata ase comprises a set of three levels at which a !ata ase can e viewe!. +3ternal Ievel or Kiew, 4onceptual Ievel or Kiew Q #nternal Ievel or Kiew. ##. >"#N* B+I:T#ON:I 7:T:9:"+ $ 9asics of Belational 7ata ase $ Belational 7ata ase .anagement "ystem /B79."0 $ B79." is the most popular form of 79." use! in the worl!. #t uses a relational !ata ase to organi)e !ata. : relational !ata ase comprise relations, which are represente! as ta les. Belation $ : relation stores information a out an o 'ect in the real worl!. : relation is represente! as a ta le. :ttri ute $ +ach attri ute of a relation stores a piece of information a out an o 'ect. :ttri utes are represente! as columns in a ta les an! can e arrange! in any or!er. +ach attri ute in a relation is unique an! contain atomic values i.e. :tomic value contain a single value of !ata an! Non%:tomic values contain a set of values. The num er of attri utes in a relation is calle! the !egree of the relation. Tuple $ : row in a ta le is calle! a tuple of the relation. The num er of tuples in a relation is known as the car!inality of the relation. Tuples in a ta le are unique an! can e arrange! in any or!er. 7omain $ : !omain is a set of vali! atomic values that an attri ute can take. Within a single !ata ase, an attri ute cannot have !ifferent !omains associate! with it. : !omain can inclu!e a null value, if the value for the !omain is unknown or !oes not e3ist. #!entifiers for Belations $ (rimary Fey $ :n attri ute that uniquely i!entifies a row in a ta le is calle! its primary key. : relation can have only one primary key. The primary key cannot have any null values. #n case no unique key is foun! in a relation, two or more attri utes can e treate! as the primary key. "uch keys are calle! 4omposite Feys. 4an!i!ate Fey $ : relation can have more than one attri ute that uniquely i!entifies a tuple. :ny one of these keys can e selecte! as the primary key. :ll such attri utes are calle! 4an!i!ate Feys. :ll can!i!ate keys that are not primary keys are calle! :lternate Feys.

Page 35 of 74

8oreign Fey $ :n attri ute that is not a can!i!ate key is calle! a Nonkey. : nonkey attri ute of a relation whose value matches the primary key in some other ta le is calle! 8oreign Fey OB is a column in a ta le that uniquely i!entifies rows from a !ifferent ta le. ###. #NT+B(B+T#N* 7:T: $ +ntities an! Belationships $ +ntity $ :n entity is an o 'ect that e3ists in the real worl! an! is !istinguisha le from other o 'ects. +ach entity is represente! as a ta le in a relational !ata ase. Types of +ntities $ +ntities can e classifie! in two ways % ase! on e3istence an! ase! on su sets. 9ase! on e3istence, entities can e classifie! as 7ominant an! Weak entities. 9ase! on su sets, entities can e classifies as "upertypes an! "u types. Belationships $ : relationship is an association etween two entities. Types of Belationships $ Belationships are classifie! into three types ase! on the occurrence of the relate! entities. One%to%One/-%-0, One%to%.any/-%.0 Q .any%to%.any/.%.0. >sing +2B 7iagram $ : +2B !iagram represent entities an! relationships in a !ata ase system. Be!ucing +2B 7iagrams to Belations $ .apping +ntities $ : !ominant entity is mappe! to a new relation. : weak entity is mappe! to a new relation. The primary key of the correspon!ing !ominant entity is inclu!e! as the foreign key in the weak entity relation. "upertypes an! su types are mappe! to separate relations. The primary key of the supertype ecomes the primary key of the su type. .apping Belationships $ : -%- relationship is mappe! using a foreign key. The primary key of either of the entities is inclu!e as a foreign key in the relation of the other entity. This relationship is rare, ecause !ata elements relate! in this way are normally place! in the same ta le. : -%. or .%- is mappe! y intro!ucing a foreign key. : primary key is the bdonebc si!e of the relationship, an! the foreign key is the bdmanybc si!e of the relationship. This relationship are most common. : .%. involves the creation of a new relation. .%. are pro lematic an! cannot e a!equately e3presse! !irectly in a relational ! . #t is e3presse! using intersection ta les. :n intersection ta le contains two /or more0 foreign keys, relating the primary key values of two /or more0 ta les to each other. The role of an intersection ta le is to convert the .%. into two -%. relationships that can e easily han!le! y the !ata ase. #K. "#.(I#8&#N* 7:T: $ Nee! for "implifying 7ata $ Normali)ation $ Normali)ation is a formal process of !eveloping !ata structures in a manner that eliminates re!un!ancy an! promotes integrity. &ou nee! to simplify structure of !ata in relations for easy storage an! retrieval. The process of simplifying relations is calle! normali)ation. The new relations that are o taine! after normali)ation are calle! normali)e! relations. Normali)ation has three well !efine! steps $ The relations that you get at the en! of the first step are sai! to e in -N8. The relations that you get at the en! of the secon! step are sai! to e in 1N8. The relations that you get at the en! of the thir! step are sai! to e in 6N8. "implifying 7ata to -N8 /+liminate Bepeating *roups0 $ : repeating group is a set of columns that store similar info that repeats in the same ta le. To simplify !ata to -N8, you ensure that all attri utes values in a relation have atomic values. #f there are attri utes in a relation with non%atomic values, move these attri utes to a new relation an! choose an appropriate primary key for it. +.g. "up#tem Ta le #tem fiel! having atomic. "implifying 7ata to 1N8 /+liminate Be!un!ant 7ata0 $ Be!un!ant !ata is !ata that is e3presse! multiple times unnecessarily, or !epen!s only on part of a multi%value! key. 8unctionally 7epen!ent :ttri utes $ 8unctionally 7epen!ent :ttri utes are those that elong to a single entity or relationship an! !epen! on its unique i!entifier. To simplify !ata to 1N8, you ensure that all nonkey attri utes in a relation are functionally !epen!ent on the whole key an! not part of the key. 4onversion from -N8 to 1N8 $ To convert a relation in -N8 to 1N8, move all nonkey attri utes that are not wholly !epen!ent on the primary key, to a new relation. Then, choose an appropriate primary key for the new relation. +.g. "eparating "up. ta le an! #tem ta le. "implifying 7ata to 6N8 /+liminate 4olumns not 7epen!ent on the Fey0 $ 4olumns in each ta le shoul! e a group of columns in which the !ata in each column contri utes to the !escription of each row in the ta le. Transitively 7epen!ent :ttri utes $ Transitively 7epen!ent :ttri utes in a relation are those that are !epen!ent on a nonkey attri ute an! not the primary key. To simplify !ata to 6N8, you ensure that there are no attri utes in a relation that are transitively !epen!ent on other attri utes. 4onversion from 1N8 to 6N8 $ To convert a relation in 1N8 to 6N8, move all transitively !epen!ent attri utes to a new relation. Then, choose an appropriate primary key for the new relation. +.g. "tatus is !epen!ent on 4ity in "up. ta le, so move those two to separate ta le. "implifying 7ata to ;N8 /#solate #n!epen!ent .ultiple Belationships0 $ K. "TOB#N* Q B+TB#+K#N* 7:T: $ Ianguage "upport for an B79." $ ",I $",I is the language that provi!es comman! to interact with the !ata in the !ata ase. ",I consists of three components % 77I, 7.I Q 74I. 77I $ 77I comprises comman!s you can use to create an! mo!ify the !ata ase structure. 7.I $ 7.I comprises comman!s you can use to a!!, mo!ify, !elete an! query !ata in the !ata ase.

Page 36 of 74

74I $ 74I comprises comman!s you can use to control the user access to the !ata ase. Organi)ing the 7ata ase $ 9ase Ta les $ : !ata ase comprises ase ta les, which have the following features $ They physically e3ist on the !isk, +ach of them has a unique name Q they contain !ata that is crucial to an organi)ation. Their attri utes have !ata types such as character, integer, !ecimal, !ate an! time. 4B+:T+ T:9I+ $ This is a 77I comman! in ",I that creates a new ta le in a !ata ase. "ynta3 $ 4B+:T+ T:9I+ ta le%name /column%name !ata%type __si)e`` NOT N>II27+8:>IT !efault%value`` 4@+4F /column%name S E0 >N#,>+ /column%name0 (B#.:B& F+& /column%name0 8OB+#*N F+& /column%name0 B+8+B+N4+" ta le%name0 :IT+B T:9I+ $ This is a 77I comman! in ",I that mo!ifies the structure of an e3isting ta le. "ynta3 $ :IT+B T:9I+ ta le%name :77 /column%name !ata%type __si)e`` __NOT N>II 7+8:>IT``...0 primary key !efinition 2 foreign key !efinition 7BO( (B#.:B& F+& 2 7BO( 8OB+#*N F+&0 7BO( T:9I+ $ This is 77I comman! in ",I that !eletes the an e3isting ta le. Once you !elete a ta le, all !ata containe! in it is lost an! cannot e recovere!. The storage space use! y this ta le is also release!. "ynta3 $ 7BO( T:9I+ ta le%name #nteracting with a 7ata ase $ "+I+4T $ This is a 7.I comman! in ",I that retrieves !ata from the !ata ase in the form of query results. The comman! supports the following keywor!s an! clauses $ 8BO. This keywor! specifies the name of the ta le. T This keywor! selects all the columns of the ta le. W@+B+ This keywor! gives the search con!ition that specifies the !ata to e retrieve!. :N7 This operator is use! to com ine two or more search con!itions. OB7+B 9& This keywor! sorts the query result on one or more columns. *BO>( 9& This keywor! groups the query result an! lets you generate summary result for each group. N>II values This value in!icates that the !ata is not present. "u query This is the query that is place insi!e the main query. #t passes its query result to the main query. #N"+BT $ This is a 7.I comman! in ",I that you use to a!! !ata in rows of a ta le. "&NT:J $ #N"+BT #NTO ta le%name /column%names0 K:I>+" /constant2N>II0 >(7:T+ $ This is a 7.I comman! in ",I that you use to change !ata on rows of a ta le. "ynta3 $ >(7:T+ ta le%name "+T column%name%value W@+B+ con!ition 7+I+T+ $ This is a 7.I comman! in ",I that removes one or more rows of !ata from a ta le. "ynta3 $ 7+I+T+ 8BO. ta le%name W@+B+ con!ition. +n!%user's Kiew of a 7ata ase $ Kiews $ Kiews are relations that are !erive! from one or more source ta les. Kiews have the following features$ Kiews let you restrict the access to !ata so that en!%users see !ata relevant to them. Kiews !o not physically e3ist in the !ata ase an! only their !efinition is store! y an B79.". :n B79." accesses the source ta les for !ata to e retrieve! from a view. :ny changes that users make to views !o not reflect in the source ta les if the view has een create! using a =oin con!ition. Kiews create! W#T@ 4@+4F O(T#ON allows for an a!!e! measure of security in a view. 8or e3ample, the user will not e a le to insert or up!ate a row that coul! not e selecte! y the view%with check option prevents this from happening. 4B+:T+ K#+W $ : view can e create! using the 4B+:T+ K#+W comman!. "ynta3 $ 4B+:T+ K#+W view%name /column%names0 :" query. Betrieving 7ata from a Kiew $ Once you create a view, you can retrieve !ata from it using the "+I+4T comman!, 'ust as you !o for a ta le. Bestricting :ccess to a 7ata ase $ *B:NT $ This is a 74I comman! in ",I that you use to grant a specific set of authorities to one or more users. "ynta3 $ *B:NT /",I comman!0 /column%names0 ON ta le%name TO user%name. B+KOF+ $ This is a 74I comman! in ",I that you use to take away a specific set of authorities from one or more users. "ynta3 $ B+KOF+ /",I comman!0 ON ta le%name TO user%name. K#. +N">B#N* #NT+*B#T& O8 7:T: $ The concept of 7ata #ntegrity $ 7ata #ntegrity $ 7ata #ntegrity refers to the correctness an! completeness of !ata in a !ata ase. #ntegrity 4onstraints $ #ntegrity constraints allows only correct changes to e ma!e to a !ata ase. There are two types of integrity constraints % entity integrity an! referential integrity. +ntity #ntegrity $ +ntity #ntegrity ensures that for each row in a ta le, the value of the primary key is unique an! is not null. Beferential #ntegrity $ Beferential #ntegrity ensures that for each row in a ta le, the value of the foreign key is present in the reference ta le.

Page 37 of 74

*rouping comman!s relate! to a task $ Transaction (rocessing $ : transaction is a sequence of one or more ",I comman!s that together form a logical task. Transaction (rocessing ensures that when the B79." is making changes relate! to a single task, either all changes are ma!e as a unit or no changes are ma!e. 4ommit $ 4ommit is an ",I comman! that in!icates the successful en! of a transaction. :fter an B79." e3ecutes this comman! all the changes are ma!e to the !ata ase. Boll ack $ Boll ack is an ",I comman! that cancels a transaction efore it is complete. The roll ack comman! removes the changes of all previous comman!s in a transaction from the uffer. 4ontrolling 4oncurrent 7ata :ccess $ 4oncurrency 4ontrol $ :ll B79." must ensure that the transactions of concurrent users !o not interfere with each other. #f it !oes not han!le the transactions properly, the pro lems of lost up!ate, uncommitte! !ata, or inconsistent !ata might occur. Iost >p!ate (ro lem $ Iost up!ate pro lem occurs when an up!ate ma!e y a transaction is lost !ue to an up!ate ma!e y another transaction. >ncommitte! 7ata (ro lem $ >ncommitte! !ata pro lem occurs when a transaction accesses !ata that has een up!ate! y a previous transaction that has not yet en!e!. #nconsistent 7ata (ro lem $ #nconsistent !ata pro lem occurs when a transaction accesses !ata from the !ata ase an! simultaneously another transaction is changing that !ata. Iocking $ Iocking is a facility provi!e! y an B79." to ensure that a transaction !oes not interfere with any other transaction. Iocking prevents the pro lem of lost up!ate, uncommitte! !ata an! inconsistent !ata. :n B79." provi!e! two types of locks for locking a part of the !ata ase % share! locks an! e3clusive locks. "hare! Iocks $ #f a transaction is only rea!ing !ata from a !ata ase, it gets a share! lock on that part of the !ata ase. Other transactions can also get a share! lock on that part of the !ata ase to rea! !ata. @owever, they cannot change the !ata. +3clusive Iocks $ #f a transaction is up!ating !ata in a !ata ase, it gets an e3clusive lock on that part of the !ata ase. No other transaction can rea! or change this !ata. 4lient "erver 4omputing .o!el #. 4lient "erver (ara!igm $ #ntro!uction $ #n the past !eca!e, organi)ations have restructure! an! ecome glo al. The glo ali)ation an! restructuring have le! to a nee! for !istri ute! an! fle3i le information access. That tra!itional computing para!igms like host% ase! an! master2slave processing !o not a!equately a!!ress the information requirements of mo!ern usiness. That the client2server mo!el provi!es an architecture that harness contemporary technology to meet the computing nee!s of the mo!ern usiness organi)ation. :lso calle! 7istri ute! :pplication (rocessing or 4o%Operative :pplication (rocessing @ost 9ase! (rocessing % The 4entrali)e! (ara!igm $ 4entrali)e! computing treate! applications as an integrate! unit. :pplications ran on a single processor. The same processor generate! the user interface an! manipulate! !ata. 7um terminals were use! for !ata access an! !isplay. 7isa!vantages are $ 7ata was centrali)e! an! often not accessi le to those who nee!e! it. The host compute! !i! all the work, was frequently overloa!e!, an! response times were often poor. @ar!ware choices an! scala ility were limite! y proprietary architecture's. >ser interfaces were unfrien!ly, 7ata access was infle3i le an! governe! y availa le 6*I programs. .aster2"lave % The 8irst 7istri ute! 4omputing (ara!igm $ :s (4's an! intelligent terminals ecame availa le, a limite! amount of processing was transferre! to the terminal. #ntelligent terminals often vali!ate! !ata an! provi!e! e!iting functions. "uch terminal were calle! "laves. "laves were controlle! y .aster computer which !i! the main processing an! store! all !ata. #t ha! one !istinct a!vantage. #t re!uce! the loa! on the main processor. @owever, the other pro lems associate! with host% ase! processing remaine!. 4lient2"erver % : 7istri ute! 4omputing (ara!igm $ The client2server para!igm evolve! as an attempt to a!!ress the new computing nee!s of usiness an! utili)e new technologies. :!vantages $ 4lient2"erver makes it possi le to harness the computing power availa le on (4s an! other workstations in an organi)ation. Besponse times are improve! as processors are not overloa!e!. @ar!ware an! software choices can e application oriente! as they !o not necessarily have to run on a proprietary computer. Network traffic is re!uce! ecause the processing power availa le at the en! user terminal makes it unnecessary to sen! !etaile! instructions over the network as in the case of host ase! Q master2slave systems. 4omputing power can e a!!e! in smaller units making the system easily scalea le. 7isa!vantages $The inherent heterogeneity makes "ystem #ntegration, :!ministration Q .aintenance a formi!a le challenge. OB:4I+ A is an e3ceptional B79." Q also an e3cellent 79 server ecause it supports all ma'or O" for oth clients Q servers i.e. ."7O", Netware, >ni3ware, O"21 etc. Oracle Network software ",ITN+T support all ma'or network communication protocols T4(2#(, "(J2#(", Name! (ipes Q 7+4N+T. #t has got client server feature that !evelopers can use to minimi)e network traffic etween clients Q servers. @as features that makes it easy to a!minister a complicate! client server system. 4lient2"erver :pproach $ The client2server para!igm optimi)es the use of computer resources y !istri uting application processing among multiple processors. The client2server mo!el computers are classifie! as 4lients an! "ervers, where 4lients are requesters of services an! "ervers are provi!er of services. Typically, clients han!le user interface function Q server han!le !ata management function.

Page 38 of 74

4lient2"erver :rchitecture requires (rocessing to e !istri ute! over more than one computing system. 4lient%initiate! client2server interactions. "erver control over the services that can e requeste! y the client. "ervers to ar itrate etween conflicting client requests. : communication system that ena les clients Q servers to communicate. .ultitasking can e !efines as the capa ility of an O" to run multiple applications concurrently. : .ultitasking O" allocates a certain amount of 4(> time to each task. #n (reemptive multitasking, the O" controls the amount of 4(> time allocate! to a task. #n non%preemptive multitasking, the application controls the 4(> time an! the 4(> is release! only after the task is complete!. .ultithrea!ing is an e3tension of multitasking. #t allows multitasking within an application. (rograms an! su routines within a program can e3ecute concurrently in a multithrea!e! environment. "everal user process for a single server process. 7ata ase "erver shoul! have preemptive multitasking Q multithrea!ing capa ility. "upport a stan!ar! B79.". "upport a stan!ar! Network Operating "ystem. Tools such as B79.", :pplication "oftware, :pplication (rogram #nterfaces, "tore! (roce!ures, Bemote (roce!ure 4all /B(40 Q :pplication 7evelopment Tools are an important part of client2server systems. "uch tools improve pro!uctivity an! also play a role in making client2server systems more open. :n :(# is a set of functions that translates client requests into a format that the server can un!erstan!. B(4 is essentially a messaging system which allows store! proce!ures to e invoke!. .any B(4s allows proce!ures to e invoke! across heterogeneous platforms an! also provi!e the require! !ata translation services. There are several application !esigns possi le in the client2server mo!el !epen!ing on how application processing is !istri ute!. #n 7istri ute! (resentation, the presentation function is !ivi!e! etween the client Q the server. >seful in situations where (4 or workstations are connecte! to mainframes. >se! to enhance the user interface of mainframe ase! applications. #n Bemote (resentation, the entire presentation part of the application resi!es on a !ifferent computer than the one that has the logic function. >se! in applications where user interaction is completely static an! pre!etermine!. #n 7istri ute! Iogic, the logic function is place! on more than one platform thus, improving response time y allowing the logic to e3ecute simultaneously on several processors. #n Bemote 7ata .anagement, the application logic resi!es on !ifferent computer than the one that has the !ata an! the 79.". +asy to implement an! often provi!e en!%users with totally transparent access to !ata. #n 7istri ute! 7ata .anagement, the !ata an! 79." is !istri ute! among multiple no!es an! !istri ution of application logic. *oals of 4lient2"erver (ara!igm is the en!%user. 4lient2"erver seeks to provi!e en!%user transparent access to the computing resources of the organi)ation. The goal is referre! to as single system image. There are four attri utes of single system image $ Iocation Transparency $ >sers must e a le to access !ata without knowing the location of the !ata. >sers shoul! not have to learn Q use !ifferent comman!s for accessing !ata from !ifferent locations. #nteropera ility requires that applications an! processing tasks e freely porta le across heterogeneous computing resources. 4onsistent >ser #nterfaces require that applications retain the same user interface across heterogeneous computing platforms. 4ommon computing tasks are represente! consistently across applications. +nterprise%wi!e Besource "haring is the common threa! that links all of an enterprise's computing resource ##. 4oncepts for 4lient2"erver $ #ntro!uction $ B79."'s stan!ar!i)e !ata storage an! access an! are therefore i!eal for implementing client2server systems. The physical structure of a network is calle! Network Topology i.e. refers to the way the ca ling of a network is physically structure!. The rules that govern the process of !ata transmission in a network are collectively referre! to as Network (rotocol. *raphical >ser #nterfaces improve pro!uctivity ecause they re!uce learning time an! are easier to use. 7istri ute! 7ata ase "upport $ The capa ility of an B79." to manage !ata ases lying at more than one location. To provi!e !istri ute! !ata ase support, an B79." must e a le to provi!e transparent access to !ata, =oin ta les on !ifferent platforms, @an!le an! manage !istri ute! queries an! +nsure that transactions are successfully complete! on all relevant !ata ases. Network $ Network has si3 asic functions, Naming, "egmentation, "egmenting, 8low 4ontrol, "ynchroni)ation, (riority Q +rror 4ontrol. There are three types of network topologies, 9us, "tar Q Bing. There are three types of transmission me!ia, Twiste! (air, 4oa3ial 4a le Q Optic 8i re. There are three types of !ata transmission metho!s, 4entrali)e!, 7istri ute! Q Ban!om. *>#s $ *># must support mouse events, key oar! events, menu events, resi)ing events, activation2!eactivation events an! initiali)e2terminate events. *># shoul! e porta le, shoul! support wi!e variety of !evelopment tools Q e an in!ustry stan!ar!. ###. 4lient2"erver "oftware $ 9ack%en! "oftware $ #t is ma!e up of 7ata ase "ervers Q Network Operating "ystems. The !ata ase server manages !ata on the system Q maintains !ata integrity. 7ata ase server requires some special features. 4ompati ility i.e. must e a le to work on !ifferent operating systems. ",I #mplementation i.e. must support stan!ar! :N"# ",I since it can communicate with !ifferent ",I !ialects. "tore! (roce!ures i.e. must e a le to use "( as they are analy)e!, compile! an! optimi)e!. Beferential #ntegrity i.e. allows the server to synchroni)e change to columns that are part of multiple ta les. 7eclarative B# esta lishes precise rules for use of columns that are common across ta les. 9uilt into ! software an! enforce! y !efault. #n (roce!ural B#, each ! comman! is associate! with a trigger. When comman! is issue!, the

Page 39 of 74

trigger sets of a series of comman!s that make the necessary changes. 7isa!vantage is programmers must write triggers lea!ing to errors. .ultithrea!ing i.e. support e3ecution of multiple tasks simultaneously. 7istri ute! 7ata ase "upport i.e. a le to !ivi!e !ata ase tasks among multiple 4(>s. :lso, a le to 'oin ta les locate! on !ifferent servers, Q manage ",I queries sent to !ifferent servers. 4oncurrency 4ontrol i.e. support automatic escalation, the server locks a recor!, if a single recor! is eing mo!ifie!. : page, if several recor!s are eing mo!ifie!. : ta le, if several pages are eing mo!ifie!. Transaction 4ontrol i.e. protect transactions from system failures. #n two phase commit, all workstations are notifie! of !ata ase changes, an! if system fails, all sites roll ack. NO" controls the transmission of !ata across the network an! manages the sharing of har!ware an! software resource on the network. 8our important features are Operating +nvironment "upport, Workstation "upport, "ecurity Q (rotocol "upport. 7evelopment Tools are ma!e up of ",I26*I programming tools Q 8ront%en! !evelopment tools. +n! >ser Tools are ma!e up of 7ecision "upport Tools an! (4% ase! a!!%ons. #K. .igrating to 4lient2"erver $ +valuating the 4lient2"erver Option $ To evaluate the following efore !eci!ing on client2server. :pplication requirements, *eographical requirements Q (ro!uctivity *ains. 4lient2"erver is most suita le for applications are !ecision support or on%line transaction processing /OIT(0. The !istances are site or city Q oth !eveloper Q en!%user pro!uctivity are e3pecte! to increase. (lanning for .igration $ (lanning is nee!e! to re!uce pro lems with network loa!, training Q systems maintenance. .igration plan must inclu!e analysis, selection, prototyping Q implementation as activities. (lanning must inclu!e en!% users, !evelopers an! system a!ministrators as resources. To specify system requirements for en!%users, !evelopers, system managers an! the usiness as a whole. To evaluate usiness priorities to eliminate stagnation Q !isruption. #mplementing 4lient2"erver $ The "ystems #ntegration Iife 4ycle /"#I40 is ma!e up of preparation, !etailing an! e3ecution. .anaging "#I4 pro'ects involves planning, controlling Q completing. "ystem maintenance involves ensures relia ility, ensuring servicea ility an! monitoring performance. The training must cover en!%users, !evelopers Q system a!ministrators. OB:4I+ #. ",IT(I>" $ ",I is an +nglish like language consisting of comman!s to store, retrieve, maintain Q regulate access to your !ata ase. ",IT(I>" is an application that recogni)es Q e3ecutes ",I comman!s Q speciali)e! ",IT(lus comman!s that can customi)e reports, provi!e help Q e!it facility Q maintain system varia les. NKI $ Null value function converts a null value to a non%null value for the purpose of evaluating an e3pression. Numeric 8unctions accept numeric #2( Q return numeric values. They are .O7, ",BT, BO>N7, TB>N4 Q (OW+B. 7ate 8unctions are :77L.ONT@", I:"TL7:&, N+JTL7:&, .ONT@"L9+TW++N Q "&"7:T+. 4haracter 8unctions are #N#T4:(, >((+B, IOW+B, ">9"TB Q I+N*T@. :!!itional functions are *B+:T+"T Q I+:"T. *roup 8unctions returns results ase! upon groups of rows rather than one result per row, use group functions. They are :K*, 4O>NT, .:J, .#N Q ">.. TT#TI+ Q 9T#TI+ are comman!s to control report hea!ings Q footers. 4OI>.N comman! !efine column hea!ings Q format !ata values. 9B+:F comman! clarify reports y suppressing repeate! values, skipping lines Q allowing for controlle! reak points. 4O.(>T+ comman! control computations on su sets create! y the 9B+:F comman!. "+T comman! changes the system varia les affecting the report environment. "(OOI comman! creates a print file of the report. =O#N is the form of "+I+4T comman! that com ines info from two or more ta les. Types of =oins are "imple /+qui'oin Q Non%+qui'oin0, Outer Q "elf 'oin. +qui'oin returns rows from two or more ta les 'oine! together ase! upon a equality con!ition in the W@+B+ clause. Non%+qui'oin returns rows from two or more ta les ase! upon a relationship other than the equality con!ition in the W@+B+ clause. Outer =oin com ines two or more ta les returning those rows from one ta le that have no !irect match in the other ta le. "elf =oin 'oins a ta le to itself as though it were two separate ta les. "et Operators supporte! y Oracle are $ >nion is the pro!uct of two or more ta les. #ntersect is the pro!uct of two ta les listing only the matching rows. .inus is the pro!uct of two ta les listing only the non%matching rows. 4orrelate! "u query is a su query that is evaluate! once for each row processe! y the parent statement. (arent statement can e "elect, >p!ate or 7elete. >se 4B", to answer multipart questions whose answer !epen!s on the value in each row processe! y parent statement. .ultiple columns can e returne! from a Neste! "u query. "equences are use! for generating sequence num ers without any overhea! of locking. 7raw ack is that after generating a sequence num er if the transaction is rolle! ack, then that sequence num er is lost. "ynonyms is the alias name for ta le, views, sequences Q proce!ures an! are create! for reasons of "ecurity an! 4onvenience. Two levels are (u lic % create! y 79: Q accessi le to all the users. (rivate % :ccessi le to creator only. :!vantages are referencing without specifying the owner an! 8le3i ility to customi)e a more meaningful naming convention.

Page 40 of 74

#n!e3es are optional structures associate! with ta les use! to spee! query e3ecution an!2or guarantee uniqueness. 4reate an in!e3 if there are frequent retrieval of fewer than -E%-<U of the rows in a large ta le an! columns are reference! frequently in the W@+B+ clause. #mplie! tra!eoff is query spee! vs. up!ate spee!. Oracle automatically up!ate in!e3es. 4oncatenate! in!e3 ma3. is -? columns. 7ata types $ .a3. columns in a ta le is 1<<. .a3. 4har si)e is 1<<, Iong is ?;F Q Num er is 6C !igits. 4annot ,uery on a long column. 4har, Karchar1 .a3. si)e is 1EEE Q !efault is - yte. Num er/p,s0 p is precision range - to 6C, s is scale %C; to -1A. Iong 4haracter !ata of varia le length upto 1*9. 7ate Bange from =an ;A-1 94 to 7ec ;A-1 :7. Baw "tores 9inary !ata /*raphics #mage Q 7igiti)e! "oun!0. .a3. is 1<< ytes. .sla el 9inary format of an O" la el. >se! primarily with Truste! Oracle. Or!er of ",I statement e3ecution $ Where clause, *roup 9y clause, @aving clause, Or!er 9y clause Q "elect. Transaction is !efine! as all changes ma!e to the !ata ase etween successive commits. 4ommit is an event that attempts to make !ata in the !ata ase i!entical to the !ata in the form. #t involves writing or posting !ata to the !ata ase an! committing !ata to the !ata ase. 8orms check the vali!ity of the !ata in fiel!s an! recor!s !uring a commit. Kali!ity check are uniqueness, consistency an! ! restrictions. (osting is an event that writes #nserts, >p!ates Q 7eletes in the forms to the !ata ase ut not committing these transactions to the !ata ase. Boll ack causes work in the current transaction to e un!one. "avepoint is a point within a particular transaction to which you may roll ack without rolling ack the entire transaction. "et Transaction is to esta lish properties for the current transaction. Iocking are mechanisms inten!e! to prevent !estructive interaction etween users accessing !ata. Iocks are use! to achieve 4onsistency $ :ssures users that the !ata they are changing or viewing is not change! until the are thro' with it. #ntegrity $ :ssures !ata ase !ata an! structures reflects all changes ma!e to them in the correct sequence. Iocks ensure !ata integrity an! ma3imum concurrent access to !ata. 4ommit statement releases all locks. Types of locks are given elow. 7ata Iocks protects !ata i.e. Ta le or Bow lock. 7ictionary Iocks protects the structure of !ata ase o 'ect i.e. ensures ta le's structure !oes not change for the !uration of the transaction. #nternal Iocks Q Iatches protects the internal !ata ase structures. They are automatic. +3clusive Iock allows queries on locke! ta le ut no other activity is allowe!. "hare Iock allows concurrent queries ut prohi its up!ates to the locke! ta les. Bow "hare allows concurrent access to the locke! ta le ut prohi its for a e3clusive ta le lock. Bow +3clusive same as Bow "hare ut prohi its locking in share! mo!e. "hare! Bow +3clusive locks the whole ta le an! allows users to look at rows in the ta le ut prohi it others from locking the ta le in share or up!ating them. "hare >p!ate are synonymous with Bow "hare. 7ea!lock is a unique situation in a multi user system that causes two or more users to wait in!efinitely for a locke! resource. 8irst user nee!s a resource locke! y the secon! user an! the secon! user nee!s a resource locke! y the first user. To avoi! !ea! locks, avoi! using e3clusive ta le lock an! if using, use it in the same sequence an! use 4ommit frequently to release locks. .utating Ta le is a ta le that is currently eing mo!ifie! y an #nsert, >p!ate or 7elete statement. 4onstraining Ta le is a ta le that a triggering statement might nee! to rea! either !irectly for a ",I statement or in!irectly for a !eclarative Beferential #ntegrity constraints. (seu!o 4olumns ehaves like a column in a ta le ut are not actually store! in the ta le. +.g. 4urrval, Ne3tval, Bowi!, Bownum, Ievel etc. ",ITIoa!er is a pro!uct for moving !ata in e3ternal files into ta les in an Oracle !ata ase. To loa! !ata from e3ternal files into an Oracle !ata ase, two types of input must e provi!e! to ",ITIoa!er $ the !ata itself an! the control file. The control file !escri es the !ata to e loa!e!. #t !escri es the Names an! format of the !ata files, "pecifications for loa!ing !ata an! the 7ata to e loa!e! /optional0. #nvoking the loa!er sqlloa! username2passwor! controlfilename RoptionsS (I2",I $ 7ata types are N>.9+B, 4@:B2K:B4@:B1, 7:T+ Q 9OOI+:N. :rrays are not allowe! Q only one i!entifier per line is allowe!. :ttri utes of (I2",I o 'ects are UT&(+, UBOWT&(+. (I2",I 9lock is a stan!ar! (I2",I co!e segment. 9lock consists of three parts. 7eclarative "ection for varia les, constants Q e3ceptions. This section is optional. +3ecuta le "ection which is man!atory. +3ception @an!lers which is optional. (I2",I supports only 7.I i.e. #N"+BT, >(7:T+, 7+I+T+ Q "+I+4T...#NTO. ",I 8unctions can e reference! within a ",I statement i.e. Numeric /",BT,BO>N7,(OW+B0, 4haracter /I+N*T@,>((+B0, 7:T+ /:77L.ONT@",.ONT@"L9+TW++N0 Q

Page 41 of 74

*roup /:K*,.:J,4O>NT0. .ost ",I functions are availa le outsi!e ",I statement e3cept for group functions. 4o!e "imple Ioops repeats a sequence of statements multiple times. "ynta3 $ IOO( R"equence of "tatementsS +N7 IOO(O 4o!e Numeric 8OB Ioops repeat a sequence of statements a fi3e! num er of times. "ynta3 $ 8OB Rin!e3S #N __ B+K+B"+ `` RintegerS..RintegerS IOO( Rsequence of statementsS +N7 IOO(O Rin!e3S is implicitly of type num er. 7efine! only within the loop Q Kalue can e reference! in an e3pression, ut a new value cannot e assigne! to the in!e3 within the loop. 4o!e While Ioops repeats a sequence of statements until a specific con!ition is no longer TB>+. "ynta3 $ W@#I+ Rcon!itionS IOO( Rsequence of statementsS +N7 IOO(O Rcon!itionS can e any legal (I2",I con!ition Q statements will e repeate! as long as con!ition evaluates to TB>+. 4o!e *OTO "tatements 'umps to a !ifferent place in the (I2",I lock. "ynta3 $ *OTO la elLnameO Iegally use a *OTO a statement that is in the same sequence of statements as the *OTO. #n the sequence of statements that encloses the *OTO statement /outer lock0. Ia els can la el any statement. >se! as targets for *OTO statements, use la els for locks an! loops, Ia el a lock to allow referencing of 7+4I:B+! o 'ects that woul! otherwise not e visi le ecause of scoping rules, Ia el a lock to allow a varia le to e reference! that might e hi!!en y a column name, Ia el a loop to allow an o 'ect to e reference that woul! otherwise not e visi le ecause of scoping rules Q Ia el an +J#T as a convenient way to specify e3its from outer loops. 4ursors are associate! with every ",I 7.I statement processe! y (I2",I. Two types are +3plicit i.e. .ultiple row "+I+4T statements Q #mplicit i.e. #N"+BT, >(7:T+, 7+I+T+ Q "+I+4T...#NTO statements. #mplicit cursor is calle! the ",I cursor%it stores info concerning the processing of the last ",I statement not associate! with an e3plicit cursor. O(+N, 8+T4@ Q 4IO"+ !o not apply. :ll cursor attri utes apply. 4ursor has to e e3plicitly !efine! when a query returns multiple rows to process eyon! the first row returne! y the query Q to keep track of which row is currently eing processe!. 7eclare the cursor to associate its name with a "+I+4T statement. "ynta3 $ 7+4I:B+ 4>B"OB RcursorLnameS #" RregularLselectLstatementSO Open the cursor to process the "+I+4T statement an! store the returne! rows in the cursor. "ynta3 $ O(+N RcursorLnameSO 8etch !ata from the cursor an! store it in specifie! varia les. "ynta3 $ 8+T4@ RcursorLnameS #NTO Rvar-, var1...SO 4lose the cursor to free up resources. 4ursors must e close! efore they can e reopene!. "ynta3 $ 4IO"+ RcursorLnameS +3plicit 4ursor :ttri utes are UNOT8O>N7, U8O>N7, UBOW4O>NT Q U#"O(+N. Beference the current cursor row with the W@+B+ 4>BB+NT O8 statement. The cursor must e !eclare! with a 8OB >(7:T+ O8 clause. "ynta3 $ W@+B+ 4>BB+NT O8 RcursorLnameS Beference 4ursors 8OB Ioops to specify a sequence of statements to e repeate! once for each row that is returne! y the cursor with the 4ursor 8OB Ioop. "ynta3 $ 8OB Rrecor!LnameS #N RcursorLnameS IOO( %%statements to e repeate! go here +N7 IOO(O 4ursor 8OB loops /48I0 are similar to Numeric 8or Ioops/N8I0. 48I specify a set of rows from a ta le using the cursor's name. N8I specify an integer range. 48I recor! takes on vales of each row. N8I in!e3 takes on each value in the range. Becor!Lname is implicitly !eclare! as recor!Lname cursorLnameUBOWT&(+ When a 48I is initiate!, an implicit O(+N cursorLname is initiate!. 8or each row that satisfies the query associate! with the cursor, an implicit 8+T4@ is e3ecute! into the components of recor!Lname. When there are no more rows left to 8+T4@, an implicit 4IO"+ cursorLname is e3ecute! an! the loop is e3ite!. 7eclare cursors to use parameters "ynta3 $ 7+4I:B+ 4>B"OB RcursorLnameS __/paramLname paramLtype0`` #" Rregular select statementSO +3ception @an!lers $ #n (I2",I, errors are calle! e3ceptions. When an e3ception is raise!, processing 'umps to the e3ception han!lers. :n e3ception han!ler is a sequence of statements to e processe! when a certain e3ception occurs. When an e3ception han!ler is complete, processing of the lock terminates. Two types are (re!efine! #nternal

Page 42 of 74

+3ceptions which correspon!s to appro3imately 1E common OB:4I+ errors Q Baise! automatically y (I2",I in response to an OB:4I+ error. +g.tooLmanyLrows,noL!ataLfoun!,invali!Lcursor,valueLerrori.e. arithmetic,numeric,string,conversion or constraint error occurre!, )eroL!ivi!e, !upLvalLonLin!e3,cursorLalrea!yLopen etc. >ser%7efine! +3ceptions must e !eclare! Q must e B:#"+! e3plicitly. Only one han!ler per lock may e active at a time Q #f an e3ception is raise! in a han!ler, the search for a han!ler for the new e3ception egins in the enclosing lock of the current lock. +3ception%#nit $ +3ceptions may only e han!le! y name not OB:4I+ error num er. "o, name an OB:4I+ error so that a han!ler can e provi!e! specifically for that error. "ynta3 $ (B:*.: +J4+(T#ONL#N#T /RuserL!efine!Le3ceptionLnameS, ROB:4I+LerrorLnum erS0O ",I4O7+ Q ",I+BB. provi!es info on the e3ception currently eing han!le! Q especially useful in the OT@+B" han!ler. ",I4O7+ returns the OB:4I+ error num er of the e3ception, or - if it was a user%!efine! e3ception. ",I+BB. returns the OB:4I+ error message associate! with the current value of ",I4O7+ Q can also use any OB:4I+ error num er as an argument. ",I4O7+ Q ",I+BB. cannot e use! within a ",I statement. #f no e3ception is active ",I4O7+ N E Q ",I+BB. N 'normal, successful completion'.

Oracle :
-0 What are the 9ack groun! processes in Oracle an! what are they. This is one of the most frequently aske! question.There are asically D (rocesses ut in a general system we nee! to mention the first five ackgroun! processes.They !o the house keeping activities for the Oracle an! are common in any system. The various ackgroun! processes in oracle are a0 7ata 9ase Writer/79WB0 $ 7ata 9ase Writer Writes .o!ifie! locks from 7ata ase uffer cache to 7ata 8iles.This is require! since the !ata is not written whenever a transaction is commite!. 0 IogWriter/I*WB0 $ IogWriter writes the re!o log entries to !isk. Be!o Iog !ata is generate! in re!o log uffer of "*:. :s transaction commits an! log uffer fills, I*WB writes log entries into a online re!o log file. c0 "ystem .onitor/".ON0 $ The "ystem .onitor performs instance recovery at instance startup.This is useful for recovery from system failure !0 (rocess .onitor/(.ON0 $ The (rocess .onitor peforms process recovery when user (rocess fails. (mon 4lears an! 8rees resources that process was using. e0 4heck(oint/4F(T0 $ :t "pecifie! times, all mo!ifie! !ata ase uffers in "*: are written to !ata files y 79WB at 4heckpoints an! >p!ating all !ata files an! control files of !ata ase to in!icate the most recent checkpoint f0 :rchieves/:B4@0 $ The :rchiver copies online re!o log files to archival storal when they are usy. g0 Becoveror/B+4O0 $ The Becoveror is use! to resolve the !istri ute! transaction in network h0 7ispatcher /7nnn0 $ The 7ispatcher is useful in .ulti Threa!e! :rchitecture i0 Ickn $ We can have upto -E lock processes for inter instance locking in parallel sql. 10 @ow many types of "ql "tatements are there in Oracle There are asically ? types of sql statments.They are a0 7ata 7efination Ianguage/77I0 $ The 77I statments !efine an! maintain o 'ects an! !rop o 'ects. 0 7ata .anipulation Ianguage/7.I0 $ The 7.I statments manipulate !ata ase !ata. c0 Transaction 4ontrol "tatements $ .anage change y 7.I !0 "ession 4ontrol $ >se! to control the properties of current session ena ling an! !isa ling roles an! changing .e.g :lter "tatements,"et Bole e0 "ystem 4ontrol "tatements $ 4hange (roperties of Oracle #nstance .e.g$$ :lter "ystem f0 +m e!!e! "ql $ #ncorporate 77I,7.I an! T.4." in (rogramming Ianguage.e.g$$ >sing the "ql "tatements in languages such as '4', Open,8etch, e3ecute an! close 60 What is a Transaction in Oracle : transaction is a Iogical unit of work that compromises one or more ",I "tatements e3ecute! y a single >ser. :ccor!ing to :N"#, a transaction egins with first e3ecuta le statment an! en!s when it is e3plicitly commite! or rolle! ack. ;0 Fey Wor!s >se! in Oracle The Fey wor!s that are use! in Oracle are a0 4ommiting $ : transaction is sai! to e commite! when the transaction makes permanent changes resulting from the ",I statements. 0 Boll ack $ : transaction that retracts any of the changes resulting from ",I statements in Transaction. c0 "ave(oint $ 8or long transactions that contain many ",I statements, interme!iate markers or savepoints are !eclare!. "avepoints can e use! to !ivi!e a transactino into smaller points. !0 Bolling 8orwar! $ (rocess of applying re!o log !uring recovery is calle! rolling forwar!.

Page 43 of 74

e0 4ursor $ : cursor is a han!le / name or a pointer0 for the memory associate! with a specific stament. : cursor is asically an area allocate! y Oracle for e3ecuting the "ql "tatement. Oracle uses an implicit cursor statement for "ingle row query an! >ses +3plcit cursor for a multi row query. f0 "ystem *lo al :rea/"*:0 $ The "*: is a share! memory region allocate! y the Oracle that contains 7ata an! control information for one Oracle #nstance.#t consists of 7ata ase 9uffer 4ache an! Be!o log 9uffer. g0 (rogram *lo al :rea /(*:0 $ The (*: is a memory uffer that contains !ata an! control information for server process. h0 7ata ase 9uffer 4ache $ 7ata ese 9uffer of "*: stores the most recently use! locks of !atat ase !ata.The set of !ata ase uffers in an instance is calle! 7ata ase 9uffer 4ache. i0 Be!o log 9uffer $ Be!o log 9uffer of "*: stores all the re!o log entries. '0 Be!o Iog 8iles $ Be!o log files are set of files that protect altere! !ata ase !ata in memory that has not een written to 7ata 8iles. They are asically use! for ackup when a !ata ase crashes. k0 (rocess $ : (rocess is a 'threa! of control' or mechansim in Operating "ystem that e3ecutes series of steps. <0 What are (roce!ure,functions an! (ackages (roce!ures an! functions consist of set of (I2",I statements that are groupe! together as a unit to solve a specific pro lem or perform set of relate! tasks. (roce!ures !o not Beturn values while 8unctions return one One Kalue (ackages (rovi!e a metho! of encapsulating an! storing relate! proce!ures, functions, varia les an! other (ackage 4ontents ?0 What are 7ata ase Triggers an! "tore! (roce!ures 7ata ase Triggers $$ 7ata ase Triggers are (roce!ures that are automatically e3ecute! as a result of insert in, up!ate to, or !elete from ta le. 7ata ase triggers have the values ol! an! new to !enote the ol! value in the ta le efore it is !elete! an! the new in!icate! the new value that will e use!. 7T are useful for implementing comple3 usiness rules which cannot e enforce! using the integrity rules.We can have the trigger as 9efore trigger or :fter Trigger an! at "tatement or Bow level. eg. operations insert,up!ate ,!elete 6 efore ,after 6T1 : total of ? com inatons :t statment level/once for the trigger0 or row level/ for every e3ecution 0 ? T 1 : total of -1. Thus a total of -1 com inations are there an! the restriction of usage of -1 triggers has een lifte! from Oracle A.6 Onwar!s. "tore! (roce!ures $ "tore! (roce!ures are (roce!ures that are store! in 4ompile! form in the !ata ase.The a!vantage of using the store! proce!ures is that many users can use the same proce!ure in compile! an! rea!y to use format. A0 @ow many #ntegrity Bules are there an! what are they There are Three #ntegrity Bules. They are as follows $$ a0 +ntity #ntegrity Bule $ The +ntity #ntegrity Bule enforces that the (rimary key cannot e Null 0 8oreign Fey #ntegrity Bule $ The 8F#B !enotes that the relationship etween the foreign key an! the primary key has to e enforce!.When there is !ata in 4hil! Ta les the .aster ta les cannot e !elete!. c0 9usiness #ntegrity Bules $ The Thir! #ntigrity rule is a out the comple3 usiness processes which cannot e implemente! y the a ove 1 rules. C0 What are the Karious .aster an! 7etail Belation ships. The various .aster an! 7etail Belationship are a0 Non#solate! $ The .aster cannot e !elete! when a chil! is e3isiting 0 #solate! $ The .aster can e !elete! when the chil! is e3isiting c0 4asca!ing $ The chil! gets !elete! when the .aster is !elete!. D0 What are the Karious 9lock 4oor!ination (roperties The various 9lock 4oor!ination (roperties are a0 #mme!iate 7efault "etting. The 7etail recor!s are shown when the .aster Becor! are shown. 0 7effere! with :uto ,uery Oracle 8orms !efer fetching the !etail recor!s until the operator navigates to the !etail lock. c0 7effere! with No :uto ,uery The operator must navigate to the !etail lock an! e3plicitly e3ecute a query -E0 What are the 7ifferent Optimisation Techniques The Karious Optimisation techniques are a0 +3ecute (lan $ we can see the plan of the query an! change it accor!ingly ase! on the in!e3es 0Optimi)erLhint$ setLitemLproperty/'7ept9lock',O(T#.#P+BL@#NT,'8#B"TLBOW"'0O "elect 2T5 8irstLBows T2 7eptno,7name,Ioc,Bowi! from !ept where /7eptno S 1<0 c0 Optimi)eL"ql $ 9y setting the Optimi)eL"ql N No, Oracle 8orms assigns a single cursor for all ",I statements.This slow !owns the processing ecause for evertime the ",I must e parse! whenver they are e3ecute!. f;<run mo!ule N myLfirstform useri! N scott2tiger optimi)eLsql N No

Page 44 of 74

!0 Optimi)eLTp $ 9y setting the Optimi)eLTpN No, Oracle 8orms assigns seperate cursor only for each query "+I+4T statement. :ll other ",I statements reuse the cursor. f;<run mo!ule N myLfirstform useri! N scott2tiger optimi)eLTp N No --0 @ow !o u implement the #f statement in the "elect "tatement We can implement the if statement in the select statement y using the 7eco!e statement. e.g select 7+4O7+ /+.(L4:T,'-','8irst','1','"econ!'Null0O @ere the Null is the else statement where null is !one . -10 @ow many types of +3ceptions are there There are 1 types of e3ceptions. They are a0 "ystem +3ceptions e.g. When noL!ataLfoun!, When tooLmanyLrows 0 >ser 7efine! +3ceptions e.g. .yLe3ception e3ception When .yLe3ception then -60 What are the inline an! the precompiler !irectives The inline an! precompiler !irectives !etect the values !irectly -;0 @ow !o you use the same lov for 1 columns We can use the same lov for 1 columns y passing the return values in glo al values an! using the glo al values in the co!e -<0 @ow many minimum groups are require! for a matri3 report The minimum num er of groups in matri3 report are ; -?0 What is the !ifference etween static an! !ynamic lov The static lov contains the pre!etermine! values while the !ynamic lov contains values that come at run time -A0 What are snap shots an! views "napshots are mirror or replicas of ta les. Kiews are uilt using the columns from one or more ta les. The "ingle Ta le Kiew can e up!ate! ut the view with multi ta le cannot e up!ate! -C0 What are the OO(" concepts in Oracle. Oracle !oes implement the OO(" concepts. The est e3ample is the (roperty 4lasses. We can categorise the properties y setting the visual attri utes an! then attach the property classes for the o 'ects. OO(" supports the concepts of o 'ects an! classes an! we can consi!er the peroperty classes as classes an! the items as o 'ects -D0 What is the !ifference etween can!i!ate key, unique key an! primary key 4an!i!ate keys are the columns in the ta le that coul! e the primary keys an! the primary key is the key that has een selecte! to i!entify the rows. >nique key is also useful for i!entifying the !istinct rows in the ta le. 1E0 What is concurrency 4uncurrency is allowing simultaneous access of same !ata y !ifferent users. Iocks useful for accesing the !ata ase are a0 +3clusive The e3clusive lock is useful for locking the row when an insert,up!ate or !elete is eing !one.This lock shoul! not e applie! when we !o only select from the row. 0 "hare lock We can !o the ta le as "hareLIock as many shareLlocks can e put on the same resource. 1-0 (revileges an! *rants (revileges are the right to e3ecute a particulare type of ",I statements. eg. Bight to 4onnect, Bight to create, Bight to resource *rants are given to the o 'ects so that the o 'ect might e accesse! accor!ingly.The grant has to e given y the owner of the o 'ect. 110 Ta le "pace,7ata 8iles,(arameter 8ile, 4ontrol 8iles Ta le "pace $ The ta le space is useful for storing the !ata in the !ata ase.When a !ata ase is create! two ta le spaces are create!. a0 "ystem Ta le space $ This !ata file stores all the ta les relate! to the system an! ! a ta les 0 >ser Ta le space $ This !ata file stores all the user relate! ta les We shoul! have seperate ta le spaces for storing the ta les an! in!e3es so that the access is fast.

Page 45 of 74

7ata 8iles $ +very Oracle 7ata 9ase has one or more physical !ata files.They store the !ata for the !ata ase.+very !atafile is associate! with only one !ata ase.Once the 7ata file is create! the si)e cannot change.To increase the si)e of the !ata ase to store more !ata we have to a!! !ata file. (arameter 8iles $ (arameter file is nee!e! to start an instance.: parameter file contains the list of instance configuration parameters e.g.$$ ! L lockL uffers N <EE ! Lname N OB:A ! L!omain N u.s.acme lang 4ontrol 8iles $ 4ontrol files recor! the physical structure of the !ata files an! re!o log files. They contain the 7 name, name an! location of ! s, !ata files ,re!o log files an! time stamp. 160 (hysical "torage of the 7ata The finest level of granularity of the !ata ase are the !ata locks. 7ata 9lock $ One 7ata 9lock correspon! to specific num er of physical !ata ase space +3tent $ +3tent is the num er of specific num er of contigious !ata locks. "egments $ "et of +3tents allocate! for +3tents. There are three types of "egments a0 7ata "egment $ Non 4lustere! Ta le has !ata segment !ata of every ta le is store! in cluster !ata segment 0 #n!e3 "egment $ +ach #n!e3 has in!e3 segment that stores !ata c0 Boll 9ack "egment $ Temporarily store 'un!o' information 1;0 What are the (ct 8ree an! (ct >se! (ct 8ree is use! to !enote the percentage of the free space that is to e left when creating a ta le. "imilarly (ct >se! is use! to !enote the percentage of the use! space that is to e use! when creating a ta le eg. (ctfree 1E, (ctuse! ;E 1<0 What is Bow 4haining The !ata of a row in a ta le may not e a le to fit the same !ata lock.7ata for row is store! in a chain of !ata locks . 1?0 What is a 1 (hase 4ommit Two (hase commit is use! in !istri ute! !ata ase systems. This is useful to maintain the integrity of the !ata ase so that all the users see the same values. #t contains 7.I statements or Bemote (roce!ural calls that reference a remote o 'ect. There are asically 1 phases in a 1 phase commit. a0 (repare (hase $ *lo al coor!inator asks participants to prepare 0 4ommit (hase $ 4ommit all participants to coor!inator to (repare!, Bea! only or a ort Beply 1A0 What is the !ifference etween !eleting an! truncating of ta les 7eleting a ta le will not remove the rows from the ta le ut entry is there in the !ata ase !ictionary an! it can e retrieve! 9ut truncating a ta le !eletes it completely an! it cannot e retrieve!. 1C0 What are mutating ta les When a ta le is in state of transition it is sai! to e mutating. eg $$ #f a row has een !elete! then the ta le is sai! to e mutating an! no operations can e !one on the ta le e3cept select. 1D0 What are 4o!! Bules 4o!! Bules !escri e the i!eal nature of a B79.". No B79." satisfies all the -1 co!! rules an! Oracle "atisfies -- of the -1 rules an! is the only B! ms to satisfy the ma3imum num er of rules. 6E0 What is Normalisation Normalisation is the process of organising the ta les to remove the re!un!ancy.There are mainly < Normalisation rules. a0 - Normal 8orm $ : ta le is sai! to e in -st Normal 8orm when the attri utes are atomic 0 1 Normal 8orm $ : ta le is sai! to e in 1n! Normal 8orm when all the can!i!ate keys are !epen!ant on the primary key c0 6r! Normal 8orm $ : ta le is sai! to e thir! Normal form when it is not !epen!ant transitively 6-0 What is the 7ifference etween a post query an! a pre query : post query will fire for every row that is fetche! ut the pre query will fire only once. 610 7eleting the 7uplicate rows in the ta le We can !elete the !uplicate rows in the ta le y using the Bowi! 660 4an > !isa le !ata ase trigger? @ow? &es. With respect to ta le

Page 46 of 74

:IT+B T:9I+ T:9I+ __ 7#":9I+ allLtrigger `` 6;0 What is pseu!o columns ? Name them? : pseu!ocolumn ehaves like a ta le column, ut is not actually store! in the ta le. &ou can select from pseu!ocolumns, ut you cannot insert, up!ate, or !elete their values. This section !escri es these pseu!ocolumns$ T 4>BBK:I T N+JTK:I T I+K+I T BOW#7 T BOWN>. 6<0 @ow many columns can ta le have? The num er of columns in a ta le can range from - to 1<;. 6?0 #s space acquire! in locks or e3tents ? #n e3tents . 6A0 what is clustere! in!e3? #n an in!e3e! cluster, rows are store! together ase! on their cluster key values . 4an not applie! for @:"@. 6C0 what are the !atatypes supporte! 9y oracle /#NT+BN:I0? Karchar1, Num er,4har , .I"I:9+I. 6D 0 What are attri utes of cursor? U8O>N7 , UNOT8O>N7 , U#"O(+N,UBOW4O>NT ;E0 4an you use select in 8BO. clause of ",I select ? &es.

'(I
-0 What is a visual attri ute? Kisual attri utes are the font, color, an! pattern properties that you set for form an! menu o 'ects that appear in your application's interface. 10 7iff. etween K:T an! (roperty 4lass? imp Name! visual attri utes !efine only font, color, an! pattern attri utesO property classes can contain these an! any other properties.&ou can change the appearance of o 'ects at runtime y changing the name! visual attri ute programmaticallyO property class assignment cannot e change! programmatically. When an o 'ect is inheriting from oth a property class an! a name! visual attri ute, the name! visual attri ute settings take prece!ence, an! any visual attri ute properties in the class are ignore!. 6 0 Which trigger relate! to mouse? T When%.ouse%4lick T When%.ouse%7ou le4lick T When%.ouse%7own T When%.ouse%+nter T When%.ouse%Ieave T When%.ouse%.ove T When%.ouse%>p ;0 What is 4urrent recor! attri ute property? "pecifies the name! visual attri ute use! when an item is part of the current recor!. 4urrent Becor! :ttri ute is frequently use! at the lock level to !isplay the current row in a multi%recor! #f you !efine an item%level 4urrent Becor! :ttri ute, you can !isplay a pre%!etermine! item in a special color when it is part of the current recor!, ut you cannot !ynamically highlight the current item, as the input focus changes. <0 4an u change K:T at run time? &es. &ou can programmatically change an o 'ect's name! visual attri ute setting to change the font, color, an! pattern of the o 'ect at runtime. ?0 4an u set !efault font in forms? &es. 4hange win!ows registry/rege!it0. "et form;<Lfont to the !esire! font. A0 4an u have OI+ o 'ects in forms?

Page 47 of 74

&es. C0 4an u have K9J an! O4J controls in forms ? &es. D0 What r the types of win!ows /Win!ow style0? "pecifies whether the win!ow is a 7ocument win!ow or a 7ialog win!ow. -E0 What is OI+ :ctivation style property? "pecifies the event that will activate the OI+ containing item. --0 4an u change the mouse pointer ? @ow? &es. "pecifies the mouse cursor style. >se this property to !ynamically change the shape of the cursor. 6.E 7ata 9ase :!ministration 6.- #ntro!uction to 79: -. What is a !ata ase instance ? +3plain : !ata ase instance /server0 is a set of memory structures an! ackgroun! processes that access a set of !ata ase files. The process can e share! y all users. The memory structures that are use! to store most querie! !ata from !ata ase. This helps us to improve !ata ase performance y !ecreasing the amount of #2O performe! against !ata file. 1. What is parallel server? .ultiple instances accessing the same !ata ase /Only in .ulti%4(> environments0. 6. What is "chema ? The set of o 'ects owne! y user account is calle! the schema ;. What is an #n!e3 ? @ow it is implemente! in Oracle 7ata ase ? :n in!e3 is a !ata ase structure use! y the server to have !irect access of a row in a ta le. :n in!e3 is automatically create! when a unique or primary key constraint clause is specifie! in create ta le comman! /Ker A.E0 <. What is clustres ? *roup of ta les physically store! together ecause they share common columns an! are often use! together is calle! 4lusters. ?. What is a cluster key ? The relate! columns of the ta les are calle! the cluster key. The cluster key is in!e3e! using a cluster in!e3 an! its value is stores only once for multiple ta les in the cluster. A. What are the asic element of 9ase configuration of an oracle 7ata ase ? #t consists of one or more !ata files one or more control files two or more re!o log files The !ata ase contains .ultiple users2schemas one or more roll ack segments one or more ta lespaces 7ata !ictionary ta les

Page 48 of 74

>ser o 'ects /ta les,in!e3es,views etc0 The server that access the !ata ase consists of "*: /7ata ase uffer, 7ictionary 4ache 9uffers, re!o log uffers,"hare! ",I pool0 ".ON (.ON I*WB 79WB :B4@ 4F(T B+4O 7ispatcher >ser process with associate! (*: C. What is !ea!lock ? +3plain. Two processes waiting to up!ate the rows of a ta le which are locke! y the other process then !ea!lock arises. #n a !ata ase environment this will often happen ecause of not issuing proper row lock comman!s. (oor !esign of front%en! application may cause this situation an! the performance of server will re!uce !rastically. These locks will e release! automatically when a commit2roll ack operation performe! or any one of this processes eing kille! e3ternally. 6.1 .emory .anagement D. What is "*: ? @ow it is !ifferent from Ker ? an! Ker A ? The "ystem *lo al :rea in a Oracle !ata ase is the area in memory to facilitates the transfer of information etween users. #t hol!s the most recently requeste! structural information a out the !ata ase. The structure is 7ata ase uffers, 7ictionary 4ache, Be!o Iog 9uffer an! "hare! ",I pool /Ker A0 area. -E. What is "hare! ",I pool ? The !ata !ictionary cache is store! in an area in "*: calle! the "hare! ",I (ool. This will allow sharing of parse! ",I statements among concurrent users. --. What is meant y (rogram *lo al :rea /(*:0 ? #t is area in memory that is use! y a "ingle Oracle >ser process. -1. What is a !ata segment ? 7ata segment are the physical areas within a !ata ase lock in which the !ata associate! with ta les an! clusters are store!. -6. What are the factors causing the reparsing of ",I statements in "*: ? 7ue to insufficient "hare! ",I pool si)e .onitor the ratio of the reloa!s takes place while e3ecuting ",I statements. #f the ratio is greater that - then increase the "@:B+7L(OOIL"#P+. 6.6 Iogical Q (hysical :rchitecture of 7ata ase -;. What is 7ata ase 9uffers ? 7ata ase uffers are cache in the "*: use! to hol! the !ata locks that are rea! from the !ata segments in the !ata ase such as ta les, in!e3es an! clusters. 79L9IO4FL9>88+B" parameter in #N#T.OB: !eci!es the si)e. -<. What is !ictionary cache ? 7ictionary cache is information a out the !ata ase o 'ects store! in a !ata !ictionary ta le. -?. What is meant y recursive hits ?

Page 49 of 74

Num er of times processes repeate!ly query the !ictionary ta le is calle! recursive hits. #t is !ue to the !ata !ictionary cache is too small. 9y increasing the "@:B+7L(OOIL"#P+ parameter we can optimi)e the si)e of 7ata 7ictionary 4ache. -A. What is meant y re!o log uffer ? 4hanges ma!e to entries are written to the on%line re!o log files so that they can e use! in roll forwar! operation !uring !ata ase recoveries. 9efore writing them into the re!o log files, they will first rought to re!o log uffers in "*: an! I*WB will write into files frequently. IO*L9>88+B parameter will !eci!e the si)e. -C. @ow will you swap o 'ects into a !ifferent ta le space for an e3isting !ata ase ? +3port the user (erform import using the comman! imp system2manager fileNe3port.!p in!e3fileNnewfile.sql. This will create all !efinitions into newfile.sql. 7rop necessary o 'ects. Bun the script newfile.sql after altering the ta lespaces. #mport from the ackup for the necessary o 'ects. -D. Iist the Optimal 8le3i le :rchitecture /O8:0 of Oracle !ata ase ? or @ow can we organise the ta lespaces in Oracle !ata ase to have ma3imum performance ? "&"T+. % 7ata !ictionary ta les 7:T: % "tan!ar! operational ta les 7:T:1 % "tatic ta les use! for stan!ar! operations #N7+J+" % #n!e3es for "tan!ar! operational ta les #N7+J+"- % #n!e3es of static ta les use! for stan!ar! operations TOOI" % Tool ta le TOOI"- % #n!e3es for tools ta le B9" % "tan!ar! Operations Boll ack "egments B9"-,B9"1 % :!!itional2"pecial roll ack segments T+.( % Temporary purpose ta lespace T+.(L>"+B % Temporary ta lespace for users >"+B" % >ser ta lespaces. 1E. @ow will you force !ata ase to use particular roll ack segment ? "+T TB:N":4T#ON >"+ BOII9:4F "+*.+NT r sLname 1-. What is meant y free e3tent ? : free e3tent is a collection of continuous free locks in ta lespace. When a segment is !roppe! its e3tents are reallocate! an! are marke! as free. 11. @ow free e3tents are manage! in Ker ? an! Ker A. ? 8ree e3tents cannot e merge! together in Ker ?.E 8ree e3tents are perio!ically coalesces with the neigh oring free e3tent Ker A.E. 16. Which parameter in "torage clause will re!uce no of rows per lock ? (4T8B++ parameter Bow si)e also re!uces no of rows per lock. 1;. What is significance of having storage clause ? We can plan the storage for a ta le as how much initial e3tents are require!, how much can e e3ten!e! ne3t, how much U shoul! leave free for managing row up!ations etc. 1<. @ow !oes space allocation take place within a lock ? +ach lock contains entries as follows $ 8i3e! lock hea!er Karia le lock hea!er

Page 50 of 74

Bow hea!er, row !ate /.ultiple rows may e3ists0 (4T8B++ /U of free space for row up!ation in future0 1?. What is the role of (4T8B++ parameter is "torage clause ? This is use! to reserve certain amount of space in a lock for e3pansion of rows. 1A. What is the O(T#.:I parameter ? #t is use! to set the optimal length of roll ack segment. 1C. What is the functionality of "&"T+. ta lespace ? To manage the !ata ase level of transactions such as mo!ifications of the !ata !ictionary ta le that recor! information a out the free space usage. 1D. @ow will you create multiple roll ack segments in a !ata ase ? 4reate a !ata ase which implicitly creates a "&"T+. Boll ack "egment in a "&"T+. ta lespace. 4reate a "econ! Boll ack "egment name BE in the "&"T+. ta lespace. .ake new roll ack segment availa le /:fter shut!own, mo!ify init.ora file an! "tart !ata ase0 4reate other ta lespace /B9"0 for roll ack segments. 4reate a!!itional Boll ack segment in ta lespace /B9"0 7eactivate Boll ack "egment BE an! activate the newly create! roll ack segments. 6E. @ow the space utilisation takes place within roll ack segments ? #t will try to fit the transaction in a cyclic fashion to all e3isting e3tents. Once it foun! an e3tent is in use then it force! to acquire a new e3tent. /No of e3tents is ase! on the O(T#.:I si)e0. 6-. Why query fails sometimes ? Boll ack segment !ynamically e3tent to han!le larger transactions entry loa!s. : single transaction may wipeout all availa le free space in the Boll ack "egment Ta lespace. This prevents other user using Boll ack segment. 61. @ow will you monitor the space allocation ? 9y querying 79:L"+*.+NT ta le2Kiew 66. @ow will you monitor roll ack segment status ? ,uerying the 79:LBOII9:4FL"+*" view The status availa le as follows $ #N >"+ % Boll ack "egment is on%line :K:#I:9I+ % Boll ack "egment availa le ur not on%line O88%I#N+ % Boll ack "egment us off%line #NK:I#7 % Boll ack "egment !roppe! N++7" B+4OK+B& % 4ontains !ata ut nee! recovery or corrupte! (:BTI& :K:#I:9I+ % 4ontains !ata from an unresolve! transaction involving a !istri ute! !ata ase 6;. Iist the sequence of events when a large transaction that e3cee!s eyon! its optimal value when an entry wraps an! causes the roll ack segment to e3pan! into another e3ten!. Transaction 9egins :n entry is ma!e in the B9" hea!er for new transactions entry Transaction acquire! locks in an e3tent of B9" The entry attempts to wrap into secon! e3tent. None is availa le. "o that the B9" must e3tent. The B9" checks to see if it is ol!est inactive segment Ol!est inactive segment is eliminate! B9" e3ten!s The 7ata !ictionary ta le for space management are up!ate! Transaction 4ompletes.

Page 51 of 74

6<. @ow can we plan storage for very large ta les ? Iimit the num er of e3tents in the ta le "eparate the Ta le from its in!e3es :llocate sufficient temporary storage 6?. @ow will you estimate the space require! y non%clustere! ta les ? 4alculate the total lock hea!er si)e 4alculate the availa le !ata space per lock 4alculate the com ine! column length of the average row 4alculate the total average row si)e 4alculate the average num er rows that can fit in a lock 4alculate the num er of locks an! ytes require! for the ta le :fter arriving the calculation a!! the a!!itional space to calculate the initial e3tent si)e for working area 6A. #s it possi le to use raw !evices as !ata file an! what is the a!vantages over file system files ? &es. The a!vantages over file system files $ #2O will e improve! ecause Oracle is ye%passing the kernal while writing into !isk. 7isk 4orruption will e very less. 6C. What is a control file ? 7ata ase's overall physical architecture is maintaine! in a file calle! control file. #t will e use! to maintain internal consistency an! gui!e recovery operations. .ultiple copies of control files are a!visa le. 6D. @ow to implement the multiple control files for an e3isting !ata ase ? "hut!own the !ata ase 4opy one of the e3isting control file to new location' +!it config.ora file y a!!ing new control file name Bestart the !ata ase ;E. What is meant y Be!o Iog file mirroring ? @ow it can e achieve! ? (rocess of having a copy of re!o log files is calle! mirroring. This can e achieve! y creating group of log files together, so that I*WB will automatically writes them to all the mem ers of the current on%line re!o log group. #f any one group fails then !ata ase automatically switch over to ne3t group. ;-. What is a!vantage of having !isk sha!owing2.irroring ? "ha!ow set of !isks save as a ackup in the event of !isk failure. #n most Operating "ystem if any !isk failure occurs it automatically switchover to place of faile! !isk. #mprove! performance ecause of most O" support volume sha!owing can !irect file #2O request to use the sha!ow set of files instea! of the main set of files. This re!uces #2O loa! on the main set of !isks. ;1. What is use of roll ack segment in 7ata ase ? They allow the !ata ase to maintain rea! consistency etween multiple transactions. ;6. What is a Boll ack segment entry ? #t is the set of efore image !ata locks that contain rows that are mo!ifie! y a transaction. +ach Boll ack "egment entry must e complete! within one roll ack segment. : single roll ack segment can have multiple roll ack segment entries. ;;. What a hit ratio ? #t is a measure of well the !ata cache uffer is han!ling requests for !ata. @it Batio N /Iogical Bea!s % (hysical rea!s % @it .isses0 2 Iogical rea!s. ;<. When will e a segment release! ?

Page 52 of 74

When "egment is !roppe!. When "hrink /B9" only0 When truncate! /TB>N4:T+ use! with !rop storage option0 ;?. What are !isa!vantages of having raw !evices ? We shoul! !epen! on e3port2import utility for ackup2recovery /fully relia le0 The tar comman! cannot e use! for physical file ackup, instea! we can use !! comman! which is less fle3i le an! has limite! recoveries. ;A. Iist the factors that can affect the accuracy of the estimations ? The space use! transaction entries an! !elete! recor!s !oes not ecome free imme!iately after completion !ue to !elaye! cleanout. Trailing nulls an! length ytes are not store!. #nserts of, up!ates to, an! !eletes of rows as well as columns larger than a single !ata lock, can cause fragmentation an! chaine! row pieces. 6.; 7ata ase "ecurity Q :!ministration ;C. What is user account in Oracle !ata ase ? :n user account is not a physical structure in 7ata ase ut it is having important relationship to the o 'ects in the !ata ase an! will e having certain privileges. ;D. @ow will you enforce security using stores proce!ures ? 7on't grant user access !irectly to ta les within application #nstea! grant the a ility to access the proce!ures that access the ta les When proce!ure e3ecute! it will e3ecute the privilege of proce!ures owner. >sers cannot access ta les e3cept via the proce!ure. <E. What are the !ictionary ta les use! to monitor a !ata ase spaces ? 79:L8B++L"(:4+ 79:L"+*.+NT" 79:L7:T:L8#I+" <-. What are responsi ilities of a 7ata ase :!ministrator ? -. #nstalling an! upgra!ing the Oracle "erver an! application tools 1. :llocating system storage an! planning future storage requirements for the !ata ase system. 6. .anaging primary !ata ase structures/ta lespaces0 ;. .anaging primary o 'ects /ta le,views,in!e3es0 <. +nrolling users an! maintaining system security ?. +nsuring compliance with Oracle license agreement A. 4ontrolling an! monitoring user access to the !ata ase C. .onitoring an! optimising the performance of the !ata ase D. (lanning for ackup an! recovery of !ata ase information -E. .aintain archive! !ata on tape --. 9acking up an! restoring the !ata ase -1. 4ontacting Oracle 4orporation for technical support <1. What are requirements one shoul! fulfill to connect to OB:4I+ as internal? Operating system account has the operating system privileges that allow you to connect One shoul! e authorise! to connect as internal 7ata ase has a passwor! for internal connections, an! you know the passwor! must use a !e!icate! server <6. What are the roles an! user accounts create! automatically with the !ata ase ? 79: role % 4ontains all !ata ase system privileges "&" user account % The 79: role will e assigne! to this account. :ll of the ase ta les an! views for the !ata ase's !ictionary are store in this schema an! are manipulate! only y OB:4I+.

Page 53 of 74

"&"T+. user account % #t has all the system privileges for the !ata ase an! a!!itional ta les an! views that !isplay a!ministrative information an! internal ta les an! views use! y oracle tools are create! using the username. <;. What are the !ata ase a!ministrators utilities availa le ? ",IT79: % This allows 79: to monitor an! control an OB:4I+ !ata ase. ",ITIoa!er % #t loa!s !ata from stan!ar! operating system files /8lat files0 into OB:4I+ !ata ase ta les. +J(OBT/e3p0 an! #.(O+B /imp0 utilities allow you to move e3isting !ata in OB:4I+ format to an! from OB:4I+ !ata ase. <<. What are the minimum parameters shoul! e3ist in the parameter file /init.ora0 ? 79LN:.+ % .ust set to a te3t string of not more that C characters an! it will e store! insi!e the !atafiles, re!o log files an! control file while !ata ase creation. 79L7O.:#N % #t is string that specifies the network !omain where the !ata ase is create!. The glo al !ata ase name is i!entifie! y setting these parameters /79LN:.+ Q 79L7O.:#N0 4ONTBOIL8#I+" % Iist of control filenames of the !ata ase. #f name is not mentione! then !efault name will e use!. 79L9IO4FL"#P+ % The !efault !ata lock si)e an! is operating system !epen!ent. #t cannot e change! after !ata ase creation e3cept y re%creating the !ata ase. 79L9IO4FL9>88+B" % The ma3imum num er of operating system processes that can e connecte! to OB:4I+ concurrently. The value shoul! e < / ackgroun! process0 an! a!!itional - for each user. BOII9:4FL"+*.+NT" % Iist of roll ack segments an OB:4I+ instance acquires at !ata ase startup. :lso optionally I#4+N"+L.:JL"+""#ON",I#4+N"+L"+""#ONLW:BN#N* an! I#4+N"+L.:JL>"+B". <?. What is a trace file an! how it is create! ? +ach server an! ackgroun! process can write an associate! trace file. When an internal error is !etecte! y a process or user process, it !umps information a out the error to its trace. This can e use! for tuning the !ata ase. <A. What are roles ? @ow can we implement roles ? Boles are easiest way to grant an! manage common privileges nee!e! y !ifferent groups of !ata ase users. 4reating roles an! assigning privies to roles. :ssign each role to group of users. This will simplify the 'o of assigning privileges to in!ivi!ual users. <C. What are the steps to switch a !ata ase's archiving mo!e etween NO:B4@#+K+IO* an! :B4@#K+IO* mo!e ? -. "hut!own the !ata ase instance 1. 9ackup the !ata ase 6. (erform any operating system specific steps /optional0 ;. "tart up a new instance an! mount ut !o not open the !ata ase <. "witch the !ata ase's archiving mo!e. <D. @ow can you ena le automatic archiving ? "hut the !ata ase 9ackup the !ata ase .o!ify2#nclu!e IO*L:B4@#K+L"T:BT N TB>+ in init.ora file "tart up the !ata ase ?E. @ow can we specify the :rchive! log file name format an! !estination ? 9y setting the following values in init.ora file IO*L:B4@#K+L8OB.:T N archU"2s2T2t.arc /U" % Iog sequence num er an! is )ero left%pa!e!, Us % Iog sequence num er not pa!e!, UT % Threa! num er left%)ero%pa!e! an! Ut % Threa! num er not pa!e!0. The file name create! is archEEE-.arc U" is use!. IO*L:B4@#+K+L7+"T N path

Page 54 of 74

"hut the !ata ase an! change these parameters in init.ora files. ?-. What is the user of :N:I&P+ comman! ? To perform one of these function on an in!e3, ta le, or cluster $ to collect statistics a out o 'ect use! y the optimi)er an! store them in the !ata !ictionary. to !elete statistics a out the o 'ect from the !ata !ictionary to vali!ate the structure of the o 'ect to i!entify migrate! an! chaine! rows of the ta le or cluster. 6.< .anaging 7istri ute! 7ata ases ?1. @ow can we re!uce the network traffic ? Beplication of !ata in !istri ute! environment >sing snapshots to replicate !ata >sing remote proce!ure calls. ?6. What is a snapshot ? "napshot is an o 'ect use! to !ynamically replicate !ata etween !istri ute! !ata ases at specifie! time intervals. #n ver A.E they are rea! only. ?;. What are the various type of snapshots ? "imple an! 4omple3. ?<. 7ifferentiative simple an! comple3, snapshots : simple snapshot is ase! on a query that !oes not contains *BO>( 9& clauses, 4ONN+4T y clauses, =O#Ns, "u query or a set of operations. : comple3 snapshots contain at least any one of the a ove. ??. What is !ynamic !ata replication ? >p!ating or inserting recor!s in remote !ata ase through !ata ase triggers. #t may fail if remote !ata ase is having any pro lem. ?A. @ow can you enforce referential integrity in snapshots ? Time the references to occur when master ta les are not in use. (erform the references manually imme!iately after locking the master ta les. We can 'oin ta les in snapshots y creating a comple3 snapshot that will e ase! on the master ta les. ?C. What are the options availa le to refresh snapshots ? 4O.(I+T+ % Ta les are completely regenerate! using the snapshot's query an! the master ta les every time the snapshot reference!. 8:"T % #f simple snapshot use! then a snapshot log can e use! to sen! only the changes to the snapshot ta les. 8OB4+ % The !efault value. #f possi le it performs a 8:"T refreshO Otherwise it will perform a 4O.(I+T+ refresh. ?D. What is a snapshot tag ? #t is a ta le that maintains a recor! of mo!ifications to the master ta le in a snapshot. #t is store! in the same !ata ase as master ta le an! is only availa le for simple snapshots. #t shoul! e create! efore creating snapshots. AE. When will the !ata in the snapshot log e use! ? The !ata in the snapshot log is use! !uring fast references of the ta le's snapshots. A-. What are the pre%requisites to create a snapshot log ? We must e a le to create a after row trigger on ta le /i.e. it shoul! not e alrea!y availa le0 :fter giving ta le previleges. We cannot specify snapshot log name ecause oracle uses the name of the master ta le in the name of the !ata ase o 'ects that support its snapshot log.

Page 55 of 74

The master ta le name shoul! e less than or equal to 16 characters. /The ta le name create! will e .IO*MLta lename, an! trigger name will e TIO*MLta lename0 A1. What are the enefits of !istri ute! options in !ata ases ? 7ata ase on other servers can e up!ate! an! those transactions can e groupe! together with others in a logical unit. 7ata ase uses a two phase commit A6. What is a two%phase commit ? 7ata ase on other servers can e up!ate! an! those transactions can e groupe! together with others in a logical unit is calle! two%phase commit. They are The (reparation (hase $ :n initiating no!e calle! the glo al coor!inator notifies all sites involve! in the transaction to e rea!y either commit or roll ack the transaction. The 4ommit (hase $ #f there is no pro lem with prepare phase, then all sites commit their transactions. #f a network or no!e failure occurs, then all sites roll ack their transactions. 6.? .anaging 9ackup Q Becovery A;. What are the !ifferent metho!s of acking up oracle !ata ase ? Iogical 9ackups 4ol! 9ackups @ot 9ackups /:rchive log0 A<. What is a logical ackup ? Iogical ackup involves rea!ing a set of !ata ase recor!s an! writing them into a file. +3port utility is use! for taking ackup an! #mport utility is use! to recover from ackup. A?. What is col! ackup ? What are the elements of it ? 4ol! ackup is taking ackup of all physical files after normal shut!own of !ata ase. We nee! to take :ll 7ata files :ll 4ontrol files :ll on%line re!o log files Then init.ora file /optional0 AA. What are the !ifferent kin! of e3port ackups ? 8ull ackup % 4omplete !ata ase #ncremental 9ackup % Only affecte! ta les from last incremental !ate 2 8ull ackup !ate 4umulative ackup % Only affecte! ta le from the last cumulative !ate 2 8ull ackup !ate AC. What is hot ackup an! how it can e taken ? Taking ackup of archive log files when !ata ase is open. 8or this the :B4@#K+IO* mo!e shoul! e ena le!. The following files nee! to e acke! up $ :ll !ata files :ll archive log, re!o log files On control file. AD. What is the use of 8#I+ option in +J( comman! ? To give the e3port file name. CE. What is the use of 4O.(B+"" option in +J( comman! ? 8lag to in!icate whether e3port shoul! compress fragmente! segments into single e3tents. C-. What is the use of *B:NT option in +J( comman! ? : flag to in!icate whether grants on !ata ase o 'ects will e e3porte! or not. Kalues is '&' or 'N'.

Page 56 of 74

C1. What is the use of #N7+J+" option in +J( comman! ? : flag to in!icate whether in!e3es on ta les will e e3porte!. C6. What is use of BOW" option in +J( comman! ? 8lag to in!icate whether ta le rows shoul! e e3porte!. #f 'N' only 77I statements for the !ata ase o 'ects will e create!. C;. What is the use of 4ON"TB:#NT" option in +J( comman! ? : flag to in!icate whether constraints on ta le nee! to e e3porte!. C<. What is the use of 8>II option in +J( comman! ? : flag to in!icate whether full !ata ase e3port shoul! e performe!. C?. What is the use of OWN+B option in +J( comman! ? Iist of ta le accounts shoul! e e3porte!. CA. What is the use of T:9I+" option in +J( comman! ? Iist of ta les shoul! e e3porte!. CC. What is use of B+4OB7 I+N*T@ option in +J( comman! ? Becor! length in ytes. CD. What is use of #N4T&(+ option in +J( comman! ? Type e3port shoul! e performe!. 4O.(I+T+, 4>.>I:T#K+, #N4B+.+NT:I DE. What is use of B+4OB7 option in +J( comman! ? 8or incremental e3ports, the flag in!icates whether a recor! will e store! in !ata !ictionary ta les recor!ing the e3port. D-. What is the use of (:B8#I+ option in +J( comman! ? Name of the parameter file to passe! for e3port. D1. What is the use of :N:I&"+ /Ker A0 option in +J( comman! ? : flag to in!icate whether statistical information a out the e3porte! o 'ects shoul! e written to e3port !ump file. D6. What is use of 4ON"#"T+NT /Ker A0 option in +J( comman! ? : flag to in!icate whether a rea! consistent version of all the e3porte! o 'ects shoul! e maintaine!. D;. What is the use of Iog /Ker A0 option in +J( comman! ? The name of file to which log of the e3port will e written. D<. What is use of 8#I+ option in #.( comman! ? The name of file from which import shoul! e performe!. D?. What is the use of "@OW option in #.( comman! ? : flag to in!icate whether file content shoul! e !isplaye! or not. DA. What is the use of #*NOB+ option in #.( comman! ? : flag to in!icate whether import shoul! ignore errors encounter when issuing 4B+:T+ comman!. DC. What is the use of *B:NT option in #.( comman! ?

Page 57 of 74

: flag to in!icate whether grants on !ata ase o 'ects will e importe!. DD. What is use of #N7+J+" option in #.( comman! ? : flag to in!icate whether import shoul! import in!e3 on ta les or not. -EE. What is use of BOW" option in #.( comman! ? : flag to in!icate whether rows shoul! e importe!. # f this is set to 'N' then only 77I for the !ata ase o 'ects will e e3ecute! ? -E-. What is the use of 8>II option in #.( comman! ? : flag to in!icate whether full import shoul! e !one or not. -E1. What is the use of 8BO.>"+B option in #.( comman! ? : list of !ata ase accounts whose o 'ects shoul! e rea! from the e3port !ump file. -E6. What is use of TO>"+B option in #.( comman! ? : list of !ata ase accounts into which o 'ects in the e3port !ump file will e importe! -E;. What is use of T:9I+" option in #.( comman! ? : list of ta les to e importe!. -E<. What is use of B+4OB7I+N*T@ option in #.( comman! ? The length of the recor! in ytes of the e3port !ump file. -E?. What is use of #N4T&(+ option in the #.( comman! ? The type of import eing performe!. -EA. What is use of 4O..#T option in #.( comman! ? : flag to in!icate whether import shoul! commit after each array. #f 'N' then commit will take place at ta le level -EC. What is use of (:B8#I+ option in #.( comman! ? Name of the parameter file to passe! for import comman!. -ED. What is use of #N7+J8#I+ option in #.( comman! ? #f filename is given then all the 77I will e create! in the given file. --E. What is use of 7+"TBO& /Ker A0 option in #.( comman! ? : flag to in!icate whether the create ta lespace comman! foun! in !ump files from full e3ports will e e3ecute!. ---. What is use of IO* option in #.( comman! ? Name of the file to which the log of the import will e written. --1. 4onsi!er a case elow $ >ser is taking the ackup in the following fashion $ Type 8 # # # # 4 # # # # 4 # # 7ate - 1 6 ; < ? A C D -E -- -1 -6 8 % 8ull 9ackup # % #ncremental 9ackup 4 % 4umulative 9ackup "uppose !ata ase crash on -;th morning. @ow can we retrieve the !ata ase ? 4reate the !ata ase #mport from the 8ull ackup which was taken on -st

Page 58 of 74

#mport from 4umulative ackups which was taken on ?th #mport from 4umulative ackups which was taken on -th #mport from the #ncremental ackups -1,-6 respectively. Now the !ata ase will e availa le to latest status provi!e! there is no transaction taken place after the -6th incremental ackup. --6. Iist the steps to restore the !ata ase if !ata file lost. /:ssume we are taking hot ackups0 4opy the lost file from the ackup to the original location "tart the instance .ount the !ata ase Becover the !ata ase using recover !ata ase comman! Open the !ata ase --;. What are the points to e taken care when we are using ",ITIoa!er for importing !ata from flat files ? Whether ta le an! in!e3es are properly si)e!. 7irect option eing use! or not /Ker A0 #f one time loa! !o not create any in!e3 until !ata has een loa!e! an! ta le si)e is verifie!. --<. What are the a!vantages of using !irect path option in ",ITIoa!er ? #t ypasses the normal processing of insert statements an! instea! writes !irectly to ta les !ata locks. When !irect option is use! in!e3 ecome invali! an! once the loa! complete the new key is merge! with all ol! one an! ring the status to vali!. 7ata shoul! e presorte! otherwise it nee!s the !ou le the si)e in ta lespace. --?. What are areas a 79: can monitor the !ata ase using ",I79: comman!? 79: can monitor the following areas to !o fine tuning of the !ata ase $ (rocesses "essions Ta les/Iocks etc0 ",I :rea Ii rary 4ache Iatch Iocks 8ile #2O "ystem #2O Boll ack "egments "tatistics /"ystem, "essions0 :part from this all 79: activities can e performe! through ",I79: comman!. 77+ bK OI+ 77+ % 7ynamic 7ata +3change. 7II % 7ynamic Iink Ii rary OI+ % O 'ect Iinking an! +m e!!ing. .:(# bK .essaging :pplication (rogram #nterface What is 77+ ? 77+ is metho! for #nter (rocess 4ommunication. :n inter process communication is a metho! of passing !ata etween processes an! synchronising events. @ow !oes 77+ work ? 77+ uses share! memory to e3change !ata an! a protocol to synchroni)e passing of !ata. What !oes a 7II contain ? : 7II contains co!e, !ata an! win!ows resources. @ow !oes a 7II work ?

Page 59 of 74

: 7II allocates a glo al memory lock to an application an! uses this to e3change !ata with application. What are the two types of 77+ application ? .essage ase! 77+ applications an! 7ynamic 7ata +3change .anagement Ii rary application. What are the parts of a 77+ application ? 4lient application, "erver application, 4lient2"erver application an! .onitor application. What is a monitor application in the conte3t of 77+ ? : monitor application can only intercept messages ut cannot act on it. What is the use of a monitor application ? : monitor application can e use! as a !e ugging tool. What is the connection etween OI+ an! 77+ ? OI+ is a set of 77+ e3ecuta le comman!s to which 77+ protocol is applica le. What is the !ifference etween an em e!!e! o 'ect an! a linke! o 'ect ? :n em e!!e! o 'ect is store! in the !ocument itself while the !ocument 'ust stores a reference to the linke! o 'ect. #f a link o 'ect is change! in!epen!ently of the !ocument, wht happens the linke! o 'ect in the !ocument ? -. The reference o 'ect is automatically refreshe! 1. The reference o 'ect is not refreshe! 6. The user !eci!es whether the o 'ect is to refreshe! or if the ol!er version is retaine!. :nswer is 1 What are the types of OI+ applications ? 4lient, "erver an! O 'ect han!lers. What is an o 'ect han!ler ? :n O 'ect han!ler is a set of 7II that facilitate communication etween client application an! server application. What are the a!vantages of OI+ ? No nee! to switch etween applications. 8acilitate the use of speciali)e! applications to create o 'ects which can e em e!!e!. What is the !ifference etween a store! proce!ure an! a !ata ase trigger ? : trigger is automatically e3ecute! when the firing event occurs while store! proce!ure has to e invoke!. Oracle )or*s: -. @ow to use single !ata lock to query multiple ta les 1. @ow to see the select statement when we issue e3ecuteLquery 6. What are the system varia les can e change! ;. @ow !o you trap !efault forms processing / 7.I0 <. What is the !ifference etween post%query an! post%select ?. What is purpose an! or!er of firing the following triggers -. on fetch 1. on select A. What is the num er of recor!s uffere! an! ,uery array si)e properties of !ata lock C. What is the !ifference etween o 'ect li raries an! o 'ect groups D. What is the !ifference etween pre%query an! pre%select triggers -E. What is the !ifference etween pre%te3t%item an! when%new%item%instance triggers --. What is the or!er of firing the following triggers -. when%new%form%instance

Page 60 of 74

1. pre%te3t%item /9oth are in form%level0 -1. What is the vali!ation unit property of form mo!ule -6. What is the or!er of checking for a program unit from form mo!ule/local program unit, li rary, store! proce!ure0 -;. What is the !ifference etween (I2",I li rary an! o 'ect li rary -<. what is the use of pre te3t2pre recor!2pre form -?. types of recor! groups an! usage -A. what is i!Lnull function -C. what is the return !ata types of i!Lnull, showLalert, showLlov -D. what is the !ifference etween callLform , openLform, newLform Which is restricte! uilt%in an! why? Which canbct issue savepoint What is session parameter of openLform? 1E. which are the triggers will fire in the following situation # have three te3t items -. Te3t%item-.key%ne3t%item *oLitem /bdte3tLitem1bc0O *oLitem /bdte3tLitem6bc0O 1. Te3t%item1 -. (re%te3t%item 1. When%vali!ate%item 6. When%new%item%instance ;. Fey%ne3t%item <. (ost%te3t%item ?. (ost%change 6. Te3t%item6 -. (re%te3t%item 1. When%vali!ate%item 6. When%new%item%instance ;. Fey%ne3t%item <. (ost%te3t%item ?. (ost%change #f # press ta or enter key at te3t%item- what are the triggers will fire an! or!er of firing !uring the entire navigation. #f # change key%ne3t%item trigger of te3t%item*oLitem /bdte3tLitem1bc0O $ Te3tLitem1$ N bdNagen!rabcO *oLitem /bdte3tLitem6bc0O Then what are the triggers will fire an! or!er of firing 1-. What is synchronous an! asynchronous parameters for runLpro!uct uilt%in 11. @ow !o you suppress the logon screen while running the form for the first time 16. What is primary canvas property of win!ow an! where it will e useful 1;. # have when% utton%presse! trigger at form , lock an! item level #f # want to e3ecute first lock, form then item level trigger what changes # have to make. 1<. what is !ata parameter an! te3t parameter 1?. 4an we re%generate a li rary that is currently accessing y some other session 1A. 4an we re%generate an! save a li rary that has een attache! with some forms ut they are running currently. 1C. 4an we re%generate a li rary that has een attache! with some forms , will the changes will reflect in the reference! forms 1D. What is the use of transactional triggers 6E. 4an we mo!ify a su classe! o 'ect / from o 'ect group an! from o 'ect li raries0 6-. @ow to set forms !efault !irectory 61. What is the return !ata type of populateLgroup uilt%in 66. What is the !ifference etween OI+ o 'ect create! at !esign time an! runtime 6;. Will the timer will e3pire !uring large query e3ecuting 6<. What is the uilt%in package availa le to manipulate te3t files/ forms0 6?. 4an we !efine a relation etween two control locks

Page 61 of 74

6A. #f we change relation property from non%isolate! to casca!ing what changes will occur 6C. What is the coor!ination property of a relation 6D. #f we !elete on%clear%!etails trigger in a relation what happens ;E. What is the first trigger fires when we run a form ;-. What is the use of enforce primary key property of !ata lock ;1. 4an we put items other than uttons in the tool ars ;6. Which o 'ect relates content an! stacke! canvases/win!ow0 ;;. @ow to navigate from one form to other form/ uilt%in0 ;<. @ow to copy values from list item to recor! group ;?. #n a non%isolate! relation what is the or!er of firing the following triggers -. on%populate%!etails 1. on%clear%!etails 6. pre%query ;. pre%select ;A. @ow to fin! out the previous form i! in multi form application/itbcs system varia le0 ;C. @ow to use single IOK for multiple items Oracle reports: -. .inimum requirement to make a matri3 report /,ueries, *roups an! Bepeating frames0 1. @ow to change the font of an fiel! at runtime ase! on the value 6. What is the anchoring an! enclosing o 'ect ;. What is anchor o 'ect <. @ow to rotate a fiel!/ !ata ase fiel! in the layout0 ?. What is the !ifference etween le3ical an! in! parameters A. What is the place hol!er C. What is the use of frame/not repeating0 D. What is the use of format triggers -E. "BW package --. What is fle3 mo!e an! confine mo!e -1. what !ifference etween the logical an! physical pages an! planes -6. what is the use of group filter SQL an+ PL/SQL -. ,ueries for Nth ma3imum ,Nth row 1. what is use of the in!e3 / ma3imum try to cover0 6. "elect the !epartments whose sum of the salary greater than the sum of salaries of any !epartment? ;. What is implicit cursors <. What is pu lic synonyms an! uses ?. When in!e3 will e use! in the query A. What is the result of the following queries -. "elect T from emp where 4omm in /null0O 1. "elect T from emp where 4omm N nullO 6. "elect T from emp where 4omm N bdbcO ;. "elect T from emp where 4omm is / select null from !ual0O C. ,uery to !isplay employee name an! his managers name D. ,uery to fin! the employees who is having more then one su or!inate -E. ,uery to fin! the employees whose salary is greater then his !epartment average salary --. ,uery to !isplay employees salary as 1EEE for !epartment 1E an! rest as their salaries -1. ,uery to !isplay no of employees in the !epartment -E, 1E,6E in a single row Output 7ept-E !ept1E !ept6E 1<? -6. ,uery to fin! the no of su or!inate levels for given manager -;. ,uery to fin! the no of employees who is !rawing less than -<EE an! greater than 1EEE Server concepts -. what are the physical !ata ase components 1. what are the logical !ata ase components 6. what is row chaining ;. what is the relation etween oracle !ata lock ,e3tents an! segments

Page 62 of 74

<. how many types of segments are there ?. what is temporary segments A. what is re!o log C. what is the !ifference etween roll ack segments an! re!o log files D. what is the !ifference etween !ata ase uffers an! re!o log uffer of "*: -E. -0 @ow !elete !uplicate recor!s in a ta le !elete from emp where rowi! not in /select ma3/rowi!0 from emp group y empno0O 10 @ow to make a column into not null column. :ns$ alter ta le emp mo!ify /empno not null0O %Sthis can e !one only when all the values in empno are non null /i.e not empty0 ?h To make a not null column into null column alter ta le emp mo!ify /empno null0O The fallowing are the rules for i. a!!ing null or not null property S&ou may change a columnbcs null property to not null only when that fiel! !oes contain null values/i. #t canbct e empty0 S:t any time you may change a columnbcs not null property to null ii. a!!ing a colum to a ta le S&ou may a!! a column at any time if NOT N>II isnbct specifie! /i.e when new column can accept null values 0 S&ou may a!! a NOT N>II column in three steps. a. :!! the column without NOT N>II specifie!. . 8ill every row in that column with !ata. c. .o!ify the column to e NOT N>II. iii. mo!ifying a column S&ou can increase a 4@:B columnbds wi!th at any time. S&ou can increase the num er of !igits an! the num er of !ecimal places in a N>.9+B column at any time STo 4@:N*+ !ata types or to 7+4B+:"+ columnbcs wi!th the column shoul! e null for every row 60Write queries for the fallowing e3. select T from empLselfO +.(LNO +.(NLN:.+ ":I .*B 7+(T#7 %%%%%%%%% %%%%%%%%%%%%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% ;EE 'ane 1EEEE --E 1E -E1 .ary -DEEE --E 1E -E- charles CEEE -E< <E -E; Iin!a DEEE -EE -E --E 'ohn 1<EEE -E< 1E -E< newton 1EEE <E -EE :I+N -<EEE -E< <E 1EE 9OB#" 6EEE --E 1E -E6 7:K#7 -EEEE -EE -E 6EE monica AEEE -E< <E i0 ,uery to get the employees who are working un!er mgr with salary S -EEEE select empLno,mgr from empLself where mgr in /select empLno from empLself where sal S -EEEE0O ii0 ,uery to get the employees who are getting salaries more than their managers select a.empLno from empLself a,empLself where a.mgr N .empLno an! a.sal S .salO +.(LNO %%%%%%% -E-EE --E 6EE iii0 ,uery to fin! the nth highest salary select a.empnLname,a.sal from empLself a where Qn N /select count/T0 from empLself where a.sal R .sal0O When nN- , sal N1EEEE %Ssecon! highest salary O nN; , sal N-EEEE %Sfifth highest salary O iv0 ,uery to fin! the secon! highest salary in !ifferent !epartments.

Page 63 of 74

select a.!epti!,min/a. sal0 from empLself a where - in /select count/T0 from empLself where a.sal R .sal group y .!epti!0 group y a.!epti!O 7+(T#7 .#N/:.":I0 %%%%%%% %%%%%%%%%% -E DEEE 1E 1EEEE <E CEEE v0 ,uery to fin! !epartments with total salary S1<EEE select !epti! from empLself having sum/sal0 S1<EEE group y !epti!O 7+(T#7 %%%%%% 1E <E ;0 stu!y the fallowing pl2sql lock an! fin! the type of error %Ssynta3,semantic/logical0 or prece!ence egin for i in -..< loop up!ate emp set sal N -EEE where empno N-EE O en! loopO en!O <0 7ifference etween /.:J,.#N0 an! /*B+:T+"T ,I+:"T0 The functions ma3 an! min compares !ifferent rows . Whereas greatest an! least work on a group of columns ,either actual or calculate! values within a single row. +3. select T from empLselfO +.(LNO +.(NLN:.+ ":I .*B %%%%%% %%%%%%%%%%%%%%%%%%%% %%%%%%% %%%%%%%%%% -EE alen D,EEE -E< 1EE oris -E,EEE --E -E- charles C,EEE -E< ",IS select ma3/sal0,min/sal0 from empLselfO .:J/":I0 .#N/":I0 %%%%%%%%%% %%%%%%%%%% -EEEE CEEE ",IS select greatest/sal0,least/sal0 from empLselfO *B+:T+"T/":I0 I+:"T/":I0 %%%%%%%%%%%%% %%%%%%%%%% DEEE DEEE -EEEE -EEEE CEEE CEEE ?07ifferent kin!s of constraints . ?0Where (roce!ures,8unctions an! Triggers are store! ?. A0What are the improtant !ifferences etween (roce!ures,8unctions an! Triggers ?. C04an we call a (roce!ure from a Trigger ?. D0what are packages ?. D0What are the !ifferent kin!s of parameters ?. -E04an we return a O>T parameter from a proce!ure ?. --07ifferences etween BOWN>. an! BOW#7 . -10@ow !o you han!le e3ceptions ?. -10@ow many system !efine! e3ceptions are there ?. -60@ow !o you write user !efine! message for all the system !efine! e3ceptions. -;07ifference etween 4ommit an! @/?0ost . -<07ifferences etween !elete ,truncate an! !rop comman!s . -?0 @ow !o you !isplay messages in the acken! proce!ure ?. -A0 why canbct you use create2!rop while !eclaring a trigger ?. -C0:!vantages of union over 'oins .

Page 64 of 74

-D07efinitions of commit, roll ack, save point 1E07ifference etween truncate an! !elete /truncate N!elete 5 commit0 -0Name the five glo al report triggers i. efore report ii. after report iii. etween pages iv. efore parameter form v.after parameter form :s a general rule, any processing that will affect the !ata retrieve! y the report shoul! e performe! in the 9efore (arameter 8orm or :fter (arameter 8orm triggers. /These are the two report triggers that fire efore anything is parse! or fetche!.0 :ny processing that will not affect the !ata retrieve! y the report can e performe! in the other triggers. Beport 9uil!er has five glo al report triggers. &ou cannot create new glo al report triggers. The trigger names in!icate at what point the trigger fires$ 9efore Beport 8ires efore the report is e3ecute! ut after queries are parse!. :fter Beport 8ires after you e3it the (reviewer, or after report output is sent to a specifie! !estination, such as a file, a printer, or an Oracle Office useri!. This trigger can e use! to clean up any initial processing that was !one, such as !eleting ta les. Note, however, that this trigger always fires, whether or not your report complete! successfully. 9etween (ages 8ires efore each page of the report is formatte!, e3cept the very first page. This trigger can e use! for customi)e! page formatting. #n the (reviewer, this trigger only fires the first time that you go to a page. #f you su sequently return to the page, the trigger !oes not fire again. 9efore (arameter 8orm 8ires efore the Buntime (arameter 8orm is !isplaye!. 8rom this trigger, you can access an! change the values of parameters, (I2",I glo al varia les, an! report%level columns. #f the Buntime (arameter 8orm is suppresse!, this trigger still fires. 4onsequently, you can use this trigger for vali!ation of comman! line parameters. :fter (arameter 8orm 8ires after the Buntime (arameter 8orm is !isplaye!. 8rom this trigger, you can access parameters an! check their values. This trigger can also e use! to change parameter values or, if an error occurs, return to the Buntime (arameter 8orm. 4olumns from the !ata mo!el are not accessi le from this trigger. #f the Buntime (arameter 8orm is suppresse!, the :fter (arameter 8orm trigger still fires. 4onsequently, you can use this trigger for vali!ation of comman! line parameters or other !ata. 10 Name the !ifferent types of alerts note , stop ,caution 60callLform / 0, newLform / 0 callLform / 0 $%Buns an in!icate! form while keeping the parent form active. 8orm 9uil!er runs the calle! form with the same Bunform preferences as the parent form. When the calle! form is e3ite! 8orm 9uil!er processing resumes in the calling form at the point from which you initiate! the call to 4:IIL8OB.. (BO4+7>B+ 4:IIL8OB. /formmo!uleLname K:B4@:B10O NewLform/ 0 $% +3its the current form an! enters the in!icate! form. The calling form is terminate! as the parent form. #f the calling form ha! een calle! y a higher form, 8orm 9uil!er keeps the higher call active an! treats it as a call to the new form. 8orm 9uil!er releases memory /such as !ata ase cursors0 that the terminate! form was using. 8orm 9uil!er runs the new form with the same Bunform options as the parent form. #f the parent form was a calle! form, 8orm 9uil!er runs the new form with the same options as the parent form. (BO4+7>B+ N+WL8OB. /formmo!uleLname K:B4@:B10O ;0 system.mo!e%S "&"T+...O7+ in!icates whether the form is in Normal, +nter ,uery, or 8etch (rocessing mo!e. The value is always a character string. NOB.:I #n!icates that the form is currently in normal processing mo!e. +NT+B%,>+B& #n!icates that the form is currently in +nter ,uery mo!e. ,>+B& #n!icates that the form is currently in fetch processing mo!e, meaning that a query is currently eing processe!. >sage Notes When using "&"T+...O7+ to check whether the current lock is in +nter ,uery mo!e, e aware that if testing from a When%9utton%(resse! trigger in a control lock, +nter ,uery mo!e will never e entere!, ecause the control lock is not the current lock.

Page 65 of 74

;0What are important new/:!vance!0 features of 8orms ?.E. <07ifferent types of list o3es. ?0What are recor! groups ?. A0#n case of a lock with multiple recor!s how to !isplay recor!s on the screen without using cursors ?. C04an we access a row in the first lock from secon! y referencing lock name along with the rowi! ?. D0#n case of a lock with multiple recor!s how !o check where a user entering a !uplicate recor! well efore saving it ?. -E0@ow to take care of concurrency ?. -. What is the si)e of Karchar in Oracle C.E ? a. 1EEE . ;EEE c. 1<; !. none of the a ove 1. What is the si)e of Karchar in Oracle A.E ? a. 1EEE . ;EEE c. 1<; !. none of the a ove 6. The !efault value the lpa! function takes is a. a space /be be0 . an asterisk c. The !efault value is not optional !. None of the a ove ;. The no. of columns that may e use! as composite primary key in oracle C a. C . -? c. 61 !. none of the a ove <. which of the following is true a out a!!Lmonths a. we can pass a numerical value in first parameter . we can pass a negative value in secon! parameter c. 9oth a Q !. None of the a ove ?. The latest !ate that can e store! in oracle C a. 6-st 7ec ;E-1 :.7 . 6-st 7ec ;E-- :.7 c. 7ec 6-st ,DDDD !. None of the a ove. A. What happens when the first !ate is greater than the secon! !ate that is passe! to the monthsL etween function in oracle C. a. #t gives an error . #t gives a negative value c. None of the a ove C. Begar!ing the "ummary query which of the following is true a. The or!er of the ase column list in the select statement shoul! e same in the *roup y clause. . The or!er of the ase column list in the select statement nee! not e same in the *roup y clause. c. None of the a ove D. Begar!ing the "ummary query which of the following is true a. :ll the ase ta le columns selecte! in the select list shoul! e specifie! in the *roup y clause. . :ll the ase ta le columns selecte! in the select list nee! not e specifie! in the *roup y clause. c. None of the a ove. -E. @ow !o u mask the user from entering irrelevant !ata ? a. "ynonym . Kiew c. #n!e3 !. sequence --. What !oes the length function returns when applie! to column of char !atatype ? -1. Which of the following is true a out the packages ? a. (ackage specification shoul! contain return type of a function . (ackage specification nee! not contain return type of a function c. 9oth a Q !. None of the a ove -6. #f the first parameter is negative, then secon! parameter a. nee! not e negative . there is no such restrictions c. shoul! e positive

Page 66 of 74

!. None of the a ove. -;. Which of the following is true a out proce!ures a. The si)e of the parameter shoul! e mentione! in a proce!ure. . The si)e of the parameter shoul! not e mentione! in a proce!ure c. 9oth a Q !. None of the a ove. -<. beB+8+B+N4#N*bf in oracle C a. use! to mention referential integrity . use! for creating views c. there is no such wor! in oracle C !. none of the a ove -?. #f you want to restrict the user, to enter the same values that has een store! in other ta le then what constraint !o u use? a. +ntity integrity . Beferential #ntegrity c. 9oth a Q !. None of the a ove -A. Which of the following is true a out N>II? a. when an arithmetic operation is performe! on N>II, u will get the result as N>II . N>II is same as E. c. N>II is same as lank !ate. !. None of the a ove -C. 8or a 77I statement, which of the following is true a. : 77I statement is prece!e! an! followe! y commit. . :ll the 7.I statements gets committe! even when u get an error after writing 77I statement. c. 9oth a Q !. None of the a ove. -D. Which of the following is true for up!ate clause? a. We can up!ate two ase ta les simultaneously . > can use a su query in "+T clause of the >(7:T+ statement. c. 9oth a Q !. None of the a ove 1E. Which of the following is true for !elete? a. 7elete statement can e given without writing where clause. . We can !elete two ta les simultaneously c. 9oth a Q !. None of the a ove 1-. @ow !o u rename a ta le ? a. >sing alter comman! . >sing B+N:.+ c. 7ropping the ta le an! creating once again !. None of the a ove. 11. #n oracle A which of the following is true a out manipulating the view a. Kiew ase! on two ase ta les can e manipulate! . Kiew having a column which contain operation can e manipulate! c. 9oth a Q !. None of the a ove 16. #n oracle C which of the following is true a out manipulating the view a. Kiew ase! on two ase ta les can e manipulate! . Kiew having a column which contain operation can e manipulate! c. 9oth a Q !. None of the a ove 1;. Which of the following is true a out packages a. We can write a proce!ure in package o!y which has not een specifie! in package specification. . We cannot write a proce!ure in package o!y which has not een specifie! in package specification. c. 9oth a Q !. None of the a ove. 1<. Which of the following is true a out outer 'oins a. The outer 'oin sym ol shoul! e present on any one si!e of the 'oin. . The outer 'oin sym ol may e present on oth the si!es of the 'oin c. The outer 'oin return the rows from the two ta les that !onot have matching recor!s in other ta le. !. None of the a ove 1?. Which of the following is true a out proce!ure an! a function a. (roce!ure shoul! return a value an! a function may not return a value . : function has to return a value an! a proce!ure !onbct have to c. 9oth a Q

Page 67 of 74

!. None of the a ove. 1A. What !oes O8: stan!s for ? a. Oracle 8le3i le :rchitecture . Oracle 8inancials :pplications c. Optimal 8le3i le :rchitecture !. None of the a ove Oracle ,uestions ?h What is ",IT(lus an! where !oes it come from? ?h @ow !oes one use the ",IT(lus utility? ?h What comman!s can e e3ecute! from ",IT(lus? ?h What are the asic ",IT(lus comman!s? ?h What is :8#+7T.9>8? ?h @ow !oes one restore session state in ",IT(lus? ?h What is the !ifference etween H an! HH? ?h What is the !ifference etween Q an! QQ? ?h What is the !ifference etween V an! @O"T? ?h What is the !ifference etween ? an! @+I(? ?h @ow !oes one ena le the ",IT(lus @+I( facility? ?h @ow can one !isa le ",IT(lus prompting? ?h @ow can one trap errors in ",IT(lus? ?h @ow !oes one trace ",I statement e3ecution? ?h @ow can one prevent ",IT(lus connection warning messages? ?h @ow can uses e prevente! from e3ecuting !evious comman!s? ?h @ow can one !isa le ",IT(lus formatting? ?h 4an one sen! operating system parameters to ",IT(lus? ?h 4an one copy ta les with ION* columns from one !ata ase to another? ?h Where can one get more info a out ",IT(lus? What is ",IT(lus an! where !oes it come from? ",IT(lus is a comman! line ",I an! (I2",I language interface an! reporting tool that ships with the Oracle 7ata ase 4lient an! "erver. #t can e use! interactively or !riven from scripts. ",IT(lus is frequently use! y 79:s an! 7evelopers to interact with the Oracle !ata ase. ",IT(lus's pre!ecessor was calle! >8# />ser 8rien!ly #nterface0. >8# was inclu!e! in the first releases of Oracle, its interface was e3tremely primitive an! anything ut user frien!ly. @ow !oes one use the ",IT(lus utility? "tart using ",IT(lus y e3ecuting the "sqlplus" comman!%line utility. Kali! options are$ useri!2passwor!H! %% 4onnection !etails 2nolog %% 7o not login to Oracle. &ou will nee! to !o it yourself. %s or %silent %% start sqlplus in silent mo!e. Not recommen!e! for eginnersV Hmyscript %% "tart e3ecuting script calle! "myscript" Iook at this simple e3ample$ sqlplus 2nolog ",IS connect scott2tiger ",IS select T from ta O ",IS !isconnect ",IS e3it What comman!s can e e3ecute! from ",IT(lus? One can enter three kin!s of comman!s from the ",IT(lus comman! prompt$ -. ",IT(lus comman!s % ",IT(lus comman!s are use! to set options for ",IT(lus, format reports, e!it files, e!it the comman! uffer, an! so on. ",IT(lus comman!s !o not interact with the !ata ase. These comman!s !o not have to e terminate! with a semicolon /O0, as is the case with ",I comman!s. The rest of this page is !e!icate! to ",IT(lus comman!s, eg. "@OW >"+B 1. ",I comman!s % for more information see the Oracle ",I 8:,. +g$ "+I+4T T 8BO. T:9O 6. (I2",I locks % for more information see the Oracle (I",I 8:,. +g$ 9+*#N 79."LO>T(>T.(>TLI#N+/'@ello Worl!V'0O +N7O 2 What are the asic ",IT(lus comman!s? The following ",IT(lus comman!s are availa le$ :44+(T *et input from the user 7+8#N+ 7eclare a varia le /short$ 7+80 7+"4B#9+ Iists the attri utes of ta les an! other o 'ects /short$ 7+"40

Page 68 of 74

+7#T (laces you in an e!itor so you can e!it a ",I comman! /short$ +70 +J#T or ,>#T 7isconnect from the !ata ase an! terminate ",IT(lus *+T Betrieves a ",I file an! places it into the ",I uffer @O"T #ssue an operating system comman! /short$ V0 I#"T 7isplays the last comman! e3ecute!2 comman! in the ",I uffer /short$ I0 (BO.(T 7isplay a te3t string on the screen. +g prompt @ello Worl!VVV B>N Iist an! Bun the comman! store! in the ",I uffer /short$ 20 ":K+ "aves comman! in the ",I uffer to a file. +g "save 3" will create a script file calle! 3.sql "+T .o!ify the ",IT(lus environment eg. "+T (:*+"#P+ 16 "@OW "how environment settings /short$ "@O0. +g "@OW :II, "@O (:*+"#P+ etc. "(OOI "en! output to a file. +g "spool 3" will save "T7O>T to a file calle! 3.lst "T:BT Bun a ",I script file /short$ H0 @ow !oes one restore session state in ",IT(lus? Iook at the following e3ample /OracleC0$ ",IS "TOB+ "+T filename B+(I:4+ ",IS /!o whatever you like0 ",IS Hfilename What is :8#+7T.9>8? :8#+7T.9>8 is the ",IT(lus !efault e!it save file. When you issue the comman! "e!" or "e!it" without arguments, the last ",I or (I2",I comman! will e save! to a file calle! :8#+7T.9>8 an! opene! in the !efault e!itor. #n the prehistoric !ays when ",IT(lus was calle! >8#, the file name was "ufie!t. uf", short for >8# e!iting uffer. When new features were a!!e! to >8#, it was the initially name! :!vance! >8# an! the filename was change! to "aufie!t. uf" an! then to "afie!t. uf". They presuma ly nee!e! to keep the name short for compati ility with some of the o!! operating systems that Oracle supporte! in those !ays. The name ":!vance! >8#" was never use! officially, as the name was change! to ",IT(lus efore this version was release!. &ou can overwrite the !efault e!it save file name like this$ "+T +7#T8#I+ "afie!t. uf" What is the !ifference etween H an! HH? The H /at sym ol0 is equivalent to the "T:BT comman! an! is use! to run ",IT(lus comman! scripts. : single H sym ol runs the script in your current !irectory, or one specifie! with a full or relative path, or one that is foun! in you ",I(:T@ or OB:4I+L(:T@. HH will start a sqlplus script that is in the same !irectory as the script that calle! it /relative to the !irectory of the current script0. This is normally use! for neste! comman! files. What is the !ifference etween Q an! QQ? "Q" is use! to create a temporary su stitution varia le an! will prompt you for a value every time it is reference!. "QQ" is use! to create a permanent su stitution varia le as with the 7+8#N+ comman! an! the OI7LK:I>+ or N+WLK:I>+ clauses of a 4OI>.N statement. Once you have entere! a value it will use that value every time the varia le is reference!. +g$ ",IS "+I+4T T 8BO. T:9 W@+B+ TN:.+ I#F+ 'UQT:9I+LN:.+.U'O What is the !ifference etween V an! @O"T? 9oth "V" an! "@O"T" will e3ecute operating system comman!s as chil! processes of ",IT(lus. The !ifference is that "@O"T" will perform varia le su stitution /Q an! QQ sym ols0, whereas "V" will not. /Note$ use "M" un!er .K", K.", an! Win!ows environments, not "V"0 What is the !ifference etween ? an! @+I(? There is no !ifference. 9oth "?" an! @+I( will rea! the "&"T+..@+I( ta le /if availa le0 an! shows help te3t on the screen. To use the help facility, type @+I( followe! y the comman! you nee! to learn more a out. 8or e3ample, to get help on the "+I+4T statement, type$ @+I( "+I+4T @ow !oes one ena le the ",IT(lus @+I( facility? To ena le @+I( for ",lT(lus, run the supplie! ",I an! Ioa!er scritps to create the @elp ta le an! to populate it. Iook at this >ni3 e3ample$ c! MOB:4I+L@O.+2sqlplus2a!min2help sqlplus system2manager Hhelpt l sqlplus system2manager Hhelpin!3 sqll!r system2manager controlNplushelp.ctl sqll!r system2manager controlNsqlhelp.ctl sqll!r system2manager controlNplshelp.ctl #f the @+I( comman! is not supporte! on your operating system, you can access the help ta le with a simple script like this$ @+I(.",I$ select info from system.help

Page 69 of 74

where upper/topic0Nupper/'Q-'0 2 @ow can one !isa le ",IT(lus prompting? #f you run a script that contains "Q" sym ols ",IT(lus thinks that you want to prompt the user for a value. To turn this off$ "+T +"4:(+ ON "+T +"4:(+ "" "+I+4T '&ou Q me' 8BO. 7>:IO or "+T 7+8#N+ ? "+I+4T '&ou Q me' 8BO. 7>:IO Note$ &ou can !isa le su stitution varia le prompting altogether y issuing the "+T 7+8#N+ O88 commman!. @ow can one trap errors in ",IT(lus? >se the "W@+N+K+B O"+BBOB ..." to trap operating system errors an! the "W@+N+K+B ",I+BBOB ..." comman! to trap ",I an! (I2",I errors. +g$ ",IS W@+N+K+B O"+BBOB +J#T D ",IS W@+N+K+B ",I+BBOB +J#T ",I.",I4O7+ @ow !oes one trace ",I statement e3ecution? -. Bun the (I>"TB4+.",I script from the "&" !ata ase user. This script is locate! the in MOB:4I+L@O.+2sqlplus2a!min. 1. 4reate a (I:NLT:9I+ using the >TIJ(I:N.",I script. This script is in MOB:4I+L@O.+2r! ms2a!min. 6. >se the ""+T :>TOTB:4+ ON" comman! to trace ",I e3ecution. This will print the result of your query, an e3plain plan an! high level trace information. Iook at this e3ample$ ",IS set autotrace on ",IS select T from !ualO 7 % J +3ecution (lan %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% E "+I+4T "T:T+.+NT Optimi)erN4@OO"+ - E T:9I+ :44+"" /8>II0 O8 '7>:I' "tatistics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% E recursive calls 1 ! lock gets - consistent gets E physical rea!s E re!o si)e -C- ytes sent via ",ITNet to client 1<? ytes receive! via ",ITNet from client 6 ",ITNet roun!trips to2from client E sorts /memory0 E sorts /!isk0 - rows processe! @ow can one prevent ",IT(lus connection warning messages? When # go to ",lT(lus, # get the following errors$ +rror accessing (BO7>4TL>"+BL(BO8#I+ Warning$ (ro!uct user profile information not loa!e!V &ou may nee! to run (>(9I7.",I as "&"T+. This messages will stop appearing when you create the (BO7>4TL>"+BL(BO8#I+ ta le in the "&"T+. schema. This is performe! y the (>(9I7.",I script. *o to the MOB:4I+L@O.+2sqlplus2a!min !irectory, connect as "&"T+. an! run H(>(9I7 from the sqlprompt. @ow can users e prevente! from e3ecuting !evious comman!s? &es, comman! authori)ation is verifie! against the "&"T+..(BO7>4TL>"+BL(BO8#I+ ta le. This ta le is create! y the (>(9I7.",I script. Note that this ta le is not use! when someone signs on as user "&"T+.. +g. to !isa le all users whose names starts with O("M from e3ecuting the 4ONN+4T comman!$ ",IS #N"+BT #NTO "&"T+..(BO7>4TL>"+BL(BO8#I+ K:I>+" /'",IT(lus', 'O("MU', '4ONN+4T', N>II, N>II, '7#":9I+7', N>II, N>II0O @ow can one !isa le ",IT(lus formatting?

Page 70 of 74

#ssue the following "+T comman!s to !isa le all ",IT(lus formatting$ "+T +4@O O88 "+T N+W(:*+ E "+T "(:4+ E "+T (:*+"#P+ E "+T 8++79:4F O88 "+T @+:7#N* O88 "+T TB#."(OOI ON These settings can also e entere! on one line, eg.$ "+T +4@O O88 N+W(:*+ E "(:4+ E (:*+"#P+ E 8++7 O88 @+:7 O88 TB#."(OOI ON 4an one sen! operating system parameters to ",IT(lus? One can pass operating system varia les to sqlplus using this synta3$ sqlplus username2passwor! Hcm!file.sql var- var1 var6 (arameter var- will e mappe! to ",IT(lus varia le Q-, var1 to Q1, etc. Iook at this e3ample$ sqlplus scott2tiger H3.sql '"test parameter"' !ual Where 3.sql consists of$ select 'Q-' from Q1O e3it <O 4an one copy ta les with ION* columns from one !ata ase to another? : out the fastest way of copying !ata etween !ata ases an! schemas are y using the ",IT(lus 4O(& statement. Iook at this e3ample$ 4O(& 8BO. "4OTT2T#*+BHIO4:IL79 TO "4OTT2T#*+BHB+.OT+L79 % 4B+:T+ #.:*+LT:9I+ >"#N* % "+I+4T #.:*+LNO, #.:*+ % 8BO. #.:*+"O #nterview questions$ -.query for self 'oin. 1.!eletion of !uplicate rows. 6.post query trigger ;.pre query trigger <.mastere bK!etail relation ?.report triggers A.report parameters. C.format triggers in report. D.or!er of triggering of when new item instance. -E.

Page 71 of 74

Set , : $-

Tas.s" /esponsi0ilities an+ S.ills /equire+

7#I9+BT'" I:W" O8 WOBF$ 7on't e irreplacea le, if you can't e replace!, you can't e promote!. Topics 79: Besponsi ilities Bequire! "kills ,ualifications Typical #nterview ,uestions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 79: Besponsi ilities$ The 'o of the 79: seems to e everything that everyone else either !oesn't want to !o, or !oesn't have the a ility to !o. 79:s get the envia le task of figuring out all of the things no one else can figure out. .ore seriously though, here is a list of typical 79: responsi ilities$ #nstallation, configuration an! upgra!ing of Oracle server software an! relate! pro!ucts +valuate Oracle features an! Oracle relate! pro!ucts +sta lish an! maintain soun! ackup an! recovery policies an! proce!ures Take care of the 7ata ase !esign an! implementation #mplement an! maintain !ata ase security /create an! maintain users an! roles, assign privileges0 (erform !ata ase tuning an! performance monitoring (erform application tuning an! performance monitoring "etup an! maintain !ocumentation an! stan!ar!s (lan growth an! changes /capacity planning0 Work as part of a team an! provi!e A31; support when require! (erform general technical trou le shooting an! give consultation to !evelopment teams #nterface with Oracle 4orporation for technical support. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bequire! "kills$ *oo! un!erstan!ing of the Oracle !ata ase, relate! utilities an! tools : goo! un!erstan!ing of the un!erlying operating system : goo! knowle!ge of the physical !ata ase !esign : ility to perform oth Oracle an! operating system performance tuning an! monitoring Fnowle!ge of :II Oracle ackup an! recovery scenarios : goo! knowle!ge of Oracle security management : goo! knowle!ge of how Oracle acquires an! manages resources : goo! knowle!ge Oracle !ata integrity "oun! knowle!ge of the implemente! application systems +3perience in co!e migration, !ata ase change management an! !ata management through the various stages of the !evelopment life cycle

Page 72 of 74

: soun! knowle!ge of oth !ata ase an! system performance tuning : 79: shoul! have soun! communication skills with management, !evelopment teams, ven!ors an! systems a!ministrators (rovi!e a strategic !ata ase !irection for the organisation : 79: shoul! have the a ility to han!le multiple pro'ects an! !ea!lines : 79: shoul! possess a soun! un!erstan!ing of the usiness %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,ualifications$ .ust e certifie! as an Oracle 79: (refera ly a 9" in computer science or relate! engineering fiel! Iots an! lots of +J(+B#+N4+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Typical #nterview ,uestions *eneral ,uestions Tell us a out yourself2 your ackgroun!. What are the three ma'or characteristics that you ring to the 'o market? What motivates you to !o a goo! 'o ? What two or three things are most important to you at work? What qualities !o you think are essential to e successful in this kin! of work? What courses !i! you atten!? What 'o certifications !o you hol!? What su 'ects2courses !i! you e3cel in? Why? What su 'ects2courses gave you trou le? Why? @ow !oes your previous work e3perience prepare you for this position? @ow !o you !efine 'success'? What has een your most significant accomplishment to !ate? 7escri e a challenge you encountere! an! how you !ealt with it. 7escri e a failure an! how you !ealt with it. 7escri e the 'i!eal' 'o ... the 'i!eal' supervisor. What lea!ership roles have you hel!? What pre'u!ices !o you hol!? What !o you like to !o in your spare time? What are your career goals /a0 6 years from nowO / 0 -E years from now? @ow !oes this position match your career goals? What have you !one in the past year to improve yourself? #n what areas !o you feel you nee! further e!ucation an! training to e successful? What !o you know a out our company? Why !o you want to work for this company. Why shoul! we hire you? Where !o you see yourself fitting in to this organi)ation . . .initially? . . .in < years? Why are you looking for a new 'o ? @ow !o you feel a out re%locating? :re you willing to travel? What are your salary requirements? When woul! you e availa le to start if you were selecte!? *eneral Oracle ,uestions 7i! you use online or off%line ackups? What version of Oracle were you running? @aw many !ata ases an! what si)es? #f you have to a!vise a ackup strategy for a new application, how woul! you approach it an! what questions will you ask? #f a customer calls you a out a hanging !ata ase session, what will you !o to resolve it? 4ompare Oracle to any other !ata ase that you know. Why woul! you prefer to work on one an! not on the other?

Page 73 of 74

Oracle interview questions


No answers, ut these are useful questions for con!ucting Oracle interview. The rea!ers are welcome to contri ute their answers. What is an oracle instance? What is a view? What is referential integrity? Name the !ata !ictionary that stores user%!efine! constraints? What is a collection of privileges? What is a snapshot? What is a synonym? What is a cursor? What is a sequence? What is a trigger? What is an e3ception? What is a partition of ta le? What are pseu!o%columns in ",I? (rovi!e e3amples. What are the 7ata 4ontrol statements? What is a schema? What is a type? What is a !ata mo!el? What is a relation? :!vantages of re!o log files? What is an :rchiver? What is a !ata ase uffer cache? What are the ackgroun! processes in Oracle? Utype an! Urowtype are attri utes forg? What are the steps in a two%phase commit? What is a union, intersect, minus? What is a 'oin, e3plain the types of 'oins? What is a co%relate! su %query? O794 stan!s forg? 7ata%type use! to work with integers is? 7escri e !ata mo!els? 7escri e the Normali)ation principles? What are the types of Normali)ation? What is !e%normali)ation?

Page 74 of 74

Das könnte Ihnen auch gefallen