![oca認證考試042題庫_第1頁](http://file4.renrendoc.com/view11/M00/37/20/wKhkGWd7wHKACV3BAAJTs4em-MA650.jpg)
![oca認證考試042題庫_第2頁](http://file4.renrendoc.com/view11/M00/37/20/wKhkGWd7wHKACV3BAAJTs4em-MA6502.jpg)
![oca認證考試042題庫_第3頁](http://file4.renrendoc.com/view11/M00/37/20/wKhkGWd7wHKACV3BAAJTs4em-MA6503.jpg)
![oca認證考試042題庫_第4頁](http://file4.renrendoc.com/view11/M00/37/20/wKhkGWd7wHKACV3BAAJTs4em-MA6504.jpg)
![oca認證考試042題庫_第5頁](http://file4.renrendoc.com/view11/M00/37/20/wKhkGWd7wHKACV3BAAJTs4em-MA6505.jpg)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1.Whichthreepiecesofinformationareconsideredwhiledecidingthesizeoftheundotablespac
einyourdatabase?(Choosethree.)
A)thesizeofanundoblock
B)thesizeoftheredologfiles
C)undoblocksgeneratedpersecond
D)thesizeofthedatabasebuffercache
E)thevalueoftheUNDO_RETENTIONparameter
答案:ACE
解析:題目說的是決定UNDO表空間大小的三條:這題定性分析就可以了,UNDO表空間是
用來記錄事務(wù)數(shù)據(jù)的.
A.每個UNDO塊的大小
B.不對與redolog無關(guān)
C.每秒生成的UNDO塊的量,這個越大UNDO表空間就要越大
D.與buffercache無關(guān)
E.UNDO_retention:在事務(wù)提交以后,UNDO數(shù)據(jù)為一致性讀還要保留多長時間.當(dāng)然保留時
間越長UNDO表空間就越大.
2.YouexecutedtheSTARTUPMOUNTcommandtostartyourdatabase.Forwhichdatabaseope
rationdoyouneedtostartthedatabaseintheMOUNTstate?
A)renamingthecontrolfiles
B)droppingauserinyourdatabase
C)enablingordisablingredologarchiving
D)droppingatablespaceinyourdatabase
E)re-creatingthecontrolfiles,afteryoulostallthecontrolfilesinyourdatabase
答案:C
解析:數(shù)據(jù)庫啟動順序,首先是nomount-讀取參數(shù)文件,mount--根據(jù)參數(shù)文件打開控制文
件,open4艮據(jù)控制文件打開數(shù)據(jù)文件,打開數(shù)據(jù)庫.所以說在mount階段是可以改變datafil
e和redologfile的名稱的。在mount階段,你可以修改數(shù)據(jù)文件的名字,同時也可以把數(shù)
據(jù)改為歸檔或者非歸檔模式
3.Youwanttocreateanewoptimizeddatabaseforyourtransactionalproductionenvironmentt
obeusedbyafinancialapplication.Whilecreatingthedatabase,youwanttheOraclesoftwaret
otakecareofallbasicsettingstooptimizethedatabaseperformance.Whichmethodwouldyouu
setoachievethisobjective?
A)UsetheCREATEDATABASE.,commandtocreatethedatabasewithOracle-managedfiles.
B)UsetheDatabaseConfigurationAssistant(DBCA)tocreatethedatabasewithOracle-manage
dfiles.
C)UseEnterpriseManagertocreateanewdatabasewiththeOnlineTransactionProcessing(OLT
P)option.
D)UseDatabaseConfigurationAssistant(DBCA)tocreatethedatabasewithTransactionProcess
ingtemplate.
E)UsetheCREATEDATABASE.,commandtocreatethedatabasewithAutomaticStorageMan
agement(ASM)filesystem.
答案:D
解析:thekeyofthisquestionistransactionalproductionenvironment(交易生產(chǎn)環(huán)境)Ilseemst
omethatOLTP(on-linetrasactionproduction)isneeded.So,youmustcreatetheOLTPdb.Answ
erA/B/Edoesnotmeettherequirementofthequestion.AnswerCiswrong.OEMcan'tcreatedb.
4.Whichthreestatementsaretrueaboutthestagesofdatabasestartup?(Choosethree.)
A)DatafilesandredologfilescanberenamedattheMOUNTstage.
B)ControlfilesarereadattheOPENstageforthelocationofdatafiles.
C)ControlfilesarerequiredtobringthedatabasetotheNOMOUNTstage.
D)DatafilesandredologfilesaremadeavailabletousersattheOPENstage.
E)Datafilesandonlineredologfilesarecheckedforconsistencywhileopeningthedatabase(一
致性檢查)
答案:ADE
解析:數(shù)據(jù)庫開啟和關(guān)閉詳解
5.AconstraintinatableisdefinedwiththeINITIALLYIMMEDIATEclause.Youexecutedth
eALTERTABLEcommandwiththeENABLEVALIDATEoptiontoenabletheconstrainttha
twasdisabled.
Whatarethetwoeffectsofthiscommand?(Choosetwo.)
A)Itfailsifanyexistingrowviolatestheconstraint.
B)Itdoesnotvalidatetheexistingdatainthetable.
C)Itenablestheconstrainttobeenforcedattheendofeachtransaction.
D)Itpreventsinsert,update,anddeleteoperationsonthetablewhiletheconstraintisintheproces
sofbeingenabled.
答案:AD
解析:約束狀態(tài)一約束一共有四種狀態(tài)
a、enablevalidate-要求新舊數(shù)據(jù)必須同時滿足約束規(guī)則-在規(guī)則正在進行中時是不容許在
表上進行任何DML操作的
b、enablenovalidate-已存在數(shù)據(jù)可以不滿足,但是新數(shù)據(jù)必須滿足
c、disablevalidate-不容許在表上進行任何DML操作,對主鍵和唯一約束來說,會刪除相
應(yīng)的唯一索引,但約束規(guī)則仍然有效
d、disablenovalidate-數(shù)據(jù)不滿足約束規(guī)則,對主鍵和唯一約束來說,會刪除相應(yīng)的唯一
索引
初始化立即執(zhí)行一在每條語句執(zhí)行結(jié)束時檢驗約束
初始化延遲執(zhí)行,一直等到事務(wù)完成后(或者調(diào)用setconstraintimmediate語句時)才檢
驗約束
SQL>createtablet(xintconstraintcheck.xcheck(x>0)deferrableinitiallyimme
diate,
yintconstraintcheck.ycheck(y>0)deferrableinitiallydeferred)SQL>insertin
totvalues(-1,1);
insertintotvalues(-1,1);OERRORat1ine1:ORA-02290:checkconstraint(0PS$TKYTE.
CHECK-X)violated
由于CHECK-X是可延遲但初始化為立即執(zhí)行的約束,所以這一行立刻被拒絕了。而CHECK.Y
則不同,它不僅是可延遲的,而且初始化為延遲執(zhí)行,這就意味著直到我用COMMIT命令提
交事務(wù)或?qū)⒓s束狀態(tài)設(shè)置為立即執(zhí)行時才檢驗約束。
SQL>insertintotvalues(1,-1);現(xiàn)在它是成功的(總之到目前為止是成功的)。我將約
束檢驗延遲到了執(zhí)行COMMIT的時候:
SQL>commit;
OERRORat1ine1:ORA-02091:transactionrolledback
ORA-02290:checkconstraint(OPSSTKYTE.CHECK-Y)violated
此時數(shù)據(jù)庫將事務(wù)回滾,因為違反約束導(dǎo)致了COMMIT語句的失敗。這些語句說明了初
始化立即執(zhí)行與初始化延遲執(zhí)行約束之間的區(qū)別。initially(初始化)部分指定Oracle
什么時候會進行默認的約束檢驗一是在語句結(jié)束時[immediate(立即執(zhí)行)],還是在事
務(wù)結(jié)束時[deferred(延遲執(zhí)行)]。我還要說明deferred(可延遲)子句有什么用。我
可以發(fā)出命令,讓所有可延遲的約束變?yōu)檠舆t執(zhí)行的。注意,你也可以對一個約束使用該命
令,你不必讓所有可延遲的約束都變?yōu)檠舆t執(zhí)行的:
SQL>setconstraintsal1deferred;或者SQL>setconstraintsa11immediate;
延遲約束有哪些實際用處呢?有很多。它主要用于物化視圖(快照)。這些視圖會使用延
遲約束來進行視圖刷新。在刷新物化視圖的過程中,可能會破壞完整性,而且將不能逐句檢
驗約束.但到執(zhí)行COMMIT時,數(shù)據(jù)完整性就沒問題了,而且能滿足約束。沒有延遲約束,
物化視圖的約束可能會使刷新過程不能成功進行。使用延遲約束的另一個普遍原因是,當(dāng)預(yù)
測是否需要更新父/子關(guān)系中的主鍵時,它有助于級聯(lián)更新。如果你將外鍵設(shè)為可延遲、但
初始化為立即執(zhí)行,那么你就可以將所有約束設(shè)置為可延遲。將父鍵更新為一個新值一至
此子關(guān)系的完整性約束不會被驗證。將子外鍵更新為這個新值.COMMIT-只要所有受更新
影響的子記錄都指向現(xiàn)有的父記錄,這條命令就能成功執(zhí)行。
6.YoureceivedcomplaintsaboutthedegradationofSQLqueryperformance.Youidentifiedto
pSQLqueriesthatconsumetime.Whatwouldbeyournextsteptofindoutrecommendationsabo
utstatisticscollectionandrestnacturingoftheSQLstatementtoimprovequeryperformance?
A)runSegmentAdvisor
B)runSQLTuningAdvisorontopSQLstatements
C)runtheAutomaticWorkloadRepository(AWR)report
D)runtheAutomaticDatabaseDiagnosticMonitor(ADDM)ontopSQLstatements
答案:B
解析:當(dāng)你發(fā)現(xiàn)sql執(zhí)行慢等sql問題時,你使用topsql發(fā)現(xiàn)耗費時間的sql語句。這是
你需要使用SQLTuningAdvisor推薦數(shù)據(jù)收集和重建sql語句。可以使用SQL優(yōu)化指導(dǎo)分
析SQL語句,并獲得性能建議案。通常,會將此指導(dǎo)作為ADDM性能判斷工具來運行。addm:
autodatabasediagonstic(診斷)monitor提供建議
7.TheUNDO-RETENTIONparameterinyourdatabaseissetto1000andundoretentioni
snotguaranteed.
Whichstatementregardingretentionofundodataiscorrect?
A)Undodatabecomesobsoleteafter1,000seconds.
B)Undodatagetsrefreshedafterevery1,000seconds.
C)Undodatawillbestoredpermanentlyafter1,000seconds.
D)Committedundodatawouldberetainedfor1,000secondsiffreeundospaceisavail
able.
E)Undodatawi11beretainedintheUNDOtablespacefor1,000seconds,thenitgetsmo
vedtotheTEMPORARYtablespacetoprovidereadconsistency.
答案:D
M■析:UNDO_RETENTION=1000sundoretentionisnotguaranteedCommitted的undo垂攵據(jù)會
在undo表空間中保留1000s,只要undo表空間有空閑undo表空間夠用
8.ViewtheExhibit.
KMC
N1VTO?K
ENKULAS
CMXCACO
BOSTrW
?
巴
皿JiE
He
一
一
一
-L-彎
一n-
3u式s
宗ac
葩u
AI.
黑s
工
樣::
s空
玉
話&
KJsl君K
sas>
c"
Whichstatementregardingthedeptandemptablesistrue?
A)Whenyoudeletearowfromtheemptable,youwouldreceiveaconstraintviolationerror.
B)Whenyoudeletearowfromthedepttable,youwouldreceiveaconstraintviolationerror.
C)Whenyoudeletearowfromtheemptable,automaticallythecorrespondingrowsaredeletedfr
omthedepttable.
D)Whenyoudeletearowfromthedepttable,automaticallythecorrespondingrowsaredeletedfr
omtheemptable.
E)Whenyoudeletearowfromthedepttable,automaticallythecorrespondingrowsareupdate
dwithnullvaluesintheemptable.
F)Whenyoudeletearowfromtheemptable,automaticallythecorrespondingrowsareupdate
dwithnullvaluesinthedepttable.
答案:D
解析:ondeletecascade級聯(lián)刪除主表dept刪除一條記錄,則emp表相關(guān)聯(lián)的記錄也被刪
除
9.Whichthreestatementsarecorrectabouttemporarytables?(Choosethree.)
A)Indexesandviewscanbecreatedontemporarytables.
B)Boththedataandthestructureoftemporarytablescanbeexported.
C)Temporarytablesarealwayscreatedinauser*stemporarytablespace.
D)Thedatainsertedintoatemporarytableinasessionisavailabletoothersessions.
E)Datamanipulationlanguage(DML)locksareneveracquiredonthedataoftemporarytables.
答案:ACE
解析:可以對臨時表創(chuàng)建索引,視圖,觸發(fā)器,可以用export和import工具導(dǎo)入導(dǎo)出表的
定義,但是不能導(dǎo)出數(shù)據(jù)。表的定義對所有的會話可見。建立在臨時表上的索引也是臨時的,
也是只對當(dāng)前會話或者事務(wù)有效.盡管對臨時表的DML操作速度比較快,但同樣也是要產(chǎn)
生Red。Log。D,E都一個道理,不存在并發(fā),就不存在鎖,每個人看到的都是自己的東西。臨
時表的數(shù)據(jù)只在一個transaction或session中有效,對數(shù)據(jù)操作不需要DML鎖、速度快,
對臨時表可以創(chuàng)建索引、視圖、觸發(fā)器。一個用戶的臨時表就放在當(dāng)前用戶的臨時表空間
中,創(chuàng)建臨時表后并不產(chǎn)生任何segments分配,與普通表不同。
10.WhichstatementregardingthecontentsoftheV$PARAMETERviewistine?
A)displaysonlythelistofdefaultvalues
B)displaysonlythelistofallbasicparameters
C)displaysthecurrentlyineffectparametervalues
D)displaysonlythelistofalladvancedparameters
E)displaysthelistofalltheparameterfilesofadatabase
F)displaysthecurrentcontentsoftheserverparameterfile
答案:C
解析:V$PARAMETER只是顯示現(xiàn)在起作用的參數(shù)(currentlyineffectparametervalues)
11.Accordingtoyourbackupstrategy,youperformedanincrementallevel0backupofyourdata
base.Which
statementregardingthisbackupistrue?
A)Thebackupissimilartoimagecopy.
B)Thebackupcontainsalluseddatablocks.
C)Thebackupcontainsonlyunuseddatablocks.
D)Thebackupcontainsalldatablockschangedsincethelastincrementallevel1backup.
答案:B
解析:備份分為完全備份和增量備份
完全備份:創(chuàng)建所備份的文件中包含數(shù)據(jù)的所有數(shù)據(jù)塊的副本
增量備份:創(chuàng)建一個包含自以前某次備份以來更改過的所有數(shù)據(jù)塊的副本(分為級別0和級
別1兩種)
級別0:等同于完全備份
級別1:
累積備份:備份自上次級別0備份以來的所有更改
差異備份:備份自上次增量備份以來的所有更改(可以采用級別0或級別1)
12.WhichstepdoyouneedtoperformtoenableauserwiththeSYSDBAprivilegetologinasS
YSDBAin
iSQL*Plus?
A)Theusermustbegrantedthedatabaseadministrator(DBA)privilege.
B)Theusermustbelistedinthepasswordfilefortheauthentication.
C)NospecialsetupisneededfortheusertoconnectasSYSDBAiniSQL*Plus.
D)SetupauserintheOracleApplicationServerContainersforJ2EE(OC4J)usermanager,andg
rantthewebDba
roletotheuser
答案:D
解析:isqhplus不能登錄DBA身份,按D的步驟所做就可以了
13.Becauseofapoweroutage,instancefailurehasoccurred.Fromwhatpointintheredologdoe
srecovery
beginandwheredoesitend?
A)currentredologandinactiveredolog
B)checkpointpositiontoendofredolog
C)beginningofredologtoendofredolog
D)allredologsbeforethepointoflastcommit
E)beginningofredologtocheckpointposition
答案:B
解析:Checkpoint之前的數(shù)據(jù)已經(jīng)寫入到數(shù)據(jù)文件。所以用restore就可以恢復(fù)。而che
ckpoint之后的數(shù)據(jù)沒有寫入到數(shù)據(jù)文件,所以需要進行recovery。Recovery時,對于已
經(jīng)commit的數(shù)據(jù),前滾寫入到數(shù)據(jù)文件,沒有conrniit的數(shù)據(jù),進行回滾。
Oracle數(shù)據(jù)庫中,對BUFFERCAHCE的修改操作是前臺進程完成的,但是前臺進程只負責(zé)
將數(shù)據(jù)塊從數(shù)據(jù)文件中讀到BUFFERCACHE中,不負責(zé)BUFFERCACHE寫入數(shù)據(jù)文件。BUFFERC
ACHE寫入數(shù)據(jù)文件的操作是由后臺進程DBWR來完成的。DBWR可以根據(jù)系統(tǒng)的負載情況以及
數(shù)據(jù)塊是否被其他進程使用來將一部分數(shù)據(jù)塊回寫到數(shù)據(jù)文件中。這種機制下,某個數(shù)據(jù)塊
被寫回文件的時間可能具有一定的隨機性的,有些先修改的數(shù)據(jù)塊可能比較晚才被寫入數(shù)據(jù)
文件。而CHECKPOINT機制就是對這個機制的一個有效的補充,CHECKPOINT發(fā)生的時候,CK
PT進程會要求DBWR進程將某個SCN以前的所有被修改的塊都被寫回數(shù)據(jù)文件。這樣一旦這
次CHECKPOINT完成后,這個SCN前的所有數(shù)據(jù)變更都已經(jīng)存盤,如果之后發(fā)生了實例故障,
那么做實例恢復(fù)的時候,只需要從這次CHECKPOINT已經(jīng)完成后的變化量開始就行了,CHEC
KP0INT之前的變化就不需要再去考慮了。
Commit僅僅寫日志文件,而不寫數(shù)據(jù)文件
14.WhichtwostatementsaretrueregardingthedatabaseinARCHIVELOGmode?(Choos
etwo.)
A)Youhavetoshutdownthedatabasetoperformthebackups.
B)Archivinginformationiswrittentothedatafilesandredologfiles.
C)Youcanperformcompletedatabasebackupswithoutclosingthedatabase.
D)OnlineredologfileshavetobemultiplexedbeforeputtingthedatabaseinARCHIVELOGmo
de.
E)AllthepreviousdatabasebackupsbecomeinvalidafteryouconfigurethedatabasetoARCHIV
ELOGmode.
答案:CE
解析:使用archivelogmode可以進行聯(lián)機備份,啟動后使得之前的備份無效
15.UserScotthasupdatedthesalaryofoneoftheemployeesintheEMPLOYEEStablean
dhasnotcommitted
thetransaction.Whatarethetwotypesoflocksthatthisscenariowouldleadto?(Choosetw
o?)
A)nulllockontherowbeingupdated
B)nulllockonthetablecontainingtherow
C)ROWSHARElockfortherowbeingupdated
D)ROWEXCLUSIVElockfortherowbeingupdated
E)sharedrow-exclusivelockfortherowbeingupdated
F)ashareabletablelockforthetablecontainingtherow
G)exclusivetable-levellockforthetablecontainingtherow
答案:DF
解析:D意思是被更新記錄是Exclusivelock(排它鎖),F(xiàn)是sharedtablelock。
16.Younoticethiswarninginthealertlogfile:
ORA-19815:WARNING:db_recovery_file_dest_sizeof3221225472bytesis100.00%use
d,andhas0
remainingbytesavailable.
WhatwouldyoudotoreclaimtheusedspaceintheFlashRecoveryArea?
A)BackuptheFlashRecoveryArea.
B)Increasetheretentiontimeforthefiles.
C)Decreasetheretentiontimeforthefiles.
D)ManuallydeleteallthearchivedlogfilesfromtheFlashRecoveryAreabyusingoperatingsyst
em(OS)commands.
答案:AC
解析:
1.AdddiskspaceandincreaseDB_RECOVERY_FILE_DEST_SIZE.
2.BackupfilestotertiarydeviceusingRMAN.
3.ConsiderchangingRMANretentionpolicy.
4.ConsiderchangingRMANarchivelogdeletionpolicy.
5.DeletefilesfromrecoveryareausingRMAN.
6.將歸檔設(shè)置到其他目錄,修改altersystemsetlog.archive.dest=其他路徑可事先用
showparameterlog.archive.dest查看
Whenyouseethestep3,youwillknowwhyanswerCisright.
如果是歸檔到閃回區(qū)的,你在os上手工刪除后,rman仍然認為是available,rman還是認
為那文件存在,只有執(zhí)行了crosscheck才會將available轉(zhuǎn)成expired,deleteexpired
后,rman就不會覺得那空間還沒占用的
crosscheckarchivelogall;deleteexpiredarchivelogal1;
17.ViewtheExhibitandexaminetheoutput.
Whichstatementdescribestheconclusion?
A!11a
川Tot
RmisaULg二r.「ROMUMf*nkHXPTIrfCTCl
江昕mat口曰gM2雙交通
A)Theusersshouldusebindvariablesinsteadofliteralsinthequery.
B)Thedictionarycacheisconsumingmorespacethanthelibrarycache.
C)ThesharedpoolsizeshouldbeincreasedtoaccommodatetheSQLstatements.
D)PreparingindexesonthetablesusedintheSQLstatementswouldimprovethelibrarycachepe
rformance.
答案:A
解析:查詢了多個單一變量,可以使用綁定變量
18.Whichtwooperationsrequireundodata?(Choosetwo.)
A)committingatransaction
B)rollingbackatransaction
C)recoveringfromfailedtransactions
D)recordingatransactiontoredologfiles
E)rollingforwardduringinstancerecovery
答案:BC
解析:Undo里保存的數(shù)據(jù)前鏡像,即數(shù)據(jù)修改之前,先將原始數(shù)據(jù)保存在undo里。而red
o記錄的是事務(wù)。因為undo含有事務(wù)的數(shù)據(jù),rolIback的時候用到,事務(wù)恢復(fù)也會用到
rollingforwardduringinstancerecovery用的是redo
老白的介質(zhì)恢復(fù)和實例試驗:
對于介質(zhì)恢復(fù)和實例恢復(fù)來說,第一個步驟都是通過REDOLOG的信息進行前滾,在
做前滾的時候,通過REDOLOG文件里記錄的數(shù)據(jù)庫變化矢量(稍后我們會詳細的介紹數(shù)據(jù)
庫變化矢量CV),根據(jù)SCN的比對,提交到相關(guān)的數(shù)據(jù)文件上,從而使數(shù)據(jù)文件的狀態(tài)向
前滾動。大家要注意的是,UNDO表空間的變化也被記錄到REDOLOG里了,因此UNDO表空間
相關(guān)的數(shù)據(jù)文件也會被前滾。當(dāng)前滾到最后一個可用的REDOLOG或者歸檔日志的時候,所
有的數(shù)據(jù)庫恢復(fù)層面的工作就全部完成了。這個時候,數(shù)據(jù)庫包含了所有的被記錄的變化,
這些變化中有些是已經(jīng)提交,有些是
尚未提交的。在最新狀態(tài)的UNDO表空間中,我們也可以看到一些尚未提交的事務(wù)。
因此數(shù)據(jù)庫下一步需要做的事情是事務(wù)層面的處理,回滾那些尚未提交的事務(wù),以確保數(shù)據(jù)
庫的一致性。
首先是在實例故障時,可能某些事物對數(shù)據(jù)文件的修改并沒有完全寫入磁盤,可能磁
盤文件中丟失了某些已經(jīng)提交事務(wù)對數(shù)據(jù)文件的修改信息。其次是可能某些還沒有提交的事
務(wù)對數(shù)據(jù)文件的修改已經(jīng)被寫入磁盤文件了。也有可能某個原子變更的部分數(shù)據(jù)已經(jīng)被寫入
文件,而部分數(shù)據(jù)還沒有被寫入磁盤文件。實例恢復(fù)就是要通過ONLINEREDOLOG文件中記
錄的信息,自動的完成上述數(shù)據(jù)的修復(fù)工作。這個過程是完全自動的,不需要人工干預(yù)。
ora-600說過:實例恢復(fù)的過程就是前滾(redo)打開回滾(undo)
實例恢復(fù):啟動的時候,從某個點把日志文件里內(nèi)容完全寫到數(shù)據(jù)文件,打開,把沒有提交的
rolIback
19.YourdatabaseisconfiguredinNOARCHIVELOGmode.Allthecontrolfileshavebee
nlostduetoahard
diskfailurebutthedatafilesarenotlost.Youhavetheclosedwholedatabasebackupavaila
bletoyou.Which
twostatementsaretrueinthisscenario?(Choosetwo.)
A)Theinstanceaborts.
B)Thedatabasecannotberecovered.
C)Thedatabasecanberecoveredbyrestoringthecontrolfilesfromthebackup.
D)ThedatabaseremainsopenedandyouhavetoshutitdownwiththeABORToption.
E)Thedatabasecanberestoredtillthepointofthelastclosedwholedatabasebackup.
答案:AE
解析:運行于非歸檔模式。所有控制文件丟失。數(shù)據(jù)庫關(guān)閉。只有最近的一次數(shù)據(jù)庫全庫備
份。那么數(shù)據(jù)庫只能恢復(fù)到最后一次備份,盡管數(shù)據(jù)文件并未丟失
20.WhichisthecorrectdescriptionofthesignificanceoftheORACLE_HOMEenvironmen
taivariable?
A)ItspecifiesthedirectorycontainingtheOraclesoftware.
B)ItspecifiesthedirectorycontainingtheOracle-ManagedFiles.
C)Itspecifiesthedirectoryfordatabasefiles,ifnotspecifiedexplicitly.
D)ItspecifiesthebasedirectoryofOptimalFlexibleArchitecture(OFA)
答案:A
解析:ORACLE.HOME=$ORACLE_BASE/product/version
ORACLE-BASE是oracle的根目錄,ORACLE-HOME是oracle產(chǎn)品的目錄。
21.WhilerunningtheOracleUniversalInstalleronaUnixplatformtoinstallOracle
Database10gsoftware,youarepromptedtorunorainstRoot.shscript.Whatdoesthisscrip
taccomplish?
A)Itcreatesthepointerfile.
B)Itcreatesthebasedirectory.
C)ItcreatestheInventorypointerfile.
D)ItcreatestheOracleuserfbrinstallation.
E)ItmodifiestheUnixkernelparameterstomatchOracle*srequirement.
答案:c
解析:Inventory:詳細目錄
可以查看$ORACLE_BASE/oraInventory/orainstRoot.sh腳本的內(nèi)容。該腳本實際上完成了
以下工作:
(1)創(chuàng)建softwareinventorylocationpointerfile:/etc/oralnst.loc,內(nèi)容為
inventory_loc=$ORACLE_BASE/orainventoryinst_group=oinstal1
修改該文件屬性:chmod644/etc/oralnst.loc
(2)創(chuàng)建inventorydirectory:$ORACLE_BASE/oraInventory
修改文件屬性:chmod-R770SORACLE_BASE/oraInventory
chgrpoinstal1$ORACLE_BASE/oraInventory
oralnventory目錄是用來存儲oracle安裝的所有軟件組件的信息的,每個組件可能占用1
50k的空間.
22.YoufindthatthedatabaseperformancedegradeswhileyoubackupthePRODdatabas
eusingRecovery
Manager(RMAN).ThePRODdatabaseisrunninginsharedservermode.Thedatabaseinst
anceiscurrently
using60%oftotaloperatingsystemmemory.Yoususpectthesharedpoolfragmentationt
obethereason.
Whichactionwouldyouconsidertoovercometheperformancedegradation?
A)ConfigureJavaPooltocachethejavaobjects.
B)ConfigureStreamsPooltoenableparallelprocessing.
C)IncreaseSharedPoolsizetocachemorePL/SQLobjects.
D)IncreaseDatabaseBufferCachesizetoincreasecachehits.
E)ConfigureLargePooltobeusedbyRMANandsharedserver.
F)IncreasethetotalSystemGlobalArea(SGA)sizetoincreasememoryhits.
答案:E
解析:使用RMAN備份數(shù)據(jù)庫時,由于在共享服務(wù)器模式下,共享池已經(jīng)不夠用了,所以使
用大池以供RAMN和共享服務(wù)使用。
在磁盤上的備份會使用PGA內(nèi)存空間作為備份緩沖區(qū),PGA內(nèi)存空間從用于通道進程的
內(nèi)存空間中分配。如果操作系統(tǒng)沒有配置本地異步I/O,可以利用DBWR」O_SLAVES參數(shù)使
用I/O從屬來填充內(nèi)存中的輸入緩沖區(qū)。如果設(shè)置DBWR」0_SLAVES參數(shù)為任意的非零值,R
MAN會自動分配4個I/O從屬協(xié)調(diào)輸入緩沖區(qū)內(nèi)存中的數(shù)據(jù)塊加載。為了實現(xiàn)這一功能,RM
AN必須利用一個共享內(nèi)存區(qū)域。因此,用于磁盤備份的內(nèi)存區(qū)會被推入共享池,如果存在1
arge池,則被推入large池。
如果沒有使用磁帶I/O從屬,會在PGA中分配用于磁帶輸出緩沖區(qū)的內(nèi)存。設(shè)置init.
ora參數(shù)BACKUP_TAPE」O_SLAVES=TRUE,可以使用磁帶I/O從屬,必要時還可以在spfile
里動態(tài)修改。該參數(shù)設(shè)為true時,rman會為每個通道創(chuàng)建一個從屬進程來幫助備份工作。
為了協(xié)調(diào)這一功能,RMAN會將內(nèi)存分配推進SGA.
如果配置了任一種I/O從屬選項并且沒有配置large池,則會在SGA的共享池中分配內(nèi)
存。如果沒有配置large池又要使用I/O從屬,建議最好創(chuàng)建一個large池,這個large
池的大小基于為備份分配的通道總數(shù)(加上1MB用于開銷)。
RMAN系列(一)——RMAN體系結(jié)構(gòu)概述
23.YourdatabaseisstartedwithSPFILE.Youwantthedatabaseinstancetobedynamicall
yregisteredwitha
listenerL2withthefollowingdetails:
Protocol:TCP
Host:ind1151e
Port:1525
Whichisthecorrectorderofthestepsthatyouwouldfollowtoachievethis?
1.SettheLOCAL_LISTENERparametertoL2dynamically.
2.MakeanentryforL2intnsnames.oraonthedatabaseserver.
3.RestartL2.
4.Modifythelistener.orafiletoaddtheinstancenameinSID_LISTofL2.
A)1,2,4,3
B)1,2,3;4isnotrequired.
C)2,1;3and4arenotrequired.
D)1,2;3and4arenotrequired.
答案:C
解析:Dynamicallyregister就是不需要修改listener,ora。DBInstance會自動通知1is
tenero
如果在listerer.ora中配置sid.llist,那就是靜態(tài)注冊了,而本題考的是動態(tài)注冊。
一、靜態(tài)注冊
由于靜態(tài)注冊,參數(shù)是手動靜態(tài)添加,與數(shù)據(jù)庫無關(guān)。數(shù)據(jù)庫無法確認監(jiān)聽是否正確配置。
因此,1snrctl中的status顯示狀態(tài)為unkown。即不保證能連通數(shù)據(jù)庫。注意:靜態(tài)注冊
監(jiān)聽,客戶端在配置tnsnames.ora服務(wù)命名時,“(Oracle8i或更高版本)服務(wù)名”里填
寫內(nèi)容要與服務(wù)端靜態(tài)注冊監(jiān)聽器時的全局數(shù)據(jù)庫名一致。否則,無法連通
二、動態(tài)注冊
1、缺省的動態(tài)注冊
pmon在數(shù)據(jù)庫啟動到mount或open時,動態(tài)從參數(shù)文件中讀取service_nanies值。servic
e_names可以為多個值。service-names缺省為dbca建立數(shù)據(jù)庫時的全局數(shù)據(jù)庫名。
注意:不管參數(shù)service-names為何值,pmon都會自動以全局數(shù)據(jù)庫名(這里為mydata.cc
ddt.cn)為服務(wù)名,動態(tài)注冊一個監(jiān)聽。缺省情況下,若啟用動態(tài)注冊監(jiān)聽,端口號必須為
1521.若啟用其他端口的動態(tài)監(jiān)聽注冊,必須要做相關(guān)配置。通過查看v$session,狀態(tài)為
SYSSUSERS的連接為通過靜態(tài)注冊監(jiān)聽連接到服務(wù)器。
2、自定義端口的動態(tài)監(jiān)聽注冊
若要啟用非默認端口1521的動態(tài)監(jiān)聽注冊,缺省狀態(tài),Oracle不會進行動態(tài)注冊。要啟用
動態(tài)注冊,必須設(shè)置local.listener參數(shù)。并在服務(wù)端配置tnsnames.ora指定監(jiān)聽參數(shù),
或者直接通過修改local」istenei?指定監(jiān)聽參數(shù)。步驟如下:
1)服務(wù)端:netmgr,配置監(jiān)聽程序,監(jiān)聽端口為1525(非默認端口),保存配置
2)指定監(jiān)聽參數(shù)
法1:直接通過修改local-listener參數(shù)指定
SQL>altersystemsetLOCAL.LISTENERS(ADDRESS=(PR0T0C0L=TCP)(HOST=192.168.1.23)
(PORT=1525))/;
SQL>altersystemregister
法2:在Oracle服務(wù)器端建立$ORACLE_HOME/network/admin/tnsnames.ora。解析文件,位
置并填入如下內(nèi)容mytest=(DESCRIPTION=(ADDRESS-LIST=(ADDRESS=(PROTOCOL=TCP)(HOS
T=192.168.1.23)(PORT=1525))這里的mytest也可以根據(jù)自己需要,修改為其他字符串。
如a或b等。
設(shè)置參數(shù),指定通過tnsnames.ora內(nèi)的信息指定監(jiān)聽參數(shù)SQL>altersystemsetlocal-1i
stener=mytest;
SQL>altersystemregister;
3、查看監(jiān)聽器狀態(tài)LSNRCTL>status
(warehouse)showparameterlocal-listener
一定要配置服務(wù)端tns讓pmon自動注冊其他端口
al23=
(
(address_1ist=(address=(prottocol=tcp)(host=xys)(port=l522))
)
tnspingal23;tnsping+服務(wù)命名
altersystemsetlocal_1istener=al23;
24.ThejuniorDBAinyourorganizationhasaccidentallydeletedthealertlogfile.Whatwil
youdotocreate
newalertlogfile?
A)CreatethenewtextfilefileasALERT.LOG.
B)Youhavetorecoverthealertlogfilefromthevalidbackup.
C)ChangethevaluefortheBACKGROUND_DUMP_DESTparameter.
D)Noactionrequired.Thefilewouldbecreatedautomaticallybytheinstance.
答案:D
解析:不小心刪除alert文件沒有關(guān)系,數(shù)據(jù)庫會自己自動重建
25.Ausercomplainsthathegetsthefollowingerrormessagerepeatedlyafterexecutingsom
eSQL
statements.Theerrormessageforcestheusertologofffromandlogontothedatabasetoco
ntinuehiswork.
ORA-02392:exceededsessionlimitonCPUusage,youarebeingloggedoff
WhichactionwouldyoutaketoincreasethesessionlimitonCPUusage?
A)Modifytheprofileassignedtotheuser.
B)Modifytherolesassignedtotheusers.
C)Modifytheobjectprivilegesassignedtotheuser.
D)Modifythesystemprivilegesassignedtotheusers.
E)ModifythevaluefortheRESOURCE_LIMITparameterintheparameterfile.
答案:A
解析:一個用戶執(zhí)行sql語句報錯ORA-02393:exceededcal1limitonCPUusage這時候可
以在該用戶的profile里修給recourselimits
當(dāng)需要設(shè)置資源限制時,必須設(shè)置數(shù)據(jù)庫系統(tǒng)啟動參數(shù)RESOURCE_LIMIT,此參數(shù)默認值為F
ALSE可以使用如下命令來啟動當(dāng)前資源限制:altersystemsetRESOURCE_LIMIT=true;
26.WhilesettingupanOracledatabaseforoneofyourcriticalapplications,youwanttoens
urethatthe
databaseisbackedupatregularintervalswithoutyourintervention.Whatshouldyoudot
oachievethe
objective?
A)configurethedatabasetoruninARCHIVELOGmode
B)configuretheFlashRecoveryAreatoenableautomaticdatabasebackup
C)schedulethedatabasebackupusingDBMS_JOBpackageaftercreatingthedatabase
D)schedulethedatabasebackupusingRecoveryManager(RMAN)commandsaftercreatingth
edatabase
E)schedulethedatabasebackupusingDatabaseConfigurationAssistant(DBCA)whilecreatingt
hedatabase
答案:E
解析:在創(chuàng)建數(shù)據(jù)庫的時候有個選項是來創(chuàng)建數(shù)據(jù)庫備份的
27.WhichtwostatementsaboutFlashbackQueryaretrue?(Choosetwo.)
A)Itisgeneratedbyusingtheredologfiles.
B)Ithelpsinrow-levelrecoveryfromusererrors.
C)ItcanbeperformedtorecoverALTERTABLEstatements
D)Itfailswhenundodatapertainingtothetransactionisoverwritten.
E)ThedatabasehastobeopenedwiththeresetlogsoptionafterperformingFlashbackQuery.
答案:BD
解析:FlashbackQuery可以幫助用戶解決行級別的錯誤。是根據(jù)undodata來閃回的,und
oretention=900s,這要看有沒有retentionguarantee,如果有,15分鐘內(nèi)不會被覆蓋。如
果沒有打開,那得看UNTO有沒有可用空間,如果沒有就會被覆蓋
Flashbackdatabase相當(dāng)一次不完全恢復(fù),此時必需alterdatabaseopenresetlog
s;即截斷多余的sen,本質(zhì)還是selectfile#,checkpoint.change#fromv$datafile;
selectfile#,checkpoint-change#fromv$datafile.header,兩個結(jié)果不一致造成的.
10g支持穿越resetlogs了,即用當(dāng)前數(shù)據(jù)庫的控制文件(resetlog后的控制文件)加上
resetlog之前數(shù)據(jù)文件的備份,其實只要sen連續(xù)就行
但一旦resetlogs后,無法再flashback到之前的時間點了
28.Asaresultofperformanceanalysis,youcreatedanindexontheprod_namecolumnoft
heprod_dettable,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年企業(yè)市場營銷宣傳協(xié)議
- 2025年傳統(tǒng)工藝振興戰(zhàn)略諒解協(xié)議
- 2025年中學(xué)食品安全監(jiān)管協(xié)議
- 2025年公共環(huán)境策劃改善協(xié)議
- 2025年導(dǎo)師學(xué)員攜手共進協(xié)議書
- 2025年度股權(quán)合伙財產(chǎn)分割協(xié)議范例
- 江蘇省2025年土地使用權(quán)互換合同
- 2025年臨時辦公設(shè)施租賃合同
- 2025年企業(yè)股權(quán)融資協(xié)議書規(guī)范文本
- 2025年商業(yè)地產(chǎn)合作協(xié)議標(biāo)準(zhǔn)版
- 門診診所運行管理制度
- 湖南省懷化市2024-2025學(xué)年九年級上學(xué)期期末化學(xué)試題(含答案)
- “5E”教學(xué)模式下高中數(shù)學(xué)教學(xué)實踐研究
- 《醫(yī)學(xué)影像檢查技術(shù)學(xué)》課件-踝X線攝影
- 急救藥品知識培訓(xùn)內(nèi)容
- 電工基礎(chǔ)知識(全套)
- 體育館施工圖設(shè)計合同
- 2025年福建省漳州臺商投資區(qū)招聘非占編人員歷年高頻重點提升(共500題)附帶答案詳解
- 四川省成都市成華區(qū)2024年中考語文二模試卷附參考答案
- 《西蘭花全程質(zhì)量安全控制技術(shù)規(guī)范》
- 2025年臨床醫(yī)師定期考核試題中醫(yī)知識復(fù)習(xí)題庫及答案(200題)
評論
0/150
提交評論