Semester 2 Final Exam PL SQL (2)
Short Description
Download Semester 2 Final Exam PL SQL (2)...
Description
Test:Semester2FinalExam 1. Nati Native vec com ompi pila lati tion ona alw lway ays sru runs nsf fas aste ter; r;t the here refo fore reS SQL QLs sta tate teme ment nts sin inP PL/ L/SQ SQ Lwillalwaysrunfaster,also.TrueorFalse? Lwillalwaysrunfast er,also.TrueorFalse? MarkforReview (1)Points True False(*)
Co r r ec t
Co r r e ct
2. VEL. EL.(C (Cho hoos ose eth thre ree) e) (1)Points
Iden Identi tify fye exa xamp mple les sof ofb ben enef efit its sof ofu usi sing ngP PLS LSQL QL_O _OPT PTIM IMIZ IZE_ E_LE LE Mark Markf for orR Rev evie iew w (Chooseallcorrectanswers)
Modifysourcecodetooptimizefrequently-used Modifysourcecodeto optimizefrequently-usedelementsatthetop. elementsatthetop. ControlwhatPL/SQLdoeswithuselesscode.(*) Backwardcompatiblewithpreviousversionsof Backwardcompatiblewi thpreviousversionsoftheOracledatabase.(*) theOracledatabase.(*) Separatingcompiledcodesothatseparateunit Separatingcompiledco desothatseparateunitsmayberepeatedasneed smayberepeatedasneede e d. Copycompiledcodefromonesubprogramintoan Copycompiledcodefro monesubprogramintoanothersubprogram.(*) othersubprogram.(*)
Co r r ec t
Co r r e ct
3. Nati Native vem mac achi hine nec cod ode ePL PL/S /SQL QLw wil ill lal alwa ways yse exe xecu cute tef fas aste ter rth th anbytecodePL/SQLbecauseitneednotbeinterpretedatruntime.True anbytecodePL/SQLbecauseitneednotbeinte rpretedatruntime.TrueorFalse orFalse ? Ma r k f o r R e v i e w (1)Points True(*) False
Co r r ec t
Co r r e ct
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
(Ch (Choo oose set two wo) ) (1)Points
4. Iden Identi tify fys som ome ebe bene nefi fits tso of fus usin ing gco cond ndit itio iona nal lco comp mpil ilat atio ion. n. Mark Markf for orR Rev evie iew w (Chooseallcorrectanswers)
Usenewfeatureswiththelatestdatabasereleaseanddisablethemwith Usenewfeatureswiththelatestdatabaserele aseanddisablethemwith olderdatabaseversions(*) SpeedupthecompilationtimeofalengthyPL/SQLsubprogram. Determineinitializationvaluesduringstartu Determineinitializati onvaluesduringstartupofadatabasesession. pofadatabasesession. Activatedebuggingortracingstatementsinth Activatedebuggingor tracingstatementsinthedevelopmentenvironment edevelopmentenvironment (*)
Co r r ec t
Co r r e ct 5.
Int Inthe hef fol ollo lowi wing nge exa xamp mple le, ,wh what ats sta tate teme ment ntb bel elon ongs gsi in nLi Line ne
A? ALTERSESSIONSETPLSQL_CCFLAGS='debug:true'; CREATEORREPLACEPROCEDUREtestprocISBEGIN ... $IF$$debug$THEN DBMS_OUTPUT.PUT_LINE('Thiscodewasexecuted'); --LineA ... ENDtestproc; ALTERSESSIONSETPLSQL_CCFLAGS='debug:false'; MarkforReview (1)Points $ENDIF $$END; $END(*) $ELSIF
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Co r r ec t
Co r r e ct
6. Toi Toinc nclu lude des sel elec ecti tion ons sof ofc cod ode efo for rco comp mpil ilat atio ion nba base sed don onu u ser-define ser-definedval dvalues, ues,uset usethePL hePLSQL_C SQL_CCFLAG CFLAGSpar Sparamete ameters.T rs.Trueo rueorFal rFalse? se? Markfor Markfor Review (1)Points True(*) False
Co r r ec t
Co r r e ct
7. Obfu Obfusc scat atio ion ndo does esn not ota all llow owa any nyon one eto tos see eet the hes sou ourc rce eco code de ,includin ,includingthe gtheowne owner.Tr r.Trueor ueorFals False? e? MarkforR MarkforReview eview (1)Points True(*) False
Co r r ec t
Co r r e ct 8.
Whic Which his isN NOT OTa ab ben enef efit ito of fob obfu fusc scat atio ion? n?
(1)Points Sourcecodeisnotloadedinthedatadictionary. Sourcecodeishiddenfromallusers. Sourcecodeisvisibletotheowner.(*) Protectionforintellectualpropertyisprovided.
Co r r ec t
Co r r e ct
Mark Markf for orR Rev evie iew w
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
True False(*)
Co r r ec t
Co r r e ct 10. 10.
What Whatd doe oes sth the efo foll llow owin ing gst stat atem emen ent tdo do? ?
DBMS_WARNING.ADD_WARNING_SETTING_CAT('PERFORMANCE','ENABLE','SESSION'); DBMS_WARNING.ADD_WARNING_SETTING_CAT('PERFORMA NCE','ENABLE','SESSION'); MarkforReview (1)Points EnablesthePERFORMANCEwarningcategory,sett EnablesthePERFORMANC Ewarningcategory,settingothercategorysettin ingothercategorysetting g stodisabled. EnablesthePERFORMANCEwarningcategory,leavingothercategorysettin EnablesthePERFORMANCEwarningcategory,leav ingothercategorysetting g sunchanged. AddthePERFORMANCEwarningcategoryintoaPL/SQLvariable. Disablesallwarningcategories,thenenables Disablesallwarningc ategories,thenenablesthePERFORMANCEcategory. thePERFORMANCEcategory. EnablesthePERFORMANCEwarningcategory,leav EnablesthePERFORMANC Ewarningcategory,leavingothercategorysettin ingothercategorysetting g sunchanged,forthecurrentsession.(*)
Co r r ec t
Co r r e ct
11. Inthe IntheUS USER_ ER_ERR ERRORS ORSda data tadic dictio tionar naryv yview iew,i ,ifa fane nerro rrori risp spref refixe ixedw dwith ith"W "W arning,"thecommandcompletesbuthasaside arning,"thecommandc ompletesbuthasasideeffecttheuserneedsto effecttheuserneedstoknowabou knowabou t.Forallothererrors,thecommandterminate t.Forallothererror s,thecommandterminatesabnormally.TrueorFal sabnormally.TrueorFalse? se? MarkforReview (1)Points True(*) False
Co r r ec t
Co r r e ct
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
and ALTERSESSION SETPLSQL_WARNINGS='ENABLE:SEVERE'; MarkforReview (1)Points True False(*)
Co r r ec t
Co r r e ct
Section14 (Answerallquestionsinthissection) 13. 13.
Int Inthi his ssc scen enar ario io, ,th the efo foll llow owin ing gst stat atus usi is sgi give ven nfo for rea each ch
procedure: ProcedureAislocalandhasatimestampof10AM ProcedureBisremoteandhasalocaland ProcedureBisrem oteandhasalocalandremotetimestampof10:3 remotetimestampof10:30AM 0AM InTimestampMode,ProcedureA,whichisdependentonProcedureB,will InTimestampMode,ProcedureA,whichisdepen dentonProcedureB,willexecute execute successfullyat11AM.TrueorFalse? MarkforReview (1)Points True(*) False
Co r r ec t
Co r r e ct
14. 14. Ift Iftwo wor rel elat ated edo obj bjec ects tsa are rei in ndi diff ffer eren ent tda data taba base ses, s,t the hed d ependencybetweenthemisautomaticallyrecord ependencybetweenthem isautomaticallyrecordedonthedependentobjec edonthedependentobject'sdata t'sdata dicti iction onar ary. y.T Tru rue eor orF Fa alse? lse? Mark Markf for orR Rev evie iew w (1)Points True
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
15. 15. Proc Proced edur ure eB Bha has sit its slo loca cal lva vari riab able lee emp mp_n _num umbe ber rch chan ange ged dto to emp_name.Thedatatypeofemp_idischanged emp_name.Thedataty peofemp_idischangedfromnumbertointeger.I fromnumbertointeger.Itiscomp tiscomp iledsuccessfully.InSignatureMode,Procedur iledsuccessfully.In SignatureMode,ProcedureA,whichisdependento eA,whichisdependentonremote nremote Proc Proced edur ure eB, B,w wil ill lco comp mpil ile ean and dex exec ecut ute esu succ cces essf sful ully ly. .Tr True ueo or rFa Fals lse? e? Mark Markf for or Review (1)Points True(*) False
Co r r ec t
Co r r e ct
16. 16. Ach Achan ange gei in na are remo mote ter ref efer eren ence ced dsu subp bpro rogr gram ami is sau auto toma mati tica ca llyrecordedasinvalidifitsbaseobjectchangesandthatnewstatus llyrecordedasinvalidifitsbaseobjectcha ngesandthatnewstatusisrelaye isrelaye dtothedependentobject'sstatusandautomat dtothedependentobj ect'sstatusandautomaticallymarkedasinvalid. icallymarkedasinvalid.Trueor Trueor False? False? Markf Markfor orRev Review iew (1)Points True False(*)
Co r r ec t
Co r r e ct
17. 17. Proc Proced edur ure eB Bha has sa ane new wIN INO OUT UTp par aram amet eter era add dded edt to oit it. .It Itc c ompilessuccessfully.InSignaturemode,ProcedureA,whichisdependen ompilessuccessfully.InSignaturemode,Proce dureA,whichisdependentonremo tonremo teP tePro roce cedu dure reB B, ,wi will llf fai ail. l.T Tru rue eor orF Fal alse se? ? Mark Markf for orR Rev evie iew w (1)Points True(*) False
I n c o rr e c t
I n c o r r e c t . R e f e r to S e c t i o n 1 4 L e s s o n 2 . 18
E x a m i n e t he f o l l o w i n g c o d e:
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Whichofthefollowingstatementsaboutdependenciesaretrue?(Choose Whichofthefollowingstatementsaboutdepend enciesaretrue?(Choosetwo.) two.) MarkforReview (1)Points (Chooseallcorrectanswers) ED_PROCisindirectlydependentonDEPARTMENTS(*) EMPLOYEESisreferencedbyED_VIEW(*) ED_CURSisdirectlydependentonED_VIEW ED_PROCisreferencedbyED_VIEW ED_PROCisdirectlydependentonEMPLOYEES
Co r r ec t
Co r r e ct
19. 19. User UserB BOB OBw wan ants tst to okn know oww whi hich cho obj bjec ects tsr ref efer eren ence ceh his isD DEP EPAR AR TMENTStable.WhichofthefollowingmustheexecutetopopulatetheDE TMENTStable.Whichofthefollowingmusthee xecutetopopulatetheDEPTREE_TEM PTREE_TEM PT A B t a b l e ? Ma r k fo r Re v i ew (1)Points BEGIN utldtree('DEPARTMENTS'); END;
BEGIN deptree_fill('TABLE','BOB','DEPARTMENTS'); END; (*)
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
20. 20. s q l s c r i pt i s r u n? (1)Points
Whic Which hof oft the hef fol ollo lowi wing ngi is sNO NOT Tcr crea eate ted dwh when ent the heu utl tldt dtre ree. e. M ar k f o r R e v i e w
TheDEPTREEview TheDEPTREE_FILLprocedure TheUSER_DEPENDENCIESview(*) TheDEPTREE_TEMPTABtable
Co r r ec t
Co r r e ct
21. Asing Asingle lepro proced cedure ureca canb nbeb eboth otha aref refere erence ncedo dobje bject ctand anda adep depend endent entob objec jec t. T ru e or F al s e ? M a r k f o r Re v i e w (1)Points True(*) False
Co r r ec t
Co r r e ct
22. 22. Func Functi tion onF FET ETCH CH_E _EMP MPr ref efer eren ence ces sth the eEM EMPL PLOY OYEE EES Sta tabl ble. e.T The het t ableismodifiedby: ALTERTABLEemployeesADD(resumeCLOB); WhenwilltheORACLEservertrytorecompileFETCH_EMPautomatically? WhenwilltheORACLEservertrytorecompileF ETCH_EMPautomatically? MarkforReview (1)Points
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
23 .
E xa m i ne t he f ol l o wi n g c o d e:
CREATEFUNCTIONdeptfunc RETURNNUMBERIS v_countNUMBER(6); BEGIN SELECTCOUNT(*)INTOv_countFROMdepartments; RETURNv_count; END; WhichofthefollowingwilldisplaythedependencybetweenDEPTFUNCand Whichofthefollowingwilldisplaythedepend encybetweenDEPTFUNCandDEPARTME DEPARTME NTS? MarkforReview (1)Points SELECTname,type FROMuser_dependencies WHEREnameIN('DEPTFUNC','DEPARTMENTS');
SELECTname,type,referenced_name,referenced_type FROMuser_dependencies WHEREreferenced_name='DEPARTMENTS' ANDreferenced_type='TABLE'; (*) SELECTname,type,referenced_name,referenced_type FROMuser_dependencies WHEREname='DEPARTMENTS' ANDtype='TABLE';
SELECTobject_name,object_type FROMuser_objects WHEREobject_nameIN('DEPARTMENTS','DEPTFUNC') ANDreferenced='YES';
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Trusted by over 1 million members
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
ThespecificationandbodyofEMPPACKareinvalidated,butCALL_EMPrem ThespecificationandbodyofEMPPACKareinva lidated,butCALL_EMPrema a insvalid. ThebodyofEMPPACKisinvalidated,butthesp ThebodyofEMPPACKis invalidated,butthespecificationremainsvalid ecificationremainsvalid. . (*) EMPPACK.GET_EMPisinvalidated,butotherproc EMPPACK.GET_EMPisinv alidated,butotherproceduresinEMPPACKremain eduresinEMPPACKremainv v alid. NothingisinvalidatedbecausethePL/SQLcode Nothingisinvalidated becausethePL/SQLcodedoesnotreferencetheG doesnotreferencetheGE E NDERcolumn.
Co r r ec t
Co r r e ct
25. 25. ASE ASELE LECT CTf fro rom mth the eDE DEPT PTRE REE Eta tabl ble edi disp spla lays yst tab able leL LOC OCAT ATIO IONS NS atnestedlevel0andprocedureLOCPROCatne atnestedlevel0and procedureLOCPROCatnestedlevel2.Thisshows stedlevel2.ThisshowsthatLOCP thatLOCP ROCisdirectlydependentonLOCATIONS.Trueo ROCisdirectlydepend entonLOCATIONS.TrueorFalse? rFalse? MarkforReview (1)Points True False(*)
Co r r ec t
Co r r e ct
View more...
Comments