版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1.Whichthreepiecesofinformationareconsideredwhiledecidingthesizeoftheundotablespac
einyourdatabase?(Choosethree.)
A)thesizeofanundoblock
B)thesizeoftheredologfiles
C)undoblocksgeneratedpersecond
D)thesizeofthedatabasebuffercache
E)thevalueoftheUNDO_RETENTIONparameter
答案:ACE
解析:題目說(shuō)的是決定UNDO表空間大小的三條:這題定性分析就可以了,UNDO表空間是
用來(lái)記錄事務(wù)數(shù)據(jù)的.
A.每個(gè)UNDO塊的大小
B.不對(duì)與redolog無(wú)關(guān)
C.每秒生成的UNDO塊的量,這個(gè)越大UNDO表空間就要越大
D.與buffercache無(wú)關(guān)
E.UNDO_retention:在事務(wù)提交以后,UNDO數(shù)據(jù)為一致性讀還要保留多長(zhǎng)時(shí)間.當(dāng)然保留時(shí)
間越長(zhǎng)UNDO表空間就越大.
2.YouexecutedtheSTARTUPMOUNTcommandtostartyourdatabase.Forwhichdatabaseope
rationdoyouneedtostartthedatabaseintheMOUNTstate?
A)renamingthecontrolfiles
B)droppingauserinyourdatabase
C)enablingordisablingredologarchiving
D)droppingatablespaceinyourdatabase
E)re-creatingthecontrolfiles,afteryoulostallthecontrolfilesinyourdatabase
答案:C
解析:數(shù)據(jù)庫(kù)啟動(dòng)順序,首先是nomount-讀取參數(shù)文件,mount--根據(jù)參數(shù)文件打開(kāi)控制文
件,open4艮據(jù)控制文件打開(kāi)數(shù)據(jù)文件,打開(kāi)數(shù)據(jù)庫(kù).所以說(shuō)在mount階段是可以改變datafil
e和redologfile的名稱的。在mount階段,你可以修改數(shù)據(jù)文件的名字,同時(shí)也可以把數(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ù)庫(kù)開(kāi)啟和關(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ù)必須同時(shí)滿足約束規(guī)則-在規(guī)則正在進(jìn)行中時(shí)是不容許在
表上進(jìn)行任何DML操作的
b、enablenovalidate-已存在數(shù)據(jù)可以不滿足,但是新數(shù)據(jù)必須滿足
c、disablevalidate-不容許在表上進(jìn)行任何DML操作,對(duì)主鍵和唯一約束來(lái)說(shuō),會(huì)刪除相
應(yīng)的唯一索引,但約束規(guī)則仍然有效
d、disablenovalidate-數(shù)據(jù)不滿足約束規(guī)則,對(duì)主鍵和唯一約束來(lái)說(shuō),會(huì)刪除相應(yīng)的唯一
索引
初始化立即執(zhí)行一在每條語(yǔ)句執(zhí)行結(jié)束時(shí)檢驗(yàn)約束
初始化延遲執(zhí)行,一直等到事務(wù)完成后(或者調(diào)用setconstraintimmediate語(yǔ)句時(shí))才檢
驗(yàn)約束
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í)行時(shí)才檢驗(yàn)約束。
SQL>insertintotvalues(1,-1);現(xiàn)在它是成功的(總之到目前為止是成功的)。我將約
束檢驗(yàn)延遲到了執(zhí)行COMMIT的時(shí)候:
SQL>commit;
OERRORat1ine1:ORA-02091:transactionrolledback
ORA-02290:checkconstraint(OPSSTKYTE.CHECK-Y)violated
此時(shí)數(shù)據(jù)庫(kù)將事務(wù)回滾,因?yàn)檫`反約束導(dǎo)致了COMMIT語(yǔ)句的失敗。這些語(yǔ)句說(shuō)明了初
始化立即執(zhí)行與初始化延遲執(zhí)行約束之間的區(qū)別。initially(初始化)部分指定Oracle
什么時(shí)候會(huì)進(jìn)行默認(rèn)的約束檢驗(yàn)一是在語(yǔ)句結(jié)束時(shí)[immediate(立即執(zhí)行)],還是在事
務(wù)結(jié)束時(shí)[deferred(延遲執(zhí)行)]。我還要說(shuō)明deferred(可延遲)子句有什么用。我
可以發(fā)出命令,讓所有可延遲的約束變?yōu)檠舆t執(zhí)行的。注意,你也可以對(duì)一個(gè)約束使用該命
令,你不必讓所有可延遲的約束都變?yōu)檠舆t執(zhí)行的:
SQL>setconstraintsal1deferred;或者SQL>setconstraintsa11immediate;
延遲約束有哪些實(shí)際用處呢?有很多。它主要用于物化視圖(快照)。這些視圖會(huì)使用延
遲約束來(lái)進(jìn)行視圖刷新。在刷新物化視圖的過(guò)程中,可能會(huì)破壞完整性,而且將不能逐句檢
驗(yàn)約束.但到執(zhí)行COMMIT時(shí),數(shù)據(jù)完整性就沒(méi)問(wèn)題了,而且能滿足約束。沒(méi)有延遲約束,
物化視圖的約束可能會(huì)使刷新過(guò)程不能成功進(jìn)行。使用延遲約束的另一個(gè)普遍原因是,當(dāng)預(yù)
測(cè)是否需要更新父/子關(guān)系中的主鍵時(shí),它有助于級(jí)聯(lián)更新。如果你將外鍵設(shè)為可延遲、但
初始化為立即執(zhí)行,那么你就可以將所有約束設(shè)置為可延遲。將父鍵更新為一個(gè)新值一至
此子關(guān)系的完整性約束不會(huì)被驗(yàn)證。將子外鍵更新為這個(gè)新值.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問(wèn)題時(shí),你使用topsql發(fā)現(xiàn)耗費(fèi)時(shí)間的sql語(yǔ)句。這是
你需要使用SQLTuningAdvisor推薦數(shù)據(jù)收集和重建sql語(yǔ)句。可以使用SQL優(yōu)化指導(dǎo)分
析SQL語(yǔ)句,并獲得性能建議案。通常,會(huì)將此指導(dǎo)作為ADDM性能判斷工具來(lái)運(yùn)行。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ù)會(huì)
在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級(jí)聯(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
解析:可以對(duì)臨時(shí)表創(chuàng)建索引,視圖,觸發(fā)器,可以用export和import工具導(dǎo)入導(dǎo)出表的
定義,但是不能導(dǎo)出數(shù)據(jù)。表的定義對(duì)所有的會(huì)話可見(jiàn)。建立在臨時(shí)表上的索引也是臨時(shí)的,
也是只對(duì)當(dāng)前會(huì)話或者事務(wù)有效.盡管對(duì)臨時(shí)表的DML操作速度比較快,但同樣也是要產(chǎn)
生Red。Log。D,E都一個(gè)道理,不存在并發(fā),就不存在鎖,每個(gè)人看到的都是自己的東西。臨
時(shí)表的數(shù)據(jù)只在一個(gè)transaction或session中有效,對(duì)數(shù)據(jù)操作不需要DML鎖、速度快,
對(duì)臨時(shí)表可以創(chuàng)建索引、視圖、觸發(fā)器。一個(gè)用戶的臨時(shí)表就放在當(dāng)前用戶的臨時(shí)表空間
中,創(chuàng)建臨時(shí)表后并不產(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)建一個(gè)包含自以前某次備份以來(lái)更改過(guò)的所有數(shù)據(jù)塊的副本(分為級(jí)別0和級(jí)
別1兩種)
級(jí)別0:等同于完全備份
級(jí)別1:
累積備份:備份自上次級(jí)別0備份以來(lái)的所有更改
差異備份:備份自上次增量備份以來(lái)的所有更改(可以采用級(jí)別0或級(jí)別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)寫(xiě)入到數(shù)據(jù)文件。所以用restore就可以恢復(fù)。而che
ckpoint之后的數(shù)據(jù)沒(méi)有寫(xiě)入到數(shù)據(jù)文件,所以需要進(jìn)行recovery。Recovery時(shí),對(duì)于已
經(jīng)commit的數(shù)據(jù),前滾寫(xiě)入到數(shù)據(jù)文件,沒(méi)有conrniit的數(shù)據(jù),進(jìn)行回滾。
Oracle數(shù)據(jù)庫(kù)中,對(duì)BUFFERCAHCE的修改操作是前臺(tái)進(jìn)程完成的,但是前臺(tái)進(jìn)程只負(fù)責(zé)
將數(shù)據(jù)塊從數(shù)據(jù)文件中讀到BUFFERCACHE中,不負(fù)責(zé)BUFFERCACHE寫(xiě)入數(shù)據(jù)文件。BUFFERC
ACHE寫(xiě)入數(shù)據(jù)文件的操作是由后臺(tái)進(jìn)程DBWR來(lái)完成的。DBWR可以根據(jù)系統(tǒng)的負(fù)載情況以及
數(shù)據(jù)塊是否被其他進(jìn)程使用來(lái)將一部分?jǐn)?shù)據(jù)塊回寫(xiě)到數(shù)據(jù)文件中。這種機(jī)制下,某個(gè)數(shù)據(jù)塊
被寫(xiě)回文件的時(shí)間可能具有一定的隨機(jī)性的,有些先修改的數(shù)據(jù)塊可能比較晚才被寫(xiě)入數(shù)據(jù)
文件。而CHECKPOINT機(jī)制就是對(duì)這個(gè)機(jī)制的一個(gè)有效的補(bǔ)充,CHECKPOINT發(fā)生的時(shí)候,CK
PT進(jìn)程會(huì)要求DBWR進(jìn)程將某個(gè)SCN以前的所有被修改的塊都被寫(xiě)回?cái)?shù)據(jù)文件。這樣一旦這
次CHECKPOINT完成后,這個(gè)SCN前的所有數(shù)據(jù)變更都已經(jīng)存盤,如果之后發(fā)生了實(shí)例故障,
那么做實(shí)例恢復(fù)的時(shí)候,只需要從這次CHECKPOINT已經(jīng)完成后的變化量開(kāi)始就行了,CHEC
KP0INT之前的變化就不需要再去考慮了。
Commit僅僅寫(xiě)日志文件,而不寫(xiě)數(shù)據(jù)文件
14.WhichtwostatementsaretrueregardingthedatabaseinARCHIVELOGmode?(Choos
etwo.)
A)Youhavetoshutdownthedatabasetoperformthebackups.
B)Archivinginformationiswrittentothedatafilesandredologfiles.
C)Youcanperformcompletedatabasebackupswithoutclosingthedatabase.
D)OnlineredologfileshavetobemultiplexedbeforeputtingthedatabaseinARCHIVELOGmo
de.
E)AllthepreviousdatabasebackupsbecomeinvalidafteryouconfigurethedatabasetoARCHIV
ELOGmode.
答案:CE
解析:使用archivelogmode可以進(jìn)行聯(lián)機(jī)備份,啟動(dòng)后使得之前的備份無(wú)效
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仍然認(rèn)為是available,rman還是認(rèn)
為那文件存在,只有執(zhí)行了crosscheck才會(huì)將available轉(zhuǎn)成expired,deleteexpired
后,rman就不會(huì)覺(jué)得那空間還沒(méi)占用的
crosscheckarchivelogall;deleteexpiredarchivelogal1;
17.ViewtheExhibitandexaminetheoutput.
Whichstatementdescribestheconclusion?
A!11a
川Tot
RmisaULg二r.「ROMUMf*nkHXPTIrfCTCl
江昕mat口曰gM2雙交通
A)Theusersshouldusebindvariablesinsteadofliteralsinthequery.
B)Thedictionarycacheisconsumingmorespacethanthelibrarycache.
C)ThesharedpoolsizeshouldbeincreasedtoaccommodatetheSQLstatements.
D)PreparingindexesonthetablesusedintheSQLstatementswouldimprovethelibrarycachepe
rformance.
答案:A
解析:查詢了多個(gè)單一變量,可以使用綁定變量
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ù)。因?yàn)閡ndo含有事務(wù)的數(shù)據(jù),rolIback的時(shí)候用到,事務(wù)恢復(fù)也會(huì)用到
rollingforwardduringinstancerecovery用的是redo
老白的介質(zhì)恢復(fù)和實(shí)例試驗(yàn):
對(duì)于介質(zhì)恢復(fù)和實(shí)例恢復(fù)來(lái)說(shuō),第一個(gè)步驟都是通過(guò)REDOLOG的信息進(jìn)行前滾,在
做前滾的時(shí)候,通過(guò)REDOLOG文件里記錄的數(shù)據(jù)庫(kù)變化矢量(稍后我們會(huì)詳細(xì)的介紹數(shù)據(jù)
庫(kù)變化矢量CV),根據(jù)SCN的比對(duì),提交到相關(guān)的數(shù)據(jù)文件上,從而使數(shù)據(jù)文件的狀態(tài)向
前滾動(dòng)。大家要注意的是,UNDO表空間的變化也被記錄到REDOLOG里了,因此UNDO表空間
相關(guān)的數(shù)據(jù)文件也會(huì)被前滾。當(dāng)前滾到最后一個(gè)可用的REDOLOG或者歸檔日志的時(shí)候,所
有的數(shù)據(jù)庫(kù)恢復(fù)層面的工作就全部完成了。這個(gè)時(shí)候,數(shù)據(jù)庫(kù)包含了所有的被記錄的變化,
這些變化中有些是已經(jīng)提交,有些是
尚未提交的。在最新?tīng)顟B(tài)的UNDO表空間中,我們也可以看到一些尚未提交的事務(wù)。
因此數(shù)據(jù)庫(kù)下一步需要做的事情是事務(wù)層面的處理,回滾那些尚未提交的事務(wù),以確保數(shù)據(jù)
庫(kù)的一致性。
首先是在實(shí)例故障時(shí),可能某些事物對(duì)數(shù)據(jù)文件的修改并沒(méi)有完全寫(xiě)入磁盤,可能磁
盤文件中丟失了某些已經(jīng)提交事務(wù)對(duì)數(shù)據(jù)文件的修改信息。其次是可能某些還沒(méi)有提交的事
務(wù)對(duì)數(shù)據(jù)文件的修改已經(jīng)被寫(xiě)入磁盤文件了。也有可能某個(gè)原子變更的部分?jǐn)?shù)據(jù)已經(jīng)被寫(xiě)入
文件,而部分?jǐn)?shù)據(jù)還沒(méi)有被寫(xiě)入磁盤文件。實(shí)例恢復(fù)就是要通過(guò)ONLINEREDOLOG文件中記
錄的信息,自動(dòng)的完成上述數(shù)據(jù)的修復(fù)工作。這個(gè)過(guò)程是完全自動(dòng)的,不需要人工干預(yù)。
ora-600說(shuō)過(guò):實(shí)例恢復(fù)的過(guò)程就是前滾(redo)打開(kāi)回滾(undo)
實(shí)例恢復(fù):?jiǎn)?dòng)的時(shí)候,從某個(gè)點(diǎn)把日志文件里內(nèi)容完全寫(xiě)到數(shù)據(jù)文件,打開(kāi),把沒(méi)有提交的
rolIback
19.YourdatabaseisconfiguredinNOARCHIVELOGmode.Allthecontrolfileshavebee
nlostduetoahard
diskfailurebutthedatafilesarenotlost.Youhavetheclosedwholedatabasebackupavaila
bletoyou.Which
twostatementsaretrueinthisscenario?(Choosetwo.)
A)Theinstanceaborts.
B)Thedatabasecannotberecovered.
C)Thedatabasecanberecoveredbyrestoringthecontrolfilesfromthebackup.
D)ThedatabaseremainsopenedandyouhavetoshutitdownwiththeABORToption.
E)Thedatabasecanberestoredtillthepointofthelastclosedwholedatabasebackup.
答案:AE
解析:運(yùn)行于非歸檔模式。所有控制文件丟失。數(shù)據(jù)庫(kù)關(guān)閉。只有最近的一次數(shù)據(jù)庫(kù)全庫(kù)備
份。那么數(shù)據(jù)庫(kù)只能恢復(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:詳細(xì)目錄
可以查看$ORACLE_BASE/oraInventory/orainstRoot.sh腳本的內(nèi)容。該腳本實(shí)際上完成了
以下工作:
(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目錄是用來(lái)存儲(chǔ)oracle安裝的所有軟件組件的信息的,每個(gè)組件可能占用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ù)庫(kù)時(shí),由于在共享服務(wù)器模式下,共享池已經(jīng)不夠用了,所以使
用大池以供RAMN和共享服務(wù)使用。
在磁盤上的備份會(huì)使用PGA內(nèi)存空間作為備份緩沖區(qū),PGA內(nèi)存空間從用于通道進(jìn)程的
內(nèi)存空間中分配。如果操作系統(tǒng)沒(méi)有配置本地異步I/O,可以利用DBWR」O_SLAVES參數(shù)使
用I/O從屬來(lái)填充內(nèi)存中的輸入緩沖區(qū)。如果設(shè)置DBWR」0_SLAVES參數(shù)為任意的非零值,R
MAN會(huì)自動(dòng)分配4個(gè)I/O從屬協(xié)調(diào)輸入緩沖區(qū)內(nèi)存中的數(shù)據(jù)塊加載。為了實(shí)現(xiàn)這一功能,RM
AN必須利用一個(gè)共享內(nèi)存區(qū)域。因此,用于磁盤備份的內(nèi)存區(qū)會(huì)被推入共享池,如果存在1
arge池,則被推入large池。
如果沒(méi)有使用磁帶I/O從屬,會(huì)在PGA中分配用于磁帶輸出緩沖區(qū)的內(nèi)存。設(shè)置init.
ora參數(shù)BACKUP_TAPE」O_SLAVES=TRUE,可以使用磁帶I/O從屬,必要時(shí)還可以在spfile
里動(dòng)態(tài)修改。該參數(shù)設(shè)為true時(shí),rman會(huì)為每個(gè)通道創(chuàng)建一個(gè)從屬進(jìn)程來(lái)幫助備份工作。
為了協(xié)調(diào)這一功能,RMAN會(huì)將內(nèi)存分配推進(jìn)SGA.
如果配置了任一種I/O從屬選項(xiàng)并且沒(méi)有配置large池,則會(huì)在SGA的共享池中分配內(nèi)
存。如果沒(méi)有配置large池又要使用I/O從屬,建議最好創(chuàng)建一個(gè)large池,這個(gè)large
池的大小基于為備份分配的通道總數(shù)(加上1MB用于開(kāi)銷)。
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會(huì)自動(dòng)通知1is
tenero
如果在listerer.ora中配置sid.llist,那就是靜態(tài)注冊(cè)了,而本題考的是動(dòng)態(tài)注冊(cè)。
一、靜態(tài)注冊(cè)
由于靜態(tài)注冊(cè),參數(shù)是手動(dòng)靜態(tài)添加,與數(shù)據(jù)庫(kù)無(wú)關(guān)。數(shù)據(jù)庫(kù)無(wú)法確認(rèn)監(jiān)聽(tīng)是否正確配置。
因此,1snrctl中的status顯示狀態(tài)為unkown。即不保證能連通數(shù)據(jù)庫(kù)。注意:靜態(tài)注冊(cè)
監(jiān)聽(tīng),客戶端在配置tnsnames.ora服務(wù)命名時(shí),“(Oracle8i或更高版本)服務(wù)名”里填
寫(xiě)內(nèi)容要與服務(wù)端靜態(tài)注冊(cè)監(jiān)聽(tīng)器時(shí)的全局?jǐn)?shù)據(jù)庫(kù)名一致。否則,無(wú)法連通
二、動(dòng)態(tài)注冊(cè)
1、缺省的動(dòng)態(tài)注冊(cè)
pmon在數(shù)據(jù)庫(kù)啟動(dòng)到mount或open時(shí),動(dòng)態(tài)從參數(shù)文件中讀取service_nanies值。servic
e_names可以為多個(gè)值。service-names缺省為dbca建立數(shù)據(jù)庫(kù)時(shí)的全局?jǐn)?shù)據(jù)庫(kù)名。
注意:不管參數(shù)service-names為何值,pmon都會(huì)自動(dòng)以全局?jǐn)?shù)據(jù)庫(kù)名(這里為mydata.cc
ddt.cn)為服務(wù)名,動(dòng)態(tài)注冊(cè)一個(gè)監(jiān)聽(tīng)。缺省情況下,若啟用動(dòng)態(tài)注冊(cè)監(jiān)聽(tīng),端口號(hào)必須為
1521.若啟用其他端口的動(dòng)態(tài)監(jiān)聽(tīng)注冊(cè),必須要做相關(guān)配置。通過(guò)查看v$session,狀態(tài)為
SYSSUSERS的連接為通過(guò)靜態(tài)注冊(cè)監(jiān)聽(tīng)連接到服務(wù)器。
2、自定義端口的動(dòng)態(tài)監(jiān)聽(tīng)注冊(cè)
若要啟用非默認(rèn)端口1521的動(dòng)態(tài)監(jiān)聽(tīng)注冊(cè),缺省狀態(tài),Oracle不會(huì)進(jìn)行動(dòng)態(tài)注冊(cè)。要啟用
動(dòng)態(tài)注冊(cè),必須設(shè)置local.listener參數(shù)。并在服務(wù)端配置tnsnames.ora指定監(jiān)聽(tīng)參數(shù),
或者直接通過(guò)修改local」istenei?指定監(jiān)聽(tīng)參數(shù)。步驟如下:
1)服務(wù)端:netmgr,配置監(jiān)聽(tīng)程序,監(jiān)聽(tīng)端口為1525(非默認(rèn)端口),保存配置
2)指定監(jiān)聽(tīng)參數(shù)
法1:直接通過(guò)修改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ù),指定通過(guò)tnsnames.ora內(nèi)的信息指定監(jiān)聽(tīng)參數(shù)SQL>altersystemsetlocal-1i
stener=mytest;
SQL>altersystemregister;
3、查看監(jiān)聽(tīng)器狀態(tài)LSNRCTL>status
(warehouse)showparameterlocal-listener
一定要配置服務(wù)端tns讓pmon自動(dòng)注冊(cè)其他端口
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文件沒(méi)有關(guān)系,數(shù)據(jù)庫(kù)會(huì)自己自動(dòng)重建
25.Ausercomplainsthathegetsthefollowingerrormessagerepeatedlyafterexecutingsom
eSQL
statements.Theerrormessageforcestheusertologofffromandlogontothedatabasetoco
ntinuehiswork.
ORA-02392:exceededsessionlimitonCPUusage,youarebeingloggedoff
WhichactionwouldyoutaketoincreasethesessionlimitonCPUusage?
A)Modifytheprofileassignedtotheuser.
B)Modifytherolesassignedtotheusers.
C)Modifytheobjectprivilegesassignedtotheuser.
D)Modifythesystemprivilegesassignedtotheusers.
E)ModifythevaluefortheRESOURCE_LIMITparameterintheparameterfile.
答案:A
解析:一個(gè)用戶執(zhí)行sql語(yǔ)句報(bào)錯(cuò)ORA-02393:exceededcal1limitonCPUusage這時(shí)候可
以在該用戶的profile里修給recourselimits
當(dāng)需要設(shè)置資源限制時(shí),必須設(shè)置數(shù)據(jù)庫(kù)系統(tǒng)啟動(dòng)參數(shù)RESOURCE_LIMIT,此參數(shù)默認(rèn)值為F
ALSE可以使用如下命令來(lái)啟動(dòng)當(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ù)庫(kù)的時(shí)候有個(gè)選項(xiàng)是來(lái)創(chuàng)建數(shù)據(jù)庫(kù)備份的
27.WhichtwostatementsaboutFlashbackQueryaretrue?(Choosetwo.)
A)Itisgeneratedbyusingtheredologfiles.
B)Ithelpsinrow-levelrecoveryfromusererrors.
C)ItcanbeperformedtorecoverALTERTABLEstatements
D)Itfailswhenundodatapertainingtothetransactionisoverwritten.
E)ThedatabasehastobeopenedwiththeresetlogsoptionafterperformingFlashbackQuery.
答案:BD
解析:FlashbackQuery可以幫助用戶解決行級(jí)別的錯(cuò)誤。是根據(jù)undodata來(lái)閃回的,und
oretention=900s,這要看有沒(méi)有retentionguarantee,如果有,15分鐘內(nèi)不會(huì)被覆蓋。如
果沒(méi)有打開(kāi),那得看UNTO有沒(méi)有可用空間,如果沒(méi)有就會(huì)被覆蓋
Flashbackdatabase相當(dāng)一次不完全恢復(fù),此時(shí)必需alterdatabaseopenresetlog
s;即截?cái)喽嘤嗟膕en,本質(zhì)還是selectfile#,checkpoint.change#fromv$datafile;
selectfile#,checkpoint-change#fromv$datafile.header,兩個(gè)結(jié)果不一致造成的.
10g支持穿越resetlogs了,即用當(dāng)前數(shù)據(jù)庫(kù)的控制文件(resetlog后的控制文件)加上
resetlog之前數(shù)據(jù)文件的備份,其實(shí)只要sen連續(xù)就行
但一旦resetlogs后,無(wú)法再flashback到之前的時(shí)間點(diǎn)了
28.Asaresultofperformanceanalysis,youcreatedanindexontheprod_namecolumnoft
heprod_dettable,
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年深圳市福田區(qū)景蓮幼兒園招聘?jìng)淇碱}庫(kù)及一套完整答案詳解
- 2026年瀘州市龍馬潭區(qū)人民醫(yī)院招聘工作人員5人備考題庫(kù)及完整答案詳解1套
- 中共桑植縣委組織部2026年公開(kāi)選調(diào)工作人員備考題庫(kù)附答案詳解
- 2026年隆平生物技術(shù)(海南)有限公司招聘?jìng)淇碱}庫(kù)及參考答案詳解1套
- 2026年洛陽(yáng)綠業(yè)備考題庫(kù)中等專業(yè)學(xué)校招聘教師49人備考題庫(kù)及完整答案詳解1套
- 2026年重慶聯(lián)交所集團(tuán)所屬單位招聘?jìng)淇碱}庫(kù)及一套參考答案詳解
- 2026年牛頭山水利建設(shè)發(fā)展有限公司公開(kāi)招聘臨時(shí)用工人員備考題庫(kù)參考答案詳解
- 中學(xué)班級(jí)管理制度完善
- 養(yǎng)老院入住老人醫(yī)療保健制度
- 中國(guó)熱帶農(nóng)業(yè)科學(xué)院熱帶作物品種資源研究所2026年第一批公開(kāi)招聘工作人員備考題庫(kù)及答案詳解參考
- 醫(yī)院門診部2025年度工作總結(jié)及2026年工作計(jì)劃
- 2025年醫(yī)院停電應(yīng)急預(yù)案演練腳本
- AI在醫(yī)療質(zhì)量控制中的指標(biāo)優(yōu)化
- 2、公安檢查站治安管控系統(tǒng)解決方案
- 停車場(chǎng)電車起火應(yīng)急預(yù)案
- 2025年四川蜀道高速公路集團(tuán)有限公司招聘工作人員考試筆試備考題庫(kù)及答案
- 2025年榮昌縣輔警招聘考試真題及答案詳解(網(wǎng)校專用)
- 上海落戶業(yè)務(wù)培訓(xùn)
- 2025年國(guó)家開(kāi)放大學(xué)(電大)《中國(guó)法律史》期末考試復(fù)習(xí)題庫(kù)及答案解析
- 2025年水利工程質(zhì)量檢測(cè)員資格考試模擬試題:(巖土工程)復(fù)習(xí)題庫(kù)及答案
- 廣東省深圳市羅湖區(qū)2024-2025學(xué)年六年級(jí)上學(xué)期語(yǔ)文11月期中試卷(含答案)
評(píng)論
0/150
提交評(píng)論