




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1.YouneedtochecktheEMP_EASTpartitionintheEMPLOYEES
tableforphysicalcorruptions.Youalsoneedtoverifythattherows
belongtothecorrectpartition.Whichoptioncouldyouuse?
A.LogMiner
B.theDBNEWIDutility
C.theDBVERIFYutility
D.theANALYZEcommand
E.theRMANREPORTcommand
F.theRMANCROSSCHECKcommand
G.theRMANBLOCKRECOVERcommand
答案:D
解析:
DBVERIFY:是一種外部命令行實用程序,可以對脫機或聯(lián)機的數(shù)據(jù)庫
執(zhí)行物理數(shù)據(jù)結(jié)構(gòu)完整性檢查??梢詫浞菸募c聯(lián)機文件(或文件
片段)運行此實用程序。只能檢查數(shù)據(jù)文件;不能檢查重做日志文件
ANALYZE:使用ANALYZE命令可以驗證表或表分區(qū)的結(jié)構(gòu),以及索引
或索引分區(qū)的結(jié)構(gòu)。
要分析的對象必須位于本地計算機,并且必須是在您自己的方案中,
或者必須擁有ANALYZEANY系統(tǒng)權(quán)限。CASCADE選項可以驗證對象,
包括該對象的所有相關(guān)對象。不將塊標記為軟損壞;只報告軟損壞情
況
RMANCROSSCHECK:當手工刪除了歸檔日志以后,Rman備份會檢測到
日志缺失,從而無法進一步繼續(xù)執(zhí)行。所以此時需要手工執(zhí)行
crosscheck過程,之后Rman備份可以恢復正常。
根據(jù)題意驗證分區(qū)表的block,驗證行是否屬于正確的分區(qū),所以要
選ANALYZE
2.Youexecutethefollowingcommandtoenableasessioninresumab
lemode:
SQL>ALTERSESSIONENABLERESUMABLETIMEOUT60;
Whatistheimpactofatimeoutonthestatementsbeingsuspended?
A.Thestatementsremainsuspendedforatleast60seconds.
B.Thestatementsaresuspendedfor60secondsandthentheyareexecute
d.
C.Thesuspendedstatementserroroutiftheproblemisnotrectifiedwithi
n60seconds.
D.Thestatementsareautomaticallysuspended60secondsafteranerroris
received,andthenattempttoexecutenormallyagain.
答案:C
解析:Oracle提供了一種方法,當對數(shù)據(jù)庫執(zhí)行操作時,出現(xiàn)分配
存儲空間失敗的錯誤時,Oracle不是簡單的返回錯誤信息,并回滾
整個事務(wù),而是將執(zhí)行的語句置于懸掛狀態(tài),等待一段時間,在等待
時間內(nèi),如果問題得到解決,則語句會繼續(xù)執(zhí)行下去,如果問題一直
無法解決,則會報錯并回滾。產(chǎn)生SUSPEND的前提是當前的
session處于ENABLERESUMABLE狀態(tài)。而且發(fā)出的語句遇到下面三
種錯誤:空閑空間不足、達到最大的MAXEXTENTS和達到用戶的空間
QUOTA限制。
C選項,如果在60s內(nèi)沒有解決問題,掛起狀態(tài)將報錯。按理說A選
項也應(yīng)該是對的,就是說掛起狀態(tài)會保留至少60s,不知道是不是至
少出的錯.
3.Immediatelyafteraddinganewdisktoorremovinganexistingdis
kfromanAutomaticStorageManagement(ASM)instance,youfindt
hattheperformanceofthedatabasedecreasesinitially,untilthe
additionorremovalprocessiscompleted.Performancethengraduall
yreturnstonormallevels.
Whichtwoactivitiescouldyouperformtomaintainaconsistentperf
ormanceofthedatabasewhileaddingorremovingdisks?(Chooset
wo.)
A.increasethenumberofcheckpointprocesses
B.definethePOWERoptionwhileaddingorremovingthedisks
C.increasethenumberofDBWRprocessesbysettingupahighervaluef
orDB_WRITER_PROCESSES
D.increasethenumberofslavedatabasewriterprocessesbysettingupa
highervalueforDBWR_IO_SLAVES
E.increasethenumberofASMRebalanceprocessesbysettingupahighe
rvalueforASM_POWER_LIMrrduringthediskadditionorremovalpr
ocess
答案:BE
解析:
在ASM實例添加和刪除磁盤,在沒有完之前數(shù)據(jù)庫會很慢,用什么方
法可以在不影響數(shù)據(jù)庫
速度的情況下添加或刪除磁盤
Striping:條帶化
條帶化是把連續(xù)的數(shù)據(jù)分割成相同大小的數(shù)據(jù)塊,把每段數(shù)據(jù)分別寫
入到陣列中不同磁盤上的方法。此技術(shù)非常有用,它比單個磁盤所能
提供的讀寫速度要快的多,當數(shù)據(jù)從第一個磁盤上傳輸完后,第二個
磁盤就能確定下一段數(shù)據(jù)。數(shù)據(jù)條帶化正在一些現(xiàn)代數(shù)據(jù)庫和某
些RAID硬件設(shè)備中得到廣泛應(yīng)用。
ASM_POWER_LIMIT:該參數(shù)控制重新平衡操作的速度。值的范圍在
1到11之間,11表示速度最快。如果省略,該值將默認為L從屬
進程的數(shù)量可以從手動重新平衡命令(POWER)中指定的并行級別派
生,或者通過ASM.POWER.LIMIT參數(shù)派生。
ALTERDISKGROUPdgladddisk'ddd'REBALANCEPOWER5;
最小值0代表不做Rebalance
最大值11代表最快的速度,也意味最嚴重的性能影響
1代表最慢的速度和最小的性能影響
重新平衡不會妨礙任何數(shù)據(jù)庫操作。重新平衡進程主要會對系統(tǒng)上
的I/O負載產(chǎn)生影響。
重新平衡的強度越高,它加在系統(tǒng)上的I/O負載也就越大。這樣,
可供數(shù)據(jù)庫I/O使用的
I/O帶寬就越少。
如果ASM環(huán)境是使用命令行而不是通過EM創(chuàng)建的,則必須先創(chuàng)建磁
盤組然后才能裝
載。
4.YouenabledAutomaticSharedMemoryManagement.Thei
nitializationparametersaresetasshownbelow:
SGA_TARGET=10GB
SGA_MAX_SIZE=14GB
STREAMS_POOL_SIZE=1GB
SHARED_POOL_SIZE=3GB
Whichtwostatementsarecorrectinthisscenario?(Chooset
wo.)
A.Amaximumof3GBcanbeallocatedtosharedpool.
B.ThevalueforSGA_TARGETcanbeincreaseduptoamaximum
of14GB.
C.Atotalof14GBmemorywillbeallocatedtotheautomaticallytu
nedmemorycomponents.
0.IncreasingthevalueforSGA_TARGETwillautomaticallyincrea
sethememoryallocatedforSTREAMS_POOL_SIZE.
E.IncreasingthevalueforSGA_TARGETto12GBwillautomatical
lyincreasethememoryallocatedtoautotunedparameters.
F.ReducingthevalueforSGA_TARGETto9GBwillautomatically
decreasethememoryallocatedtosharedpoolfrom3GBto2GB.
答案:BE
解析:SHARED_POOL_SIZE設(shè)置值后只會增加,不會減少
5.Manually,yousettheconsumergroupofallofthenewlycreatedu
serstoMYDB_GRP.Youwanttheuserstobeabletochangetheirco
nsumergroupsaspertheapplicationrequirement.
Whatwasthefirststepthatwasneededintheprocesstoachievethis
objective?
A.TheusermusthavebeengrantedtheDBArole.
B.Theusermusthavebeengrantedtheswitchprivilegeasapartofarole.
C.TheusermusthavebeengrantedtheResourceManageradministrator
privilege.
D.TheusermusthavebeengrantedtheswitchprivilegebyusingtheDB
MS_RESOURCE_MANAGER_PRIVSpackage.
答案:D
解析:
資源管理概述:
資源管理器有三個部件組成:
資源用戶組(Resourceconsumergroup)
資源規(guī)劃(Resourceplan)
資源分配方法(Resourceallocationmethod)
資源計劃目錄(Resourceplandirectives)
它們的功能如下:
資源用戶組:根據(jù)數(shù)據(jù)庫資源處理需求,將用戶會話分成組資源規(guī)
劃:指定哪些資源分配給資源用戶的命令資源分配方法:數(shù)據(jù)庫資
源管理器分配特殊資源時采用的方法,由資源用戶組和資源規(guī)劃來使
用。
資源規(guī)劃命令:管理員使用這些命令將資源用戶組與特殊規(guī)劃連接
起來,并在資源用戶組之間分配資源。
數(shù)據(jù)庫資源管理器可以完成:
.確保某些用戶處理少量的資源,不考慮對系統(tǒng)的加載和用戶的數(shù)量。
.按比例將CPU時間分配給不同的用戶和程序,分配有效的處理資源。
.限制一組用戶可以使用的并行度。
.對實例進行配置,使其能使用特殊的資源分配方法。例如,DBA不
用關(guān)閉數(shù)據(jù)庫實例就可以動態(tài)地改變這些配置方法。
授予用戶“切換權(quán)限”:
BEGIN
//撤消用戶
dbms-resource-manager-privs.revoke-switch-consumer-group('J
OSEN',,SDL‘);
〃添加用戶并授于切換特權(quán)選項
dbms-resource-manager-privs.grant-switch_consumer-group('JO
SEN','SDL',true);
END;
6.YouhavesetthevalueoftheNLS_TIMESTAMP_TZ_FORMAT
parameterintheparameterfileto
YYYY-MM-DD.Thedefaultformatofwhichtwodatatypeswouldb
eaffectedbythissetting?(Choosetwo.)
A.DATE
B.TIMESTAMP
C.INTERVALYEARTOMONTH
D.INTERVALDAYTOSECOND
E.TIMESTAMPWITHLOCALTIMEZONE
答案:BE
解析:
NLS-TIMESTAMP-TZ-FORMATdefinesthedefaulttimestampwithti
mezoneformattousewiththeTO-CHARandTO-TIMESTAMP_TZfun
ctions
7.YouexecutedthefollowingcommandinRecoveryManager(RMA
N)toperformabackupoftheDETTBStablespace:
RMAN>BACKUPTABLESPACEDETTBS;
Underwhichconditionswouldthiscommandexecutesuccessfully?(
Chooseallthatapply.)
A.ThedatabaseisinNOMOUNTstate.
B.ThedatabaseisinARCHIVELOGmodeandthetablespaceisonline.
C.ThedatabaseisinARCHIVELOGmodeandthetablespaceisoffline.
D.ThedatabaseisinNOARCHIVELOGmodeandthetablespaceisonlin
e.
E.ThedatabaseisinNOARCHIVELOGmodeandthetablespaceisoffli
ne.
答案:BCE
解析:
在NOARCHIVELOG下,只能備份readonly及offline的表空間
RMAN>backuptablespaceusers;
啟動backup于17-3月-H
使用通道ORA_DISK_1
通道ORA_DISK_1:啟動全部數(shù)據(jù)文件備份集
通道ORA_DISK_1:正在指定備份集中的數(shù)據(jù)文件
RMAN-03009:backup命令(ORA_DISK_1通道
上,在03/17/201114:05:13上)
失敗
ORA-19602:無法按NOARCHIVELOG模式備份或復制活動文件
8.Youlostatemporaryfilethatbelongstothedefaulttemporarytab
lespaceinyourdatabase.Fromtheoptionsprovided,whichapproac
hwouldyoutaketosolvetheproblem?
A.flashbackthedatabase
B.importthetemporarytablespacefromthelastexport
C.restoreallthedatafilesandtemporaryfilesfromthelastfulldatabaseb
ackupandperformarecovery
D.notperformarecovery,butcreateanewtemporarytablespace,makeit
thedefaulttemporarytablespaceandthendroptheoldtablespace
答案:D
解析:你的臨時數(shù)據(jù)文件丟失了(屬于臨時表空間),這時不用去閃
回或者回復,直接刪除原來的舊有臨時表空間,新建一個新的就行了。
創(chuàng)建臨時表空間
createtemporarytablespaceTEMPITEMPFILE'E:ORACLEORADATAO
RCL9tempO2.DBF'SIZE512MREUSEAUTOEXTENDONNEXTIMMAXSIZE
UNLIMITED;
改變?nèi)笔∨R時表空間為剛剛創(chuàng)建的新臨時表空間tempi
alterdatabasedefaulttemporarytablespacetempi;
刪除原來臨時表空間
droptablespacetempincludingcontentsanddatafiles;
9.YouexecutedthefollowingcommandinRecoveryManager(RMA
N):
RMAN>RESTORECONTROLFILE;
Whichoperationmustyouperformbeforethiscommandisexecuted
*
A.backupthecontrolfiletotrace
B.bringdatabasetotheMOUNTstate
C.openaconnectiontotheRMANrecoverycatalog,whichcontainsthe
RMANmetadataforthetargetdatabase
D.setthedatabaseID(DBID),butonlyiftheDB_NAMEparameterasso
ciatedwiththetargetdatabaseisuniqueintherecoverycatalog
答案:C
解析:
1.使用增量備份只能用rman在catalog情況下,從nomount就可以
恢復
2.如果不看備份腳本,目前從備份文件或是catalog信息無法判斷是
差異增量還是累計增量的
3.rman>createscriptscl{
deletenopromptbackup;
backupascompressedbackupsetfulldatabase;
backuparchivelogall;}
只有catalog下情況用rman>listscriptnames;
1個catalog可以對多庫(至于庫名DB_NAME是否唯一需實驗)
rman>run{executesriptscl};可以寫成批處理里面
rman>deletcopy;
10.YouareusingOracleDatabase10g.Youperformedanincomplet
erecoveryofyourdatabaseandopenedthedatabasewiththeRESE
TLOGSoption.
WhatistheeffectofopeningthedatabasewiththeRESETLOGSopt
ion?(Choosetwo.)
A.ThisoperationresetstheSCNforthedatabase.
B.Thisoperationcreatesanewincarnationofthedatabase.
C.Thisoperationmovesalltheredologfilestoadifferentlocation.
D.Thisoperationdeletestheoldredologfilesandcreatesnewredologfil
es.
E.Thisoperationupdatesallcurrentdatafilesandonlineredologsandall
subsequentarchivedredologswithanewRESETLOGSSCNandtimest
amp.
答案:BE
解析:
selectfile#,checkpoint-change#fromv$datafile;
selectfile#,checkpoint-change#fromv$datafile.header;
只要以上兩個不一致,就需要resetlog打開
alterdatabaseopenresetlogs;即截斷多余的sen,resetsen更
好
a.截斷sen(有疑問)(warehous)
b.把當前日志歸檔
c.序列號從1開始了重建日志了
http:〃blog.esdn.net/leishifei/article/details/6430057
11.ThesearethedetailsaboutV$FLASHBACK_DATABASE_STA
T:
SQL>DESCV$FLASHBACK_DATABASE_STAT
NameNull?Type
BEGIN_TIMEDATE
END_TIMEDATE
FLASHBACK_DATANUMBER
DB_DATANUMBER
REDO_DATANUMBER
ESTIMATED_FLASHBACK_SIZENUMBER
WhichtwostatementsregardingtheV$FLASHBACK_DATABASE_
STATviewaretrue?(Choosetwo.)
A.BEGIN_TIMEisthetimeatwhichFlashbackloggingisenabled.
B.END_TIMEisthetimeatwhichthequeryisexecutedontheview.
C.REDO_DATAisthenumberofbytesofredodatawrittenduringthein
terval.
D.Thisviewcontainsinformationaboutflashbackdatapertainingtothe1
ast24hours.
E.FLASHBACK_DATAistheamountofflashbackdatageneratedsince
thedatabasewasopened.
答案:CD
解析:
V$FLASHBACK_DATABASE_STAT記錄的是過去24小時的flashback區(qū)
讀寫統(tǒng)計
—每小時采樣一次,并記錄在該視圖相應(yīng)的數(shù)據(jù)字典中,
BEGIN-TIMEDATE,
END.TIMEDATE這兩個參數(shù)是采樣開始和結(jié)束時間。
V$flashback-database-stat這個視圖用來對Flashbacklog空間
情況進行更細粒度的記錄和估計。這個視圖以小時為單位記錄單位
時間內(nèi)數(shù)據(jù)庫的活動量,F(xiàn)lashback_Data代表Flashbacklog產(chǎn)生
數(shù)量,DB-Date代表數(shù)據(jù)改變數(shù)量,Redo.Date代表日志數(shù)量,通過
這3個數(shù)量可以反映出數(shù)據(jù)的活動特點,更準確的預計
FlashRecoveryArea的空間需求
12.ViewtheExhibit.
SQL>SELECToriginal—,droptime,dropscn
2FROMdba.recyclebin
5UK1ILKtfYdropscn
ORICINAl.mDROPTIMEDROPSCN
TFPT??<?4-0R-11:04d7!SR1曲RI41
DEPT221)04-08-11:06:39:571934739
Youhavemorethanonetableintherecyclebinhavingthesameorig
inalname,DEPT2.YoudonothaveanytablewiththenameDEPT2
inyourschema.Youexecutedthefollowingcommand:
PURGETABLEdept2;
Whichstatementiscorrectinthisscenario?
A.AllthetableshavingthesameoriginalnameasDEPT2willbepurged
fromtherecyclebin.
B.Thetablewithdropscn=1928151(oldestdropscn)willbepurgedfrom
therecyclebin.
C.Thetablewithdropscn=1937123(mostrecentdropscn)willbepurge
dfromtherecyclebin.
D.Noneofthetableswillbepurgedbecausetherearemultipleentrieswit
hthesameoriginalnameintherecyclebin
答案:B
解析:
purge從recycle里面刪除drop掉的表
還原表按后進先出(LIFO)算法.
清除時,先進先出(FIFO)算法自動將回收站對象從回收站中清除.
13.OnMonday,youdroppedtheDEPTtablefromyourschemaand
thenyoure-createdtheDEPTtableinyourschema.OnWednesday,
youhavearequirementtorestoretheDEPTtablefromtherecyclebi
n.
Whichstatementiscorrect?
A.YoucanrestoretheDEPTtablebyusingtheOracleFlashbackDropfe
ature,providedyouusetheRENAMETOclause.
B.YoucanrestoretheDEPTtablebyusingtheOracleFlashbackDropfe
atureandasystem-generatednamewillbeassignedtotherestoredtable.
C.YoucannotrestoretheDEPTtablebyusingtheOracleFlashbackDrop
featurebecauseatablewiththenameDEPTalreadyexistsinyoursche
ma.
D.YoucannotrestoretheDEPTtablebyusingtheOracleFlashbackDrop
featurebecausethecontentsoftherecyclebinarepurgedevery12hou
rsbydefault.
答案:A
解析:
Flashbacktable語句同時提供了一個renameto的子句,如果要恢
復的表
在當前的schema中已經(jīng),存在同名的表,建議你在恢復時通過
renameto子句為
待恢復的表指定一個新的表名,不然數(shù)據(jù)庫會報ORA-38312
FlashbacktableDEPT2tobeforedroprenametodept
14.WhichtwostatementsarecorrectregardingtheOracleFlashbac
kDropfeature?(Choosetwo.)
A.Recyclebinexistsforthetablesonlyinnon-SYSTEM,locallymanage
dtablespaces.
B.Youcanflashbackadroppedtableprovidedrowmovementhasbeene
nabledonthetable.
C.Ifyoudropanindexbeforedroppingitsassociatedtable,thentherecov
eryoftheindexisnotsupportedwhenyouflashbackthedroppedtable.
D.WhenyouexecutetheDROPTABLESPACEINCLUDINGCONTEN
TScommand,theobjectsinthetablespaceareplacedintherecyclebin.
E.Whenadroppedtableismovedtotherecyclebin,onlythetableisrena
medtoasystem-generatedname;itsassociatedobjectsandconstraintsar
enotrenamed.
F.Ifyoudropatablethatisprotectedbytherecyclebin,thenassociatedb
itmap-joinedindexesandmaterializedviewlogsarealsostoredintherec
yclebin.
答案:AC
解析:
基于RecycleBin的表恢復
(1)FlashbackDrop不能恢復參照完整性,這很容易理解,畢竟在
該表刪除之
后,被參照表是否有修改,它已經(jīng)無法控制了,因此如果該表有主外
鍵約束的話,
恢復之后,該約束是DISABLE狀態(tài),需要DBA手工處理。
(2)所操作的表必須是存在于本地管理表空間中。
FlashbackDrop不能恢復字典管理表空間中被刪除的表。
(3)被恢復的表的關(guān)聯(lián)對象,如其索引、約束的名稱不會自動恢復
成刪除前的名稱,而是系統(tǒng)自動生成的名稱,如果你對表的索引、約
束有相應(yīng)命名規(guī)范,那在恢復表之后,需要DBA手工將索引、約束等
改名。另外位圖索引不能被恢復,因為刪除表時位圖索引信息并不會
被放入RecycleBin中。
.YoumusthavebeengrantedtheFLASHBACKANYTABLEsystempriv
ilegeoryoumusthavetheFLASHBACKobjectprivilegeonthet
able.
.YoumusthaveSELECT,INSERT,DELETE,andALTERprivilegeson
thetable.
.Undoinformationretainedintheundotablespacemustgofare
noughbackintimetosatisfythespecifiedtargetpointinti
meorSCNfortheFLASHBACKTABLEoperation.
.Rowmovementmustbeenabledonthetableforwhichyouareis
suingtheFLASHBACKTABLEstatement.Youcanenablerowmovem
entwiththefollowingSQLstatement:
ALTERTABLEtableENABLEROWMOVEMENT;
SQL>flashbacktabletesttotimestamp(z2010-09-0914:26:49')
flashbacktabletesttotimestampC2010-09-0914:26:49')
第1行出現(xiàn)錯誤:
ORA-08189:因為未啟用行移動功能,不能閃回表
SQL>altertabletestenablerowmovement;
表已更改。
SQL>flashbacktabletesttotimestampto_timestamp(z2010-09-
0914:26:49z,zYYYY-MM-DDHH24:MI:SS');
閃回完成。
16.Youareworkinginanonlinetransactionprocessing(OLTP)envi
ronment.YouusedtheFLASHBACKTABLEcommandtoflashba
cktheCUSTOMERStable.BeforeexecutingtheFLASHBACKTAB
LEcommand,theSystemChangeNumber(SCN)was663571.After
flashingbacktheCUSTOMERStable,yourealizethatthetableisnot
inthecorrectstateandtheresultantchangesarenotwhatyouhad
desired.So,youneedtoreversetheeffectsoftheFLASHBACKTAB
LEcommandwhileensuringthat:
a)Nootheruserdatainthedatabaseisaffected.
b)Theoperationtakestheminimumpossibletime.
Whichoptionwouldyouchoose?
A.usetheROLLBACKcommandwithSCN663571
B.performFlashbackTransactionQuerywithSCN663571
C.executetheFLASHBACKDATABASEstatementtoretrievetheCUS
TOMERStableasitwasatSCN663571
D.executeanotherFLASHBACKTABLEstatementtoretrievetheCUST
OMERStableasitwasatSCN663571
答案:D
C、如果一個表被刪除后是否還是可以使用閃回表呢(不能)
flashbacktabletest5tobeforedrop;
d、在一個transaction中,閃回將被執(zhí)行
e、閃回表后,同時會恢復在其上的索引
18.WhywouldyouusethefollowingFLASHBACKTABLEcomma
nd?
FLASHBACKTABLEempTOTIMESTAMP('11:45','hhl2:mi');
A.toundothechangesmadetotheEMPtablesincethespecifiedtime
B.torestoretheEMPtablethatwaswronglydroppedfromthedatabase
C.toviewthetransactionsthathavemodifiedtheEMPtablesincethespe
cifiedtime
D.toviewthechangesmadetotheEMPtableforoneormorerowssince
thespecifiedtime
E.torecovertheEMPtabletoapointintimeinthepastbyrestoringthe
mostrecentbackup
答案:A
解析:
SQL>selectsysdatefromdual;
SYSDATE
2010-09-0914:26:49
SQL>select*fromtest;
未選定行
SQL>insertintotestvalues(1);
已創(chuàng)建1行。
SQL>commit;
提交完成。
SQL>flashbacktabletesttotimestampto_timestamp(z2010-09-
0914:26:49','YYYY-MM-DDHH24:MI:SS');
閃回完成。
SQL>select*fromtest;
未選定行
19.ForwhichtwoSQLstatementscanyouusetheFlashbackTablef
eaturetorevertatabletoitspreviousstate?(Choosetwo.)
A.UPDATETABLE
B.CREATECLUSTER
C.TRUNCATETABLE
D.ALTERTABLEMOVE
E.INSERTINTO...VALUES
F.ALTERTABLE...DROPCOLUMN
G.ALTERTABLE...DROPPARTITION
答案:AE
解析:
哪兩種sql語句可以使用閃回表
a、update
b、insert
這應(yīng)該證明drop表或者truncate表是無法使用閃回的,同時改變
表的結(jié)構(gòu)也是不行的
20.Youareworkinginanonlinetransactionprocessing(OLTP)envi
ronment.Yourealizethatthesalaryforanemployee,John,hasbeen
accidentallymodifiedintheEMPLOYEEStable.Twodaysago,the
datawasinthecorrectstate.Flashbacklogsgeneratedduringlastt
wodaysareavailableintheflashrecoveryarea.
Whichoptionwouldyouchoosetobringthedatatothecorrectstate
whileensuringthatnootherdatainthesametableisaffected?
A.performpoint-in-timerecovery
B.performaFlashbackTableoperationtorestorethetabletothestateit
wasintwodaysago
C.performaFlashbackDatabaseoperationtorestorethedatabasetothest
ateitwasintwodaysago
D.performFlashbackVersionsQueryandFlashbackTransactionQueryt
odetermineallthenecessaryundoSQLstatements,andthenusethemfo
rrecovery
答案:D
解析:FlashbackQuery只能看到某一點的對象狀
態(tài),F(xiàn)lashbackVersionQuery可以看到過去某個時間段內(nèi),記錄的演
變歷史。
(快速定位,因為是錯誤的修改表記錄,只能閃回查詢)
21.ViewtheExhibits.
1FlashbackVersion
Workspace
EnterSQL,PL/SQLandSQL'Plusstatements.、Clear)
SELECTversions_KidASXID,3
versions_startscnASSTART_SCN,
version§_end§cnA3END__SCN,
versions_operationASOPERATION,departmentid,department_name
FROMIir.dept4VERSIONSPETWELLSCNMINVALUEAND
MAXVALUE
Wheredepartment_name='RESEARCH,;
zl
.Execute)LoadScriptJSaveScript^.Cancel^)
XIDSTART_SCNEND_SCN0DEPARTMENTJDDEPARTMENT_NAME
6RESEARCH
EnterSQL,PL/SQLandSQL*Plusstatements.、Clear)
UPDATEhr.dept4SETdepartment_id=4WHERE
department_name='RESEARCH,
UPDATEhr-dppt4SETdepartmpntjd=5WHERE
department_name=,RESEARCH'
ALTERTablehrdept4DROUPCOLUMNlocationid:
COMMIT;
UPDATEihrdppt4SETdepartment_id=6WHERE
department_name=,RE:SEARCH,
COMMIT;
.d
vExecutejLoadScriptJ^SaveScriptJCancelJ
1rowupdated.
1rowupdated.
Tablealtered.
Commitcomplete
1rowupdated.
Commitcomplete
YouperformedoperationsontheDEPT4tableasshownintheExhib
it.WhenyouperformtheFlashbackVersionsQuery,youfindthatth
efirsttwoupdatesarenotlisted.
Whatcouldbethereason?
A.Therowmovementisnotenabledonthetable.
B.Thefirsttwoupdateswerenotexplicitlycommitted.
C.TheFlashbackVersionsQuerylistsonlythemostrecentupdate.
D.TheFlashbackVersionsQuerystopsproducingrowsafteritencounters
atimeinthepastwhenthetablestructurewaschanged.
答案:D
解析:
在哪種情況下可以使用flashbackversionsquery
a、只能是commited以后的數(shù)據(jù)
b、只能是dml語句,ddl不行,ddl以后,前面的dml也查詢不到
c、沒必要非要啟用rowmovement
22.WhichtwostatementsarecorrectregardingtheFlashbackVersio
nsQueryfeature?(Choosetwo.)
A.YoucanusethisfeaturetoidentifytheversionsofV$views.
B.Youcanusethisfeaturetoidentifytheversionsofexternalandfixedta
bles.
C.Youcanusethisfeatureforatableonlyifrowmovementisenabledfo
rthetable.
D.Youcanusethisfeaturetoidentifythecommittedversionsoftherows,
butnottheuncommittedversions.
E.Youcanusethisfeaturetoidentifytheinserts,deletes,andupdatesperf
ormedonaparticularrowbutnotthedatadefinitionlanguage(DDL)ope
rationsperformedonthetable.
答案:DE
解析:詳見上題
23.Bymistake,youranthebatchjob(forupdatingtheBILL_DETA
ILStable)twice.YouarenotsurewhichrowsintheBILL_DETAIL
Stablewereaffected.Youneedtoidentify:
a)alistofchangesmadealongwiththetransactionidentifierofeach
change
b)thenecessarySQLstatementstoundotheerroneouschanges
Whichoptionwouldyouchoose?
A.RMANonly
B.FlashbackTableonly
C.FlashbackVersionsQueryonly
D.FlashbackDatabaseandFlashbackTransactionQuery
E.FlashbackVersionsQueryandFlashbackTransactionQuery
答案:E
解析:
FlashbackQuery只能看到某一點的對象狀
態(tài),F(xiàn)lashbackVersionQuery可以看到過去某個時間段內(nèi),記錄的演
變歷史。
(快速定位,因為是錯誤的修改表記錄,只能閃回查詢)
24.Youexecutedthefollowingquery:
SELECToperation,undo_sql,table_name
FROMflashback_transaction_query;
Whichstatementiscorrectregardingthequeryoutput?
A.Itwouldreturninformationregardingonlythelastcommittedtransacti
on.
B.Itwouldreturnonlytheactivetransactionsinalltheundosegmentsint
hedatabase.
C.Itwouldreturnonlythecommittedtransactionsinalltheundosegment
sinthedatabase.
D.Itwouldreturnbothactiveandcommittedtransactionsinalltheundos
egmentsinthedatabase.
E.Itwouldreturninformationregardingthetransactionsthatbeganandw
erecommittedinthelast30minutes.
答案:D
解析:
selectsum(bytes/1024/1024),status,tablespace_name
fromdba_undo_extentsgroupbystatus,;
該查詢將返回以STATUS分組的各狀態(tài)回滾信息所使用的空間量,一
般存在三種STATUS狀態(tài):
EXPIRED,UNEXPIRED,ACTIVE,ACTIVE表示目前仍活躍的事務(wù)相關(guān)
回滾信息,UNEXPIRED
表示雖然事務(wù)已經(jīng)結(jié)束但回滾信息保留的時間仍未超過實例參數(shù)
UNDO.RETENTION所設(shè)定的值,EXPIRED表示回滾信息保留時間已超
過UND0_RETENTI0N所設(shè)定的值。
在UNDO表空間未啟用guarantee選項的情況下(當前使用情況),
新事務(wù)的回滾空間分配
遵循以下依據(jù):
a)尋找不存在ACTIVE區(qū)間的回滾段,若沒有則創(chuàng)建一個新的回滾段,
若空間不允許生成新段,則返回錯誤。
b)如果有一個回滾段被選中,但是其中空閑的空間并不足以存儲該
事務(wù)的回滾信息,那么它將嘗試創(chuàng)建區(qū)間,如果表空間上沒有空間,
那么將會進入下一步。
c)如果創(chuàng)建新區(qū)間失敗,它將會搜索其他回滾段中的EXPIRED區(qū)間
并重用。
d)如果其他回滾段中沒有EXPIRED區(qū)間可使用,那么它會繼續(xù)搜索
其他回滾段中
UNEXPIRED區(qū)間并重用,注意事務(wù)不會重用本回滾段中的
UNEXPIRED區(qū)間,故UNEXPIRED的
回滾空間僅部分可以為Oracle重用;若仍得不到所需則返回錯誤。
結(jié)論(warehouse):flashback-transaction_query中的數(shù)據(jù)來自
undodatafile,只要事務(wù)
對應(yīng)的beforeimage在undodatafile中存在,
flashback-transaction-query里面就可
以查詢到數(shù)據(jù)...目前沒發(fā)現(xiàn)受那個參數(shù)的制約
25.Byusingthetransactionidentifierprovidedbyforapartic
ularrowchange,youcanusetheFlashbackTransactionQuerytosee
theoperationperformedbythetransaction.
A.FlashbackTable
B.FlashbackDatabase
C.FlashbackVersionsQuery
D.theRMANREPORTcommand
E.theDBA_PENDING_TRANSACTIONSview
答案:C
解析:
a.flashbackversionsquery
flashbackversionsquery能夠得到某個時間段內(nèi),某些數(shù)據(jù)行的所
有不同版本。這里的版本以事務(wù)為單位,事務(wù)中的每次數(shù)據(jù)變化就是
一個版本
b.flashbacktransactionquery
flashbacktransactionquery其實就是查詢歷史的事務(wù)信息,通過
查詢,我們可以得到過去某個事務(wù)操作信息,包括改變的數(shù)據(jù)行rowid,
事務(wù)開始和結(jié)束時間,事務(wù)對應(yīng)的loggonuser,以及用來撤銷某個
數(shù)據(jù)行改變的undosql等。
26.Therewasmediafailureandyouneedtocheckthedatafilesfora
nyblockcorruption.Whichoptionwouldyouusetocreateareporto
nanycorruptionsfoundwithinthedatabase?
A.theDBNEWIDutility
B.theDBVERIFYutility
C.theANALYZEcommand
D.theRMANREPORTcommand
E.theRMANCROSSCHECKcommand
F.theCHECK_OBJECTprocedureoftheDBMS_REPAIRpackage
答案:B
解析:
DBVERIFY:是一種外部命令行實用程序,可以對脫機或聯(lián)機的數(shù)據(jù)庫
執(zhí)行物理數(shù)據(jù)結(jié)構(gòu)完整性檢查??梢詫浞菸募c聯(lián)機文件(或文件
片段)運行此實用程序。只能檢查數(shù)據(jù)文件;不能檢查重做日志文件
ANALYZE:使用ANALYZE命令可以驗證表或表分區(qū)的結(jié)構(gòu),以及索引
或索引分區(qū)的結(jié)構(gòu)。
要分析的對象必須位于本地計算機,并且必須是在您自己的方案中,
或者必須擁有ANALYZEANY系統(tǒng)權(quán)限。CASCADE選項可以驗證對象,
包括該對象的所有相關(guān)對象。不將塊標記為軟損壞;只報告軟損壞情
況
RMANCROSSCHECK:當手工刪除了歸檔日志以后,Rman備份會檢測到
日志缺失,從而無法進一步繼續(xù)執(zhí)行。所以此時需要手工執(zhí)行
crosscheck過程,之后Rman備份可以恢復正常。
27.TheEMPLOYEEStableisstoredintheUSERStablespace.You
needtocheckiftheEMPLOYEEStableisaffectedbytheblockcorr
uptionfoundintheUSERStablespace.Whichoptionwouldyouuse?
A.theDBNEWIDutility
B.theANALYZEcommand
C.theRMANLISTcommand
D.theRMANREPORTcommand
E.theRMANCROSSCHECKcommand
F.theRMANBLOCKRECOVERcommand
答案:B
解析:見上題
28.TheDB_BLOCK_CHECKINGinitializationparameterissettoF
ALSE.Whatlevelofblockcheckingwouldbeperformed?
A.TheOracledatabasewillnotperformblockcheckingforanyofthedat
ablocks.
B.TheOracledatabasewillperformblockcheckingforthedefaultperma
nenttablespaceonly.
C.TheOracledatabasewillperformblockcheckingforthedatablocksin
allusertablespaces.
D.TheOracledatabasewillperformblockcheckingforthedatablocksin
theSYSTEMtablespaceonly.
E.TheOracledatabasewillperformblockcheckingforthedatablocksin
theSYSTEMandSYSAUXtablespaces.
答案:D
解析:
OFF-noblockcheckingisperformedforblocksintheuserta
blespaces.However,semanticblockcheckingforSYSTEMtables
paceblocksisalwaysturnedon.
LOW-basicblockheaderchecksareperformedafterblockcont
entschangeinmemory(forexample,afterUPDATEorINSERTsta
tements,on-diskreads,orinter-instanceblocktransfersin
RAC)
MEDIUM-allLOWchecksareperformed,aswellassemanticbio
ckcheckingfora11non-index-organizedtableblocks
FULL-al1LOWandMEDIUMchecksareperformed,aswel1assem
anticchecksforindexblocks(thatis,blocksofsubordinate
objectsthatcanactuallybedroppedandreconstructedwhenfa
cedwithcorruption)
29.TheDB_BLOCK_CHECKINGinitializationparameterissetto
TRUE.Whatwouldbetheresultofthissettingonthedatablocksbei
ngwrittentothedatafiles,everytimetheDBWnwrites?
A.TheOracledatabasewillcheckalldatablocksbygoingthroughthedat
aoneachblock,makingsurethedataisself-consistent.
B.DBWnandthedirectloaderwillcalculateachecksumandstoreitinth
ecacheheaderofeverydatablockwhenwritingittodisk.
C.TheOracledatabasewillcheckdatablocksbelongingtotheSYSTEM
tablespaceonly,bygoingthroughthedataoneachblock,makingsurethe
dataisself-consistent.
D.TheOracledatabasewillcheckdatablocksbelongingtotheSYSAUX
tablespaceonly,bygoingthroughthedataoneachblock,makingsurethe
dataisself-consistent.
E.TheOracledatabasewillcheckdatablocksintheSYSTEMandSYSA
UXtablespacesonly,bygoingthroughthedataoneachblock,makingsu
rethedataisself-consistent
答案:A
解析:
Oraclechecksablockbygoingthroughthedataintheblock,
makingsureitisl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025店面合伙經(jīng)營協(xié)議書-咖啡輕食店合作
- 2025年度游戲工作室音效制作人員用工協(xié)議
- 二零二五年度水果店與廣告公司品牌宣傳合作協(xié)議
- 個人車位產(chǎn)權(quán)轉(zhuǎn)讓與車位增值服務(wù)及配套設(shè)施維護協(xié)議(2025年度)
- 二零二五年度反擔保人合作協(xié)議:旅游度假區(qū)項目資金安全反擔保協(xié)議
- 美容院二零二五年度合伙人合作協(xié)議:風險管理與合規(guī)經(jīng)營
- 二零二五年度小產(chǎn)權(quán)房屋買賣與智能家居安裝合同
- 二零二五年度新能源行業(yè)定向就業(yè)人才培養(yǎng)合同
- 二零二五年度房屋拆除工程風險評估與處理合同
- 二零二五年度文創(chuàng)園區(qū)房東租賃服務(wù)協(xié)議
- 生物節(jié)律調(diào)節(jié)課件
- 2025年黑龍江民族職業(yè)學院單招職業(yè)技能測試題庫匯編
- 感恩父母課件:父母的愛如山如水
- 2020-2025年中國國有控股公司行業(yè)發(fā)展趨勢及投資前景預測報告
- 病區(qū)8S管理成果匯報
- 民法典題庫(附答案)
- 綏芬河市2025年上半年招考事業(yè)單位專業(yè)人員易考易錯模擬試題(共500題)試卷后附參考答案
- 2025復工復產(chǎn)安全教育培訓
- 2025年華僑港澳臺學生聯(lián)招考試英語試卷試題(含答案詳解)
- 閃耀明天 二聲部合唱簡譜
- 【語文大單元教學研究國內(nèi)外文獻綜述6400字】
評論
0/150
提交評論