Semester 2 Final Exam PL SQL (2)

July 9, 2019 | Author: Catalina Achim | Category: Pl/Sql, Subroutine, Parameter (Computer Programming), Sql, Compiler
Share Embed Donate


Short Description

Download Semester 2 Final Exam PL SQL (2)...

Description

Test:Semester2FinalExam 1. Nati Native vec com ompi pila lati tion ona alw lway ays sru runs nsf fas aste ter; r;t the here refo fore reS SQL QLs sta tate teme ment nts sin inP PL/ L/SQ SQ Lwillalwaysrunfaster,also.TrueorFalse? Lwillalwaysrunfast er,also.TrueorFalse? MarkforReview (1)Points True False(*)

Co r r ec t

Co r r e ct

2. VEL. EL.(C (Cho hoos ose eth thre ree) e) (1)Points

Iden Identi tify fye exa xamp mple les sof ofb ben enef efit its sof ofu usi sing ngP PLS LSQL QL_O _OPT PTIM IMIZ IZE_ E_LE LE Mark Markf for orR Rev evie iew w (Chooseallcorrectanswers)

Modifysourcecodetooptimizefrequently-used Modifysourcecodeto optimizefrequently-usedelementsatthetop. elementsatthetop. ControlwhatPL/SQLdoeswithuselesscode.(*) Backwardcompatiblewithpreviousversionsof Backwardcompatiblewi thpreviousversionsoftheOracledatabase.(*) theOracledatabase.(*) Separatingcompiledcodesothatseparateunit Separatingcompiledco desothatseparateunitsmayberepeatedasneed smayberepeatedasneede e d. Copycompiledcodefromonesubprogramintoan Copycompiledcodefro monesubprogramintoanothersubprogram.(*) othersubprogram.(*)

Co r r ec t

Co r r e ct

3. Nati Native vem mac achi hine nec cod ode ePL PL/S /SQL QLw wil ill lal alwa ways yse exe xecu cute tef fas aste ter rth th anbytecodePL/SQLbecauseitneednotbeinterpretedatruntime.True anbytecodePL/SQLbecauseitneednotbeinte rpretedatruntime.TrueorFalse orFalse ? 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 set two wo) ) (1)Points

4. Iden Identi tify fys som ome ebe bene nefi fits tso of fus usin ing gco cond ndit itio iona nal lco comp mpil ilat atio ion. n. Mark Markf for orR Rev evie iew w (Chooseallcorrectanswers)

Usenewfeatureswiththelatestdatabasereleaseanddisablethemwith Usenewfeatureswiththelatestdatabaserele aseanddisablethemwith olderdatabaseversions(*) SpeedupthecompilationtimeofalengthyPL/SQLsubprogram. Determineinitializationvaluesduringstartu Determineinitializati onvaluesduringstartupofadatabasesession. pofadatabasesession. Activatedebuggingortracingstatementsinth Activatedebuggingor tracingstatementsinthedevelopmentenvironment edevelopmentenvironment (*)

Co r r ec t

Co r r e ct 5.

Int Inthe hef fol ollo lowi wing nge exa xamp mple le, ,wh what ats sta tate teme ment ntb bel elon ongs gsi in nLi Line ne

A? ALTERSESSIONSETPLSQL_CCFLAGS='debug:true'; CREATEORREPLACEPROCEDUREtestprocISBEGIN ... $IF$$debug$THEN DBMS_OUTPUT.PUT_LINE('Thiscodewasexecuted'); --LineA ... ENDtestproc; ALTERSESSIONSETPLSQL_CCFLAGS='debug:false'; MarkforReview (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. Toi Toinc nclu lude des sel elec ecti tion ons sof ofc cod ode efo for rco comp mpil ilat atio ion nba base sed don onu u ser-define ser-definedval dvalues, ues,uset usethePL hePLSQL_C SQL_CCFLAG CFLAGSpar Sparamete ameters.T rs.Trueo rueorFal rFalse? se? Markfor Markfor Review (1)Points True(*) False

Co r r ec t

Co r r e ct

7. Obfu Obfusc scat atio ion ndo does esn not ota all llow owa any nyon one eto tos see eet the hes sou ourc rce eco code de ,includin ,includingthe gtheowne owner.Tr r.Trueor ueorFals False? e? MarkforR MarkforReview eview (1)Points True(*) False

Co r r ec t

Co r r e ct 8.

Whic Which his isN NOT OTa ab ben enef efit ito of fob obfu fusc scat atio ion? n?

(1)Points Sourcecodeisnotloadedinthedatadictionary. Sourcecodeishiddenfromallusers. Sourcecodeisvisibletotheowner.(*) Protectionforintellectualpropertyisprovided.

Co r r ec t

Co r r e ct

Mark Markf for orR 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 Whatd doe oes sth the efo foll llow owin ing gst stat atem emen ent tdo do? ?

DBMS_WARNING.ADD_WARNING_SETTING_CAT('PERFORMANCE','ENABLE','SESSION'); DBMS_WARNING.ADD_WARNING_SETTING_CAT('PERFORMA NCE','ENABLE','SESSION'); MarkforReview (1)Points EnablesthePERFORMANCEwarningcategory,sett EnablesthePERFORMANC Ewarningcategory,settingothercategorysettin ingothercategorysetting g stodisabled. EnablesthePERFORMANCEwarningcategory,leavingothercategorysettin EnablesthePERFORMANCEwarningcategory,leav ingothercategorysetting g sunchanged. AddthePERFORMANCEwarningcategoryintoaPL/SQLvariable. Disablesallwarningcategories,thenenables Disablesallwarningc ategories,thenenablesthePERFORMANCEcategory. thePERFORMANCEcategory. EnablesthePERFORMANCEwarningcategory,leav EnablesthePERFORMANC Ewarningcategory,leavingothercategorysettin ingothercategorysetting g sunchanged,forthecurrentsession.(*)

Co r r ec t

Co r r e ct

11. Inthe IntheUS USER_ ER_ERR ERRORS ORSda data tadic dictio tionar naryv yview iew,i ,ifa fane nerro rrori risp spref refixe ixedw dwith ith"W "W arning,"thecommandcompletesbuthasaside arning,"thecommandc ompletesbuthasasideeffecttheuserneedsto effecttheuserneedstoknowabou knowabou t.Forallothererrors,thecommandterminate t.Forallothererror s,thecommandterminatesabnormally.TrueorFal sabnormally.TrueorFalse? se? MarkforReview (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 ALTERSESSION SETPLSQL_WARNINGS='ENABLE:SEVERE'; MarkforReview (1)Points True False(*)

Co r r ec t

Co r r e ct

Section14 (Answerallquestionsinthissection) 13. 13.

Int Inthi his ssc scen enar ario io, ,th the efo foll llow owin ing gst stat atus usi is sgi give ven nfo for rea each ch

procedure: ProcedureAislocalandhasatimestampof10AM ProcedureBisremoteandhasalocaland ProcedureBisrem oteandhasalocalandremotetimestampof10:3 remotetimestampof10:30AM 0AM InTimestampMode,ProcedureA,whichisdependentonProcedureB,will InTimestampMode,ProcedureA,whichisdepen dentonProcedureB,willexecute execute successfullyat11AM.TrueorFalse? MarkforReview (1)Points True(*) False

Co r r ec t

Co r r e ct

14. 14. Ift Iftwo wor rel elat ated edo obj bjec ects tsa are rei in ndi diff ffer eren ent tda data taba base ses, s,t the hed d ependencybetweenthemisautomaticallyrecord ependencybetweenthem isautomaticallyrecordedonthedependentobjec edonthedependentobject'sdata t'sdata dicti iction onar ary. y.T Tru rue eor orF Fa alse? lse? Mark Markf for orR 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 eB Bha has sit its slo loca cal lva vari riab able lee emp mp_n _num umbe ber rch chan ange ged dto to emp_name.Thedatatypeofemp_idischanged emp_name.Thedataty peofemp_idischangedfromnumbertointeger.I fromnumbertointeger.Itiscomp tiscomp iledsuccessfully.InSignatureMode,Procedur iledsuccessfully.In SignatureMode,ProcedureA,whichisdependento eA,whichisdependentonremote nremote Proc Proced edur ure eB, B,w wil ill lco comp mpil ile ean and dex exec ecut ute esu succ cces essf sful ully ly. .Tr True ueo or rFa Fals lse? e? Mark Markf for or Review (1)Points True(*) False

Co r r ec t

Co r r e ct

16. 16. Ach Achan ange gei in na are remo mote ter ref efer eren ence ced dsu subp bpro rogr gram ami is sau auto toma mati tica ca llyrecordedasinvalidifitsbaseobjectchangesandthatnewstatus llyrecordedasinvalidifitsbaseobjectcha ngesandthatnewstatusisrelaye isrelaye dtothedependentobject'sstatusandautomat dtothedependentobj ect'sstatusandautomaticallymarkedasinvalid. icallymarkedasinvalid.Trueor Trueor False? False? Markf Markfor orRev Review iew (1)Points True False(*)

Co r r ec t

Co r r e ct

17. 17. Proc Proced edur ure eB Bha has sa ane new wIN INO OUT UTp par aram amet eter era add dded edt to oit it. .It Itc c ompilessuccessfully.InSignaturemode,ProcedureA,whichisdependen ompilessuccessfully.InSignaturemode,Proce dureA,whichisdependentonremo tonremo teP tePro roce cedu dure reB B, ,wi will llf fai ail. l.T Tru rue eor orF Fal alse se? ? Mark Markf for orR 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.

Whichofthefollowingstatementsaboutdependenciesaretrue?(Choose Whichofthefollowingstatementsaboutdepend enciesaretrue?(Choosetwo.) two.) MarkforReview (1)Points (Chooseallcorrectanswers) ED_PROCisindirectlydependentonDEPARTMENTS(*) EMPLOYEESisreferencedbyED_VIEW(*) ED_CURSisdirectlydependentonED_VIEW ED_PROCisreferencedbyED_VIEW ED_PROCisdirectlydependentonEMPLOYEES

Co r r ec t

Co r r e ct

19. 19. User UserB BOB OBw wan ants tst to okn know oww whi hich cho obj bjec ects tsr ref efer eren ence ceh his isD DEP EPAR AR TMENTStable.WhichofthefollowingmustheexecutetopopulatetheDE TMENTStable.Whichofthefollowingmusthee xecutetopopulatetheDEPTREE_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 hof oft the hef fol ollo lowi wing ngi is sNO NOT Tcr crea eate ted dwh when ent the heu utl tldt dtre ree. e. M ar k f o r R e v i e w

TheDEPTREEview TheDEPTREE_FILLprocedure TheUSER_DEPENDENCIESview(*) TheDEPTREE_TEMPTABtable

Co r r ec t

Co r r e ct

21. Asing Asingle lepro proced cedure ureca canb nbeb eboth otha aref refere erence ncedo dobje bject ctand anda adep depend endent entob 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 onF FET ETCH CH_E _EMP MPr ref efer eren ence ces sth the eEM EMPL PLOY OYEE EES Sta tabl ble. e.T The het t ableismodifiedby: ALTERTABLEemployeesADD(resumeCLOB); WhenwilltheORACLEservertrytorecompileFETCH_EMPautomatically? WhenwilltheORACLEservertrytorecompileF ETCH_EMPautomatically? MarkforReview (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:

CREATEFUNCTIONdeptfunc RETURNNUMBERIS v_countNUMBER(6); BEGIN SELECTCOUNT(*)INTOv_countFROMdepartments; RETURNv_count; END; WhichofthefollowingwilldisplaythedependencybetweenDEPTFUNCand Whichofthefollowingwilldisplaythedepend encybetweenDEPTFUNCandDEPARTME DEPARTME NTS? MarkforReview (1)Points SELECTname,type FROMuser_dependencies WHEREnameIN('DEPTFUNC','DEPARTMENTS');

SELECTname,type,referenced_name,referenced_type FROMuser_dependencies WHEREreferenced_name='DEPARTMENTS' ANDreferenced_type='TABLE'; (*) SELECTname,type,referenced_name,referenced_type FROMuser_dependencies WHEREname='DEPARTMENTS' ANDtype='TABLE';

SELECTobject_name,object_type FROMuser_objects WHEREobject_nameIN('DEPARTMENTS','DEPTFUNC') ANDreferenced='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.

ThespecificationandbodyofEMPPACKareinvalidated,butCALL_EMPrem ThespecificationandbodyofEMPPACKareinva lidated,butCALL_EMPrema a insvalid. ThebodyofEMPPACKisinvalidated,butthesp ThebodyofEMPPACKis invalidated,butthespecificationremainsvalid ecificationremainsvalid. . (*) EMPPACK.GET_EMPisinvalidated,butotherproc EMPPACK.GET_EMPisinv alidated,butotherproceduresinEMPPACKremain eduresinEMPPACKremainv v alid. NothingisinvalidatedbecausethePL/SQLcode Nothingisinvalidated becausethePL/SQLcodedoesnotreferencetheG doesnotreferencetheGE E NDERcolumn.

Co r r ec t

Co r r e ct

25. 25. ASE ASELE LECT CTf fro rom mth the eDE DEPT PTRE REE Eta tabl ble edi disp spla lays yst tab able leL LOC OCAT ATIO IONS NS atnestedlevel0andprocedureLOCPROCatne atnestedlevel0and procedureLOCPROCatnestedlevel2.Thisshows stedlevel2.ThisshowsthatLOCP thatLOCP ROCisdirectlydependentonLOCATIONS.Trueo ROCisdirectlydepend entonLOCATIONS.TrueorFalse? rFalse? MarkforReview (1)Points True False(*)

Co r r ec t

Co r r e ct

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF