OracleOCP认证考试练习真题OCP082_第1页
OracleOCP认证考试练习真题OCP082_第2页
OracleOCP认证考试练习真题OCP082_第3页
OracleOCP认证考试练习真题OCP082_第4页
OracleOCP认证考试练习真题OCP082_第5页
已阅读5页,还剩98页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

试卷科目:OracleOCP认证考试练习OracleOCP认证考试练习真题OCP082PAGE"pagenumber"pagenumber/SECTIONPAGES"numberofpages"numberofpagesOracleOCP认证考试练习真题OCP082第1部分:单项选择题,共57题,每题只有一个正确答案,多选或少选均不得分。[单选题]1.Whatistrueaboutnon-equijoinstatementperformance?A)TheOraclejoinsyntaxperformslesswellthantheSQI:1999compliantANSIjoinsyntax.B)TheBETWEENconditionusedwithannon-equijoinalwaysperformsbetterthanwhenusingthe>=and<=conditions.C)TheBETWEENconditionusedwithannon-equijoinsometimesperformsbetterthanusingthe>=and<=conditions.D)Thejoinsyntaxusedmakesnodifferencetoperformance.E)TheOraclejoinsyntaxperformsbetterthantheSQL:1999compliantANSIjoinsyntax.答案:D解析:[单选题]2.class="fr-ficfr-dibcursor-hover"NLS_DATEFORMATissettoDD-MON-YY.Whichqueryrequiresexplicitdatatypeconversion?A)SELECTsalary+'120.50'FROMemployees;B)SELECTjoin_date11''11salaryFROMemployees;C)SELECTjoin_dateFROMemployeesWHEREjoin_date>'10-02-2018';D)SELECTjoin_date+'20'FROMemployees;E)SELECTSUBSTR(join_date,1,2)-10FROMemployees;答案:C解析:[单选题]3.WhichisthedefaultcolumnorcolumnsforsortingoutputfromcompoundqueriesusingSEToperatorssuchasINTERSECTinaSQLstatement?A)thefirstNUMBERcolumninthefirstSELECTofthecompoundqueryB)thefirstcolumninthefirstSELECTofthecompoundqueryC)thefirstNUMBERorVARCHR2columninthelastSELECEofthecompoundqueryD)thefirstVARCHAR2columninthefirstSELECTofthecompoundqueryE)thefirstcolumninthelastSELECTofthecompoundquery答案:B解析:[单选题]4.TheCUSTOMERStablehasaCUSTLASTNAMEcolumnofdatatypeVARCHAR2.ThetablehastworowswhoseCUSTLASTNAMEvaluesareAndersonandAusson.WhichqueryproducesoutputforCUSTLASTNAMEcontainingoderforthefirstrowandAusforthesecond?A)SELECTREPLACE(SUBSTR(Cust.lastname,-3),An','O')FROMcustomers;B)SELECTREPLACE(REPLACE(custlastname,'son',''),'An','O')FROMcustomers;C)SELECTINITCAP(EPLACE(TRIM('son'FROMcust_last_name),'An','o'))FROMcustomers;D)SELECTREPLACE(TRIM(TRAILING'son'FROMcust_last_name),'AN','O'ROMcustomers;答案:B解析:[单选题]5.ExaminethedescriptionofthePRODUCTStable:class="fr-ficfr-dibcursor-hover"Whichqueryisvalid?A)SELECTprod_id,MAX(AVG(cost))FROMproductsGROUPBYprod_id;B)SELECTprod_id,AVG(MAX(cost))FROMproductsGROUPBYprod_id;C)SELECTprod_id,release_date,SUM(cost)FROMproductsGROUPBYprod_id,release_date;D)SELECTprod_id,release_date,SUM(cost)FROMproductsGROUPBYprod_id;答案:C解析:[单选题]6.Youhavebeentaskedtocreateatableforabankingapplication.Oneofthecolumnsmustmeetthreerequirements:BestoredinaformatsupportingdatearithmeticwithoutusingconversionfunctionsStorealoanperiodofupto10yearsBeusedforcalculatinginterestforthenumberofdaystheloanremainsunpaidWhichdatatypeshouldyouuse?A)INTERVALYEARTOMONTHB)INTERVALDAYTOSECONDC)TIMESTAMPWITHLOCALTIMEZONED)TIMESTAMPE)TIMESTAMPWITHTIMEZONE答案:B解析:[单选题]7.Inthespfileofasingleinstancedatabase,LOCAL_LISTENERissettoLISTENER_1.TheTNSNAMES.ORAfilein$ORACLE_HOME/network/admininthedatabasehomecontains:Whichstatementistrue?A)DynamicserviceregistrationcannotbeusedforthisdatabaseinstanceB)TheLREGprocessregistersservicesdynamicallywiththeLISTENER_1listenerC)LISTENER_1mustalsobedefinedintheLISTENER.ORAfiletoenabledynamicserviceregistrationD)TherearetwolistenersnamedLISTENERandLISTENER_1runningsimultaneouslyusingport1521onthesamehostasthedatabaseinstancesE)ThedefinitionforLISTENER_1requiresaCONNECT_DATAsectiontoenabledynamicserviceRegistration答案:D解析:[单选题]8.YouwanttowriteaquerythatpromptsfortwocolumnnamesandtheWHEREconditioneachtimeitisexecutedinasessionbutonlypromptsforthetablenamethefirsttimeitisexecuted.Thevariablesusedinyourqueryareneverundefinedinyoursession.Whichquerycanbeused?A)SELECT&&col1,&&col2FROM&tableWHERE&&condition=&&cond;B)SELECT&col1,&col2FROM&&tableWHERE&condition;C)SELECT&col1,&col2FROM?&table?WHERE&condition;D)SELECT?&&col1?,?&&col2?FROM&tableWHERE?&&condition?=?&cond?;E)SELECT&&col1,&&col2FROM&tableWHERE&&condition;答案:B解析:[单选题]9.ExaminethedescriptionoftheCUSTOMERStable:YouwanttodisplaydetailsofallcustomerswhoresideincitiesstartingwiththeletterDfollowedbyatleasttwocharacters.Whichquerycanbeused?A)SELECT*FROMcustomersWHEREcityLIKE?D_%?;B)SELECT*FROMcustomersWHEREcity=?%D_?;C)SELECT*FROMcustomersWHEREcityLIKE?D_?;D)SELECT*FROMcustomersWHEREcity=?D_%?;答案:A解析:[单选题]10.EvaluatethefollowingALTERTABLEstatement:ALTERTABLEordersSETUNUSED(order_date);Whichstatementistrue?A)AfterexecutingtheALTERTABLEcommand,youcanaddanewcolumncalledORDER_DATEtotheORDERStable.B)TheORDER_DATEcolumnshouldbeemptyfortheALTERTABLEcommandtoexecutesuccsessfully.C)ROLLBACKcanbeusedtogetbacktheORDER_DATEcolumnintheORDERStable.D)TheDESCRIBEcommandwouldstilldisplaytheORDER_DATEcolumn.答案:A解析:[单选题]11.ChoosethebestanswerEvaluatethefollowingSQLstatement:ALTERTABLEhr.empSETUNUSED(mgr_id);WhichstatementistrueregardingtheeffectoftheaboveSQLstatement?A)AnyviewscreatedontheEMPtablethatincludetheMGR_IDcolumnwouldbeautomaticallymodifiedandremainvalid.B)AnyconstraintsdefinedontheMGR_IDcolumnwouldberemovedbytheabovecommand.C)AnysynonymexistingontheEMPtablewouldhavetobere-created.D)AnyindexcreatedontheMGRincolumnwouldcontinuetoexistuntiltheDROPUNUSEDCOLUMNScommandisexecuted.答案:B解析:[单选题]12.WhichstatementistrueregardingtheINTERSECToperator?A)ThenamesofcolumnsinallSELECTstatementsmustbeidentical.B)ItignoresNULLvalues.C)Reversingtheorderoftheintersectedtablesalterstheresult.D)ThenumberofcolumnsanddatatypesmustbeidenticalforallSELECTstatementsinthequery.答案:D解析:[单选题]13.Inoneofyourdatabases,theuserHRhasthepasswordHRMGR.Youwanttoconnecttoadatabaseinstancewhoselistenerlistensonport1531byusingthisstatement:CONNECTHR/HRMGR@orclNonameserverisused.WhichstatementistrueaboutORCL?A)ItmustbethevalueoftheSERVICE_NAMESparameterontheclientsideB)Itmustresolvetoavalidconnectdescriptorintheserver?stnsnames.orafileC)Itmustresolvetoavalidconnectdescriptorintheclient?stnsnames.orafileD)ItmustbethenameofthedatabasetowhoseinstanceHRwishestoconnectE)ItmustbethenameoftheserverrunningthedatabasetowhoseinstanceHRwishestoconnect答案:C解析:[单选题]14.ExaminethedescriptionofthePROMOTIONStable:Managementrequiresareportofuniquepromotioncostsineachpromotioncategory.Whichquerywouldsatisfythisrequirement?A)SELECTDISTINCTpromo_category,promo_costFROMpromotionsORDERBY1B)SELECTpromo_category,DISTINCTpromo_costFROMpromotionsC)SELECTDISTINCTpromo_cost,promo_categoryFROMpromotionsD)SELECTDISTINCTpromo_cost,DISTINCTpromo_categoryFROMpromotions;答案:A解析:[单选题]15.IntheORCLdatabase,UNDOTBS1istheactiveundotablespacewiththeseproperties:1Asizeof100MB2AUTOEXTENDisoff3UNDO_RETENTIONissetto15minutes4IthasRETENTIONGUARANTEEUNDOTBS1fillswithuncommittedundo10minutesafterthedatabaseopens.Whatwillhappenwhenthenextupdateisattemptedbyanytransaction?A)ItsucceedsandthegeneratedundoisstoredinSYSTEM.B)Itfailsandreturnstheerrormessage?ORA-30036:unabletoextendsegmentby8inundotablespace?UNDOTBS1??.C)ItsucceedsandtheleastrecentlywrittenundoblockofUNDOTBS1isoverwrittenbythegeneratedundo.D)ItsucceedsandthegeneratedundoisstoredinSYSAUX.E)ItsucceedsandtheleastrecentlyreadundoblockofUNDOTBS1isoverwrittenbythegeneratedundo.答案:B解析:[单选题]16.Inoneofyourdatabases,userKINGis:1.NotaDBAuser2.Anoperatingsystem(OS)userExaminethiscommandanditsoutput:WhatmustyoudosothatKINGisauthenticatedbytheOSwhenconnectingtothedatabaseinstance?A)SetOS_AUTHEN_PREFIXtoOPS$B)HavetheOSadministratoraddKINGtotheOSDBAgroupC)GrantDBAtoKINGD)UnsetREMOTE_LOGIN_PASSWORDFILEE)AlteruserKINGtobeIDENTIFIEDEXTERNALLY答案:E解析:[单选题]17.ViewtheExhibitsandexaminethestructureoftheCOSTSandPROMOTIONStables.YouwanttodisplayPROD_IDSwhosepromotioncostislessthanthehighestcostPROD_IDinapromotiontimeinterval.ExaminethisSQLstatement:Whatwillbetheresult?A)ItgivesanerrorbecausetheALLkeywordisnotvalidB)ItgivesanerrorbecausetheGROUPBYclauseisnotvalidC)ItexecutessuccessfullybutdoesnotgivetherequiredresultD)Itexecutessuccessfullyandgivestherequiredresult答案:D解析:[单选题]18.ExaminethedescriptionoftheEMPLOYEEStable:Whichqueryisvalid?A)SELECTdept_id,AVG(MAX(salary))FROMemployeesGROUPBYdept_id;B)SELECTdept_id,join_date,SUM(salary)FROMemployeesGROUPBYdept_id;C)SELECTdept_id,join_date,SUM(salary)FROMemployeesGROUPBYdept_id,join_date;D)SELECTdept_id,MAX(AVG(salary))FROMemployeesGROUPBYdept_id;答案:C解析:[单选题]19.Examinethiscommandandsomepartialoutput:WhydoestheDB01.serviceshowunknownstatus?A)TheserviceDB01.isdynamicallyregisteredB)TheLOCAL_LISTENERdatabaseparameterisnotsettoaservicenamethatreferstoLISTENER_1C)TheserviceDB01.isstaticallyregisteredD)Thelistenerisnotlisteningonthedefaultport1521E)TheSID_LIST_LISTENERsectionisnotcontainedintheLISTENER.ORAfile答案:C解析:[单选题]20.Examinethefollowingcommand;ALTERSYSTEMSETenable_ddl_logging=TRUE;Whichstatementistrue?A)Onlythedatadefinitionlanguage(DDL)commandsthatresultedinerrorsareloggedinthealertlogfile.B)AllDDLcommandsareloggedinthealertlogfile.C)AllDDLcommandsareloggedinadifferentlogfilethatcontainsDDLstatementsandtheirexecutiondates.D)OnlyDDLcommandsthatresultedinthecreationofnewsegmentsarelogged.E)AllDDLcommandsareloggedinXMLformatinthealertdirectoryundertheAutomaticDiagnosticRepository(ADR)home.答案:C解析:[单选题]21.ChooseoneExaminetheparametersforadatabaseinstance:NAMETYPEVALUEtemp_undo_enabledbooleanTRUEundo_managementstringAUTOundo_retentionInteger900undo_tablespacestringUNDOTBS1Yourdatabasehasthreeundotablespacesandthedefaultundotablespaceisnotautoextensible.Resumablespaceallocationisnotenabledforanysessionsinthedatabaseinstance.Whatistheeffectonnewtransactionswhenallundospaceinthedefaultundotablespaceisinusebyactivetransactions?A)TransactionswaituntilspacebecomesavailableinUNDOTBS1.B)Transactionswritetheirundoinatemporarytablespace.C)Transactionsfail.D)TransactionswritetheirundointheSYSTEMundosegment.答案:C解析:[单选题]22.ViewtheExhibitandexaminethestructureoftheCUSTOMERStable.UsingtheCUSTOMERStable,youmustgenerateareportthatdisplaysacreditlimitincreaseof15%forallcustomers.Customerswithnocreditlimitshouldhave?NotAvailable?displayed.WhichSQLstatementwouldproducetherequiredresult?A)SELECTNVL(TO_CHAR(cust_credit_limit*.15),?NotAvailable?)?NEWCREDIT?FROMcustomersB)SELECTTO_CHAR(NVL(cust_credit_limit*.15),?NotAvailable?))?NEWCREDIT?FROMcustomersC)SELECTNVL(cust_credit_limit*.15,?NotAvailable?)?NEWCREDIT?FROMcustomersD)SELECTNVL(cust_credit_limit,?NotAvailable?)*.15?NEWCREDIT?FROMcustomers答案:A解析:[单选题]23.Examinethedetailsoftheuncompressed,non-partitionedheaptableCITIES.NameNull?TypeCITYIDNOTNULLNUMBER(4)CITY_NAMEVARCHAR2(50)Examinethecommand:SQL>ALTERTABLEcitiesSHRINKSPACECOMPACT;Whatmustyoudobeforeexecutingit?A)Ensuretherearenopendingtransactionsonthetable.B)Disableallindexesonthetable.C)Ensurefreespacethatisapproximatelyequaltothespaceusedbythetableshouldbeavailable.D)Enablerowmovementisenabled.答案:D解析:[单选题]24.Youwanttoreducefragmentationandreclaimunusedspaceforthesalestablebutnotitsdependentobjects.Duringthisoperation,youwanttoensurethefollowing:I.Long-runningqueriesarenotaffected.Ii.Noextraspaceisused.Iii.Datamanipulationlanguage(DML)operationsonthetablesucceedatalltimesthroughouttheprocessIv.Unusedspaceisreclaimedbothaboveandbelowthehighwatermark.WhichalterTABLEoptionwouldyourecommend?A)DEALLOCATEUNUSEDB)SHRINKSPACECASCADEC)SHRINKSPACECOMPACTD)ROWSTORECOMPRESSBASIC答案:C解析:[单选题]25.Ascriptabc.sqlmustbeexecutedtoperformajob.AdatabaseuserHR,whoisdefinedinthisdatabase,executesthiscommand:$sqlplushr/hr@orcl@abc.sqlWhatwillhappenuponexecution?A)ThecommandsucceedsandHRwillbeconnectedtotheorclandabc.sqldatabasesB)ThecommandsucceedsandHRwillbeconnectedtotheorcldatabaseinstance,andtheabc.sqlscriptwillbeexecutedC)ThecommandfailsbecausethescriptmustrefertothefullpathnameD)Thecommandfailsandreportsanerrorbecause@isusedtwice答案:B解析:[单选题]26.Choosethebestanswer.Examinethesecommands:CONNECT/ASSYSDBASQL>CREATEDIRECTORYdumpdirAS?/u01/app?;Directorycreated.SQL>GRANTREAD,WRITEONDIRECTORYdumpdirTOPUBLIC;Grantsucceeded.SQL>GRANTUSERTESTIDENTIFIEDBYtest;Usercreated.SQL>GRANTCREATESESSION,RESOURCE,UNLIMITEDTABLESPACETOtest;Grantsucceeded.SQL>CONNtest/test.Connected.SQL>CREATETABLEtest_employees(idNUMBER(3),nameVARCHAR2(20),salaryNUMBER(7));Tablecreated.SQL>CREATESYNONYMempFORtest_employees;Synonymcreate.Nowexaminethiscommand:$expdptest/testDIRECTORY=dumpdirDUMPFILE=test_emp.dmpLOGFILE=test.logTABLES=empWhichistrue?A)Itperformstheexportsuccessfully.B)Itthrowsanerrorasthetabletest_employeesisemptyandCONTENT=data_onlyisspecified.C)ItthrowsanerrorastheQUERYparameterisnotsupportedonanemptytable.D)ItthrowsanerrorasDataPumpcannotfindatablecalledTEST.EMP.答案:D解析:[单选题]27.YouplantocreateadatabasebyusingtheDatabaseConfigurationAssistant(DBCA),withthefollowingspecifications:Applicationswillconnecttothedatabaseviaamiddletier.Thenumberofconcurrentuserconnectionswillbehigh.Thedatabasewillhavemixedworkload,withtheexecutionofcomplexBIqueriesscheduledatnight.WhichDBCAoptionmustyouchoosetocreatethedatabase?A)aGeneralPurposedatabasetemplatewithdefaultmemoryallocationB)aDataWarehousedatabasetemplate,withthededicatedservermodeoptionandAMMenabledC)aGeneralPurposedatabasetemplate,withthesharedservermodeoptionandAutomaticMemoryManagement(AMM)enabledD)adefaultdatabaseconfiguration答案:C解析:[单选题]28.Youexecutethisquery:SELECTTO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE),?MON?),?dd?Mondayfor?fmMonthrrrr?)Whatistheresult?A)ItexecutessuccessfullybutdoesnotreturnanyresultB)ItreturnsthedateforthefirstMondayofthenextmonthC)ItgeneratesanerrorD)ItreturnsthedateforthelastMondayofthecurrentmonth答案:B解析:[单选题]29.IntheSALESdatabase,DEFERRED_SEGMENT_CREATIONisTRUE.Examinethiscommand:SQL>CREATETABLET1(c1INTPRIMARYKEY,c2CLOB);Whichsegmentorsegments,ifany,arecreatedasaresultofexecutingthecommand?A)T1,anindexsegmentfortheprimarykey,aLOBsegment,andalobindexsegmentB)nosegmentsarecreatedC)T1onlyD)T1andanindexsegmentcreatedfortheprimarykeyonlyE)T1,anindexsegmentfortheprimarykey,andaLOBsegmentonly答案:B解析:[单选题]30.Choosethebestanswer.Whichstatementistrueaboutdatabaselinks?A)Apublicdatabaselinkcanbecreatedonlybysys.B)Adatabaselinkcreatedinadatabaseallowsaconnectionfromthatdatabase'sinstancetothetargetdatabase'sinstance,butnotviceversa.C)Apublicdatabaselinkcanbeusedbyauserconnectedtothelocaldatabaseinstancetoconnecttoanyschemaintheremotedatabaseinstance.D)Privatedatabaselinkcreationrequiresthesameusertoexistinboththelocalandtheremotedatabases.E)AdatabaselinkcanbecreatedonlybetweentwoOracledatabases.答案:B解析:[单选题]31.ChoosethebestanswerExaminethesestatementsandresults:SQL>SELECTCOUNT(*)FROMemp;COUNT(*)14SQL>CREATEGLOBALTEMPORARYTABLEt_empASSELECT*FROMemp;Tablecreated.SQL>INSERTINTOt_empSELECT*FROMemp;14rowscreated.SQL>COMMIT;Commitcomplete.SQL>INSERTINTOt_empSELECT*FROMemp;14rowscreated.SQL>SELECTCOUNT(*)FROMt_emp;Howmanyrowsareretrievedbythelastquery?A)0B)14C)28D)42答案:B解析:[单选题]32.Choosethebestanswer.Examinethisstatement:SELECT1ASid,'John'ASfirst_name,NULLAScommissionFROMDUALINTERSECTSELECT1,'John',NULLFROMDUALORDERBY3;Whatisreturneduponexecution?A)2rowsB)1row.C)0rowsD)anerror答案:B解析:[单选题]33.Choosethebestanswer.Examinethesestatements:CREATETABLEalter_test(c1VARCHAR2(10),c2NUMBER(10));INSERTINTOalter_testVALUES('123',123);COMMIT;WhichistrueaboutmodifyingthecolumnsinALTER_TEST?A)C1canbechangedtoNUMBER(10)butc2cannotbechangedtoVARCHAR2(10).B)C1canbechangedtoVARCHAR2(5)andC2canbechangedtoNUMBER(12,2).C)C1canbechangedtoNUMBER(10)andC2canbechangedtoVARCHAR2(10).D)C2canbechangedtoVARCHAR2(10)butC1cannotbechangedtoNUMBER(10).E)C2canbechangedtoNUMBER(5)butC1cannotbechangedtoVARCHAR2(5).答案:B解析:[单选题]34.Choosethebestanswer.Examinethisstatementwhichreturnsthenameofeachemployeeandtheirmanager:SELECTe.last_nameASemp,m.1ast_nameASmgrFROMemployeeseJOINmanagersmONe.manager_id=m.employee_idORDERBYemp;Youwanttoextendthequerytoincludeemployeeswithnomanager.WhatmustyouaddbeforeJOINtodothis?A)LEFTOUTERB)RIGHTOUTERC)CROSSD)FULLOUTER答案:A解析:[单选题]35.Choosethebestanswer.Examinethisstatement,whichexecutessuccessfully:SELECTd.department_name,ROUND(AVG(NULLIF(e.salary,0)))ASavgsal,MAX(e.salary)ASmaxsalFROMemployeeseJOINdepartmentsdON(e.department_id=d.department_id)GROUPBYd.department_nameORDERBY2;Inwhichorderaretherowsdisplayed?A)sortedbyDEPARTMENT_NAMEB)sortedbyMAXSALC)sortedbyDEPARTMENT_NAMEandAVGSALD)sortedbyDEPARTMENT_NAMEandMAXSALE)sortedbyAVGSAL答案:E解析:[单选题]36.Choosethebestanswer.Youhavetheprivilegestocreateanytypeofsynonym.WhichstatementwillcreateasynonymcalledEMPfortheHCM.EMPLOYEE_RECORDStablethatisaccessibletoallusers?A)CREATESYNONYMPUBLIC.empFORhcm.employee_records;B)CREATEPUBLICSYNONYM.empFORhcm.employee_records;C)CREATEGLOBALSYNONYM.empFORhcm.employee_records;D)CREATESYNONYMSYS.empFORhcm.employee_records;E)CREATESYNONYMempFORhcm.employee_records;答案:B解析:[单选题]37.Choosethebestanswer.ExaminethedescriptionoftheEMPLOYEEStable:NameNull?TypeEMPLOYEE_IDNOTNULLNUMBER(38)SALARYNOTNULLNUMBER(38)DEPARTMENT_IDNOTNULLNUMBER(38)Whichstatementincreaseseachemployee'sSALARYbytheminimumSALARYfortheirDEPARTMENT_ID?A)UPDATEemployeese1SETsalary=salary+(SELECTMIN(salary)FROMemployeese2);B)UPDATEemployeese1SETsalary=(SELECTe2.salary+MIN(e2.salary)FROMemployeese2WHEREe1.department_id=e2.department_idGROUPBYe2.department_id);C)UPDATEemployeese1SETsalary=salary+(SELECTMIN(e1.salary)FROMemployeese2WHEREe1.department_id=e2.department_id);D)UPDATEemployeese1SETsalary=(SELECTe1.salary+MIN(e2.salary)FROMemployeese2WHEREe1.department_id=e2.department_id);答案:D解析:[单选题]38.Choosethebestanswer.Examinethesestatementswhichexecutesuccessfully:ALTERSESSIONSETNLS_DATE_FORMAT='DD-MON-YYYYHH24:MI:SS';ALTERSESSIONSETTIME_ZONE='-5:00';SELECTDBTIMEZONE,SYSDATEFROMDUAL;Examinetheresult:DBTIMEZONESYSDATE+00.0011-JUL-201911:00:00IfLOCALTIMESTAMPwasselectedatthesametime,whatwoulditreturn?A)11-JUL-20196.00.00.00000000AMB)11-JUL-201911.00.00.00000000AMC)11-JUL-201911.00.00.0000000AM-05:00D)11-JUL-20196.00.00.00000000AM-05:00答案:A解析:[单选题]39.Choosethebestanswer.ExaminethedatainthePRODUCTStable:PROD_IDPROD_NAMEPROD_LISTCATEGORY_ID101Plate101102Cup201103Saucer201104Knife301105Fork301Examinethesequeries:1SELECTprod_name,prod_listFROMproductsWHEREprod_list=ANY(10,20)ANDcategory_id=1;2SELECTprod_name,prod_listFROMproductsWHEREprod_listIN(10,20)ANDcategory_id=1;3SELECTprod_name,prod_listFROMproductsWHEREprod_list=ALL(10,20)ANDcategory_id=1;Whichqueriesgeneratethesameoutput?A)2and3B)1and2C)1and3D)1,2,and3答案:B解析:[单选题]40.Choosethebestanswer.Examinethisstatementwhichexecutessuccessfully:INSERTALLWHENSAL>20000THENINTOspecial_salVALUES(EMP_ID,SAL)ELSEINTOsal_historyVALUES(EMP_ID,HIREDATE,SAL)INTOmgr_historyVALUES(EMP_ID,MGR,SAL)SELECTemployee_idEMP_ID,hire_dateHIREDATE,salarySAL,manager_idMGRFROMemployeesWHEREemployee_id<125;Whichistrue?A)Onlyifthesalaryis20000orlessandtheemployeeidis125orhigher,insertEMPLOYEE_ID,MANAGER_ID,andSALARYintotheMGR_HISTORYtable.B)Onlyifthesalaryis20000orlessandtheemployeeidislessthan125,insertEMPLOYEE_ID,MANAGER_ID,andSALARYintotheMGR_HISTORYtable.C)Regardlessofsalaryandemployeeid,insertEMPLOYEE_ID,MANAGER_ID,andSALARYintotheMGR_HISTORYtable.D)Regardlessofsalary,onlyiftheemployeeidislessthan125,insertEMPLOYEE_ID,MANAGER_ID,andSALARYintotheMGR_HISTORYtable.答案:B解析:[单选题]41.Choosethebestanswer.YourdatabaseinstanceisstartedwithanSPFILE.APFILEisalsoavailable.Youexecutethiscommand:ALTERSYSTEMSETDB_CACHE_SIZE=100K;Whereisthevaluechanged?A)intheSPFILEandPFILEB)intheSPFILEandinmemoryC)onlyinmemoryD)onlyintheSPFILEE)intheSPFILE,PFILE,andmemory答案:B解析:[单选题]42.Choosethebestanswer.WhichcompressionmethodisrecommendedforDirect-PathInsertoperations?A)COLUMNSTORECOMPRESSADVANCEDB)ROWSTORECOMPRESSBASICC)COLUMNSTORECOMPRESSBASICD)ROWSTORECOMPRESSADVANCED答案:D解析:[单选题]43.Choosethebestanswer.ExaminethedescriptionoftheSALES1table:NameNullTypeSALES_IDSTORE_IDITEMS_IDQUANTITYSALES_DATESALES2isatablewiththesamedescriptionasSALES1.Somesalesdataiscontainederroneouslyinbothtables.YoumustdisplayrowsfromSALES1andSALES2andwishtoseetheduplicatestoo.Whichsetoperatorgeneratestherequiredoutput?A)SUBTRACTB)UNIONALLC)INTERSECTD)UNIONE)MINUS答案:B解析:[单选题]44.Choosethebestanswer.WhywouldyouusetheTNSPINGhrcommand?A)toverifyifarequestedserviceisavailableB)todetermineifthelistenerfortheHRnetservicenamecanbereachedC)toverifyiftheHRdatabaseinstanceisupD)tocheckandlistmultipleORACLE_HOMElocationsontheserverE)tovalidatethenetworkconnectivitybetweenaclientandthedatabaseinstance答案:B解析:[单选题]45.ChooseoneWhichstatementistrueaboutprofiles?A)Resourcelimitsspecifiedinaprofileassignedtoauserarealwaysenabled.B)Aprofilecanbeassignedonlytooneuser.C)Ausercanexistwithoutanyprofile.D)Passwordmanagementusingprofilesisalwaysenabled.答案:D解析:[单选题]46.ChooseoneWhichstatementistrueabouttheDEFAULTprofile?A)Itcanbedroppedandrecreated.B)Itmustbeexplicitlyassignedtoauser.C)Thevaluesassignedtotheresourcelimitsandpasswordparametersinthedefaultprofilecanbealtered.D)AdifferentDEFAULTprofilecanbecreatedforeachuserinadatabase.答案:C解析:[单选题]47.Youareadministeringadatabaseandyoureceivearequirementtoapplythefollowingrestrictions:1Aconnectionmustbeterminatedafterfourunsuccessfulloginattemptsbyuser.2Ausershouldnotbeabletocreatemorethanfoursimultaneoussessions.3Usersessionmustbeterminatedafter15minutesofinactivity.4Usersmustbepromptedtochangetheirpasswordsevery15days.Howwouldyouaccomplishtheserequirements?A)bygrantingasecureapplicationroletotheusersB)bycreatingandassigningaprofiletotheusersandsettingtheREMOTE_OS_AUTHENTparametertoFALSEC)BycreatingandassigningaprofiletotheusersandsettingtheFAILED_LOGIN_ATTEMPTSparameterto4D)ByImplementingFine-GrainedAuditing(FGA)REMOTE_LOGIN_PASSWORD_FILEparametertoNONE.E)ByimplementingthedatabaseresourceManagerplanandsettingtheSEC_MAX_FAILED_LOGIN_ATTEMPTSparametersto4.答案:C解析:[单选题]48.Inyourdatabase,youwanttoensurethatidlesessionsthatareblockingactiveareautomaticallyterminatedafteraspecifiedperiodoftime.Howwouldyouaccomplishthis?A)SettingametricthresholdB)ImplementingDatabaseResourceManagerC)EnablingresumabletimeoutforusersessionsD)DecreasingthevalueoftheIDLE_TIMEresourcelimitinthedefaultprofile答案:B解析:[单选题]49.YouwanttousetablecompressionsuitableforOLTPthatwill:1CompressrowsforallDMLstatementsonthattable2MinimizetheoverheadsassociatedwithcompressionWhichcompressionoptionisbestsuitedforthis?A)COLUMNSTORECOMPRESSFORQUERYLOWB)ROWSTORECOMPRESSBASICC)COLUMNSTORECOMPRESSFORARCHIVELOWD)COLUMNSTORECOMPRESSFORARCHIVEHIGHE)ROWSTORECOMPRESSADVANCED答案:E解析:[单选题]50.TheEMPLOYEEStablecontainscolumnsEMP_IDofdatatypeNUMBERandHIRE_DATEofdatatypeDATE.YouwanttodisplaythedateofthefirstMondayafterthecompletionofsixmonthssincehiring.TheNLS_TERRITORYparameterissettoAMERICAinthesessionand,therefore,Sundayisthefirstdayonthewee.Whichquerycanbeused?A)SELECTemp_id,ADD_MONTHS(hire_date,6),NEXT_DAY(?MONDAY?)FROMemployees;B)SELECTemp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),?MONDAY?)FROMemployees;C)SELECTemp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6)FROMemployees;D)SELECTemp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1)FROMemployees;答案:B解析:[单选题]51.ExaminethedescriptionoftheSALES1table:SALES2isatablewiththesamedescriptionasSALES1.Somesalesdataisduplicatedinbothtables.YouwanttodisplaytherowsfromtheSALES1tablewhicharenot

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论