ocp認(rèn)證考試043題庫(kù)_第1頁(yè)
ocp認(rèn)證考試043題庫(kù)_第2頁(yè)
ocp認(rèn)證考試043題庫(kù)_第3頁(yè)
ocp認(rèn)證考試043題庫(kù)_第4頁(yè)
ocp認(rèn)證考試043題庫(kù)_第5頁(yè)
已閱讀5頁(yè),還剩80頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1.YouneedtochecktheEMP_EASTpartitionintheEMPLOYEES

tableforphysicalcorruptions.Youalsoneedtoverifythattherows

belongtothecorrectpartition.Whichoptioncouldyouuse?

A.LogMiner

B.theDBNEWIDutility

C.theDBVERIFYutility

D.theANALYZEcommand

E.theRMANREPORTcommand

F.theRMANCROSSCHECKcommand

G.theRMANBLOCKRECOVERcommand

答案:D

解析:

DBVERIFY:是一種外部命令行實(shí)用程序,可以對(duì)脫機(jī)或聯(lián)機(jī)的數(shù)據(jù)庫(kù)

執(zhí)行物理數(shù)據(jù)結(jié)構(gòu)完整性檢查??梢詫?duì)備份文件與聯(lián)機(jī)文件(或文件

片段)運(yùn)行此實(shí)用程序。只能檢查數(shù)據(jù)文件;不能檢查重做日志文件

ANALYZE:使用ANALYZE命令可以驗(yàn)證表或表分區(qū)的結(jié)構(gòu),以及索引

或索引分區(qū)的結(jié)構(gòu)。

要分析的對(duì)象必須位于本地計(jì)算機(jī),并且必須是在您自己的方案中,

或者必須擁有ANALYZEANY系統(tǒng)權(quán)限。CASCADE選項(xiàng)可以驗(yàn)證對(duì)象,

包括該對(duì)象的所有相關(guān)對(duì)象。不將塊標(biāo)記為軟損壞;只報(bào)告軟損壞情

RMANCROSSCHECK:當(dāng)手工刪除了歸檔日志以后,Rman備份會(huì)檢測(cè)到

日志缺失,從而無(wú)法進(jìn)一步繼續(xù)執(zhí)行。所以此時(shí)需要手工執(zhí)行

crosscheck過(guò)程,之后Rman備份可以恢復(fù)正常。

根據(jù)題意驗(yàn)證分區(qū)表的block,驗(yàn)證行是否屬于正確的分區(qū),所以要

選ANALYZE

2.Youexecutethefollowingcommandtoenableasessioninresumab

lemode:

SQL>ALTERSESSIONENABLERESUMABLETIMEOUT60;

Whatistheimpactofatimeoutonthestatementsbeingsuspended?

A.Thestatementsremainsuspendedforatleast60seconds.

B.Thestatementsaresuspendedfor60secondsandthentheyareexecute

d.

C.Thesuspendedstatementserroroutiftheproblemisnotrectifiedwithi

n60seconds.

D.Thestatementsareautomaticallysuspended60secondsafteranerroris

received,andthenattempttoexecutenormallyagain.

答案:C

解析:Oracle提供了一種方法,當(dāng)對(duì)數(shù)據(jù)庫(kù)執(zhí)行操作時(shí),出現(xiàn)分配

存儲(chǔ)空間失敗的錯(cuò)誤時(shí),Oracle不是簡(jiǎn)單的返回錯(cuò)誤信息,并回滾

整個(gè)事務(wù),而是將執(zhí)行的語(yǔ)句置于懸掛狀態(tài),等待一段時(shí)間,在等待

時(shí)間內(nèi),如果問(wèn)題得到解決,則語(yǔ)句會(huì)繼續(xù)執(zhí)行下去,如果問(wèn)題一直

無(wú)法解決,則會(huì)報(bào)錯(cuò)并回滾。產(chǎn)生SUSPEND的前提是當(dāng)前的

session處于ENABLERESUMABLE狀態(tài)。而且發(fā)出的語(yǔ)句遇到下面三

種錯(cuò)誤:空閑空間不足、達(dá)到最大的MAXEXTENTS和達(dá)到用戶(hù)的空間

QUOTA限制。

C選項(xiàng),如果在60s內(nèi)沒(méi)有解決問(wèn)題,掛起狀態(tài)將報(bào)錯(cuò)。按理說(shuō)A選

項(xiàng)也應(yīng)該是對(duì)的,就是說(shuō)掛起狀態(tài)會(huì)保留至少60s,不知道是不是至

少出的錯(cuò).

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í)例添加和刪除磁盤(pán),在沒(méi)有完之前數(shù)據(jù)庫(kù)會(huì)很慢,用什么方

法可以在不影響數(shù)據(jù)庫(kù)

速度的情況下添加或刪除磁盤(pán)

Striping:條帶化

條帶化是把連續(xù)的數(shù)據(jù)分割成相同大小的數(shù)據(jù)塊,把每段數(shù)據(jù)分別寫(xiě)

入到陣列中不同磁盤(pán)上的方法。此技術(shù)非常有用,它比單個(gè)磁盤(pán)所能

提供的讀寫(xiě)速度要快的多,當(dāng)數(shù)據(jù)從第一個(gè)磁盤(pán)上傳輸完后,第二個(gè)

磁盤(pán)就能確定下一段數(shù)據(jù)。數(shù)據(jù)條帶化正在一些現(xiàn)代數(shù)據(jù)庫(kù)和某

些RAID硬件設(shè)備中得到廣泛應(yīng)用。

ASM_POWER_LIMIT:該參數(shù)控制重新平衡操作的速度。值的范圍在

1到11之間,11表示速度最快。如果省略,該值將默認(rèn)為L(zhǎng)從屬

進(jìn)程的數(shù)量可以從手動(dòng)重新平衡命令(POWER)中指定的并行級(jí)別派

生,或者通過(guò)ASM.POWER.LIMIT參數(shù)派生。

ALTERDISKGROUPdgladddisk'ddd'REBALANCEPOWER5;

最小值0代表不做Rebalance

最大值11代表最快的速度,也意味最嚴(yán)重的性能影響

1代表最慢的速度和最小的性能影響

重新平衡不會(huì)妨礙任何數(shù)據(jù)庫(kù)操作。重新平衡進(jìn)程主要會(huì)對(duì)系統(tǒng)上

的I/O負(fù)載產(chǎn)生影響。

重新平衡的強(qiáng)度越高,它加在系統(tǒng)上的I/O負(fù)載也就越大。這樣,

可供數(shù)據(jù)庫(kù)I/O使用的

I/O帶寬就越少。

如果ASM環(huán)境是使用命令行而不是通過(guò)EM創(chuàng)建的,則必須先創(chuàng)建磁

盤(pán)組然后才能裝

載。

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è)置值后只會(huì)增加,不會(huì)減少

5.Manually,yousettheconsumergroupofallofthenewlycreatedu

serstoMYDB_GRP.Youwanttheuserstobeabletochangetheirco

nsumergroupsaspertheapplicationrequirement.

Whatwasthefirststepthatwasneededintheprocesstoachievethis

objective?

A.TheusermusthavebeengrantedtheDBArole.

B.Theusermusthavebeengrantedtheswitchprivilegeasapartofarole.

C.TheusermusthavebeengrantedtheResourceManageradministrator

privilege.

D.TheusermusthavebeengrantedtheswitchprivilegebyusingtheDB

MS_RESOURCE_MANAGER_PRIVSpackage.

答案:D

解析:

資源管理概述:

資源管理器有三個(gè)部件組成:

資源用戶(hù)組(Resourceconsumergroup)

資源規(guī)劃(Resourceplan)

資源分配方法(Resourceallocationmethod)

資源計(jì)劃目錄(Resourceplandirectives)

它們的功能如下:

資源用戶(hù)組:根據(jù)數(shù)據(jù)庫(kù)資源處理需求,將用戶(hù)會(huì)話(huà)分成組資源規(guī)

劃:指定哪些資源分配給資源用戶(hù)的命令資源分配方法:數(shù)據(jù)庫(kù)資

源管理器分配特殊資源時(shí)采用的方法,由資源用戶(hù)組和資源規(guī)劃來(lái)使

用。

資源規(guī)劃命令:管理員使用這些命令將資源用戶(hù)組與特殊規(guī)劃連接

起來(lái),并在資源用戶(hù)組之間分配資源。

數(shù)據(jù)庫(kù)資源管理器可以完成:

.確保某些用戶(hù)處理少量的資源,不考慮對(duì)系統(tǒng)的加載和用戶(hù)的數(shù)量。

.按比例將CPU時(shí)間分配給不同的用戶(hù)和程序,分配有效的處理資源。

.限制一組用戶(hù)可以使用的并行度。

.對(duì)實(shí)例進(jìn)行配置,使其能使用特殊的資源分配方法。例如,DBA不

用關(guān)閉數(shù)據(jù)庫(kù)實(shí)例就可以動(dòng)態(tài)地改變這些配置方法。

授予用戶(hù)“切換權(quán)限”:

BEGIN

//撤消用戶(hù)

dbms-resource-manager-privs.revoke-switch-consumer-group('J

OSEN',,SDL‘);

〃添加用戶(hù)并授于切換特權(quán)選項(xiàng)

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;

啟動(dòng)backup于17-3月-H

使用通道ORA_DISK_1

通道ORA_DISK_1:啟動(dòng)全部數(shù)據(jù)文件備份集

通道ORA_DISK_1:正在指定備份集中的數(shù)據(jù)文件

RMAN-03009:backup命令(ORA_DISK_1通道

上,在03/17/201114:05:13上)

失敗

ORA-19602:無(wú)法按NOARCHIVELOG模式備份或復(fù)制活動(dòng)文件

8.Youlostatemporaryfilethatbelongstothedefaulttemporarytab

lespaceinyourdatabase.Fromtheoptionsprovided,whichapproac

hwouldyoutaketosolvetheproblem?

A.flashbackthedatabase

B.importthetemporarytablespacefromthelastexport

C.restoreallthedatafilesandtemporaryfilesfromthelastfulldatabaseb

ackupandperformarecovery

D.notperformarecovery,butcreateanewtemporarytablespace,makeit

thedefaulttemporarytablespaceandthendroptheoldtablespace

答案:D

解析:你的臨時(shí)數(shù)據(jù)文件丟失了(屬于臨時(shí)表空間),這時(shí)不用去閃

回或者回復(fù),直接刪除原來(lái)的舊有臨時(shí)表空間,新建一個(gè)新的就行了。

創(chuàng)建臨時(shí)表空間

createtemporarytablespaceTEMPITEMPFILE'E:ORACLEORADATAO

RCL9tempO2.DBF'SIZE512MREUSEAUTOEXTENDONNEXTIMMAXSIZE

UNLIMITED;

改變?nèi)笔∨R時(shí)表空間為剛剛創(chuàng)建的新臨時(shí)表空間tempi

alterdatabasedefaulttemporarytablespacetempi;

刪除原來(lái)臨時(shí)表空間

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就可以

恢復(fù)

2.如果不看備份腳本,目前從備份文件或是catalog信息無(wú)法判斷是

差異增量還是累計(jì)增量的

3.rman>createscriptscl{

deletenopromptbackup;

backupascompressedbackupsetfulldatabase;

backuparchivelogall;}

只有catalog下情況用rman>listscriptnames;

1個(gè)catalog可以對(duì)多庫(kù)(至于庫(kù)名DB_NAME是否唯一需實(shí)驗(yàn))

rman>run{executesriptscl};可以寫(xiě)成批處理里面

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;

只要以上兩個(gè)不一致,就需要resetlog打開(kāi)

alterdatabaseopenresetlogs;即截?cái)喽嘤嗟膕en,resetsen更

a.截?cái)鄐en(有疑問(wèn))(warehous)

b.把當(dāng)前日志歸檔

c.序列號(hào)從1開(kāi)始了重建日志了

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記錄的是過(guò)去24小時(shí)的flashback區(qū)

讀寫(xiě)統(tǒng)計(jì)

—每小時(shí)采樣一次,并記錄在該視圖相應(yīng)的數(shù)據(jù)字典中,

BEGIN-TIMEDATE,

END.TIMEDATE這兩個(gè)參數(shù)是采樣開(kāi)始和結(jié)束時(shí)間。

V$flashback-database-stat這個(gè)視圖用來(lái)對(duì)Flashbacklog空間

情況進(jìn)行更細(xì)粒度的記錄和估計(jì)。這個(gè)視圖以小時(shí)為單位記錄單位

時(shí)間內(nèi)數(shù)據(jù)庫(kù)的活動(dòng)量,F(xiàn)lashback_Data代表Flashbacklog產(chǎn)生

數(shù)量,DB-Date代表數(shù)據(jù)改變數(shù)量,Redo.Date代表日志數(shù)量,通過(guò)

這3個(gè)數(shù)量可以反映出數(shù)據(jù)的活動(dòng)特點(diǎn),更準(zhǔn)確的預(yù)計(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掉的表

還原表按后進(jìn)先出(LIFO)算法.

清除時(shí),先進(jìn)先出(FIFO)算法自動(dòng)將回收站對(duì)象從回收站中清除.

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語(yǔ)句同時(shí)提供了一個(gè)renameto的子句,如果要恢

復(fù)的表

在當(dāng)前的schema中已經(jīng),存在同名的表,建議你在恢復(fù)時(shí)通過(guò)

renameto子句為

待恢復(fù)的表指定一個(gè)新的表名,不然數(shù)據(jù)庫(kù)會(huì)報(bào)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的表恢復(fù)

(1)FlashbackDrop不能恢復(fù)參照完整性,這很容易理解,畢竟在

該表刪除之

后,被參照表是否有修改,它已經(jīng)無(wú)法控制了,因此如果該表有主外

鍵約束的話(huà),

恢復(fù)之后,該約束是DISABLE狀態(tài),需要DBA手工處理。

(2)所操作的表必須是存在于本地管理表空間中。

FlashbackDrop不能恢復(fù)字典管理表空間中被刪除的表。

(3)被恢復(fù)的表的關(guān)聯(lián)對(duì)象,如其索引、約束的名稱(chēng)不會(huì)自動(dòng)恢復(fù)

成刪除前的名稱(chēng),而是系統(tǒng)自動(dòng)生成的名稱(chēng),如果你對(duì)表的索引、約

束有相應(yīng)命名規(guī)范,那在恢復(fù)表之后,需要DBA手工將索引、約束等

改名。另外位圖索引不能被恢復(fù),因?yàn)閯h除表時(shí)位圖索引信息并不會(huì)

被放入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)錯(cuò)誤:

ORA-08189:因?yàn)槲磫⒂眯幸苿?dòng)功能,不能閃回表

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、如果一個(gè)表被刪除后是否還是可以使用閃回表呢(不能)

flashbacktabletest5tobeforedrop;

d、在一個(gè)transaction中,閃回將被執(zhí)行

e、閃回表后,同時(shí)會(huì)恢復(fù)在其上的索引

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語(yǔ)句可以使用閃回表

a、update

b、insert

這應(yīng)該證明drop表或者truncate表是無(wú)法使用閃回的,同時(shí)改變

表的結(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只能看到某一點(diǎn)的對(duì)象狀

態(tài),F(xiàn)lashbackVersionQuery可以看到過(guò)去某個(gè)時(shí)間段內(nèi),記錄的演

變歷史。

(快速定位,因?yàn)槭清e(cuò)誤的修改表記錄,只能閃回查詢(xún))

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語(yǔ)句,ddl不行,ddl以后,前面的dml也查詢(xún)不到

c、沒(méi)必要非要啟用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

解析:詳見(jiàn)上題

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只能看到某一點(diǎn)的對(duì)象狀

態(tài),F(xiàn)lashbackVersionQuery可以看到過(guò)去某個(gè)時(shí)間段內(nèi),記錄的演

變歷史。

(快速定位,因?yàn)槭清e(cuò)誤的修改表記錄,只能閃回查詢(xún))

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,;

該查詢(xún)將返回以STATUS分組的各狀態(tài)回滾信息所使用的空間量,一

般存在三種STATUS狀態(tài):

EXPIRED,UNEXPIRED,ACTIVE,ACTIVE表示目前仍活躍的事務(wù)相關(guān)

回滾信息,UNEXPIRED

表示雖然事務(wù)已經(jīng)結(jié)束但回滾信息保留的時(shí)間仍未超過(guò)實(shí)例參數(shù)

UNDO.RETENTION所設(shè)定的值,EXPIRED表示回滾信息保留時(shí)間已超

過(guò)UND0_RETENTI0N所設(shè)定的值。

在UNDO表空間未啟用guarantee選項(xiàng)的情況下(當(dāng)前使用情況),

新事務(wù)的回滾空間分配

遵循以下依據(jù):

a)尋找不存在ACTIVE區(qū)間的回滾段,若沒(méi)有則創(chuàng)建一個(gè)新的回滾段,

若空間不允許生成新段,則返回錯(cuò)誤。

b)如果有一個(gè)回滾段被選中,但是其中空閑的空間并不足以存儲(chǔ)該

事務(wù)的回滾信息,那么它將嘗試創(chuàng)建區(qū)間,如果表空間上沒(méi)有空間,

那么將會(huì)進(jìn)入下一步。

c)如果創(chuàng)建新區(qū)間失敗,它將會(huì)搜索其他回滾段中的EXPIRED區(qū)間

并重用。

d)如果其他回滾段中沒(méi)有EXPIRED區(qū)間可使用,那么它會(huì)繼續(xù)搜索

其他回滾段中

UNEXPIRED區(qū)間并重用,注意事務(wù)不會(huì)重用本回滾段中的

UNEXPIRED區(qū)間,故UNEXPIRED的

回滾空間僅部分可以為Oracle重用;若仍得不到所需則返回錯(cuò)誤。

結(jié)論(warehouse):flashback-transaction_query中的數(shù)據(jù)來(lái)自

undodatafile,只要事務(wù)

對(duì)應(yīng)的beforeimage在undodatafile中存在,

flashback-transaction-query里面就可

以查詢(xún)到數(shù)據(jù)...目前沒(méi)發(fā)現(xiàn)受那個(gè)參數(shù)的制約

25.Byusingthetransactionidentifierprovidedbyforapartic

ularrowchange,youcanusetheFlashbackTransactionQuerytosee

theoperationperformedbythetransaction.

A.FlashbackTable

B.FlashbackDatabase

C.FlashbackVersionsQuery

D.theRMANREPORTcommand

E.theDBA_PENDING_TRANSACTIONSview

答案:C

解析:

a.flashbackversionsquery

flashbackversionsquery能夠得到某個(gè)時(shí)間段內(nèi),某些數(shù)據(jù)行的所

有不同版本。這里的版本以事務(wù)為單位,事務(wù)中的每次數(shù)據(jù)變化就是

一個(gè)版本

b.flashbacktransactionquery

flashbacktransactionquery其實(shí)就是查詢(xún)歷史的事務(wù)信息,通過(guò)

查詢(xún),我們可以得到過(guò)去某個(gè)事務(wù)操作信息,包括改變的數(shù)據(jù)行rowid,

事務(wù)開(kāi)始和結(jié)束時(shí)間,事務(wù)對(duì)應(yīng)的loggonuser,以及用來(lái)撤銷(xiāo)某個(gè)

數(shù)據(jù)行改變的undosql等。

26.Therewasmediafailureandyouneedtocheckthedatafilesfora

nyblockcorruption.Whichoptionwouldyouusetocreateareporto

nanycorruptionsfoundwithinthedatabase?

A.theDBNEWIDutility

B.theDBVERIFYutility

C.theANALYZEcommand

D.theRMANREPORTcommand

E.theRMANCROSSCHECKcommand

F.theCHECK_OBJECTprocedureoftheDBMS_REPAIRpackage

答案:B

解析:

DBVERIFY:是一種外部命令行實(shí)用程序,可以對(duì)脫機(jī)或聯(lián)機(jī)的數(shù)據(jù)庫(kù)

執(zhí)行物理數(shù)據(jù)結(jié)構(gòu)完整性檢查。可以對(duì)備份文件與聯(lián)機(jī)文件(或文件

片段)運(yùn)行此實(shí)用程序。只能檢查數(shù)據(jù)文件;不能檢查重做日志文件

ANALYZE:使用ANALYZE命令可以驗(yàn)證表或表分區(qū)的結(jié)構(gòu),以及索引

或索引分區(qū)的結(jié)構(gòu)。

要分析的對(duì)象必須位于本地計(jì)算機(jī),并且必須是在您自己的方案中,

或者必須擁有ANALYZEANY系統(tǒng)權(quán)限。CASCADE選項(xiàng)可以驗(yàn)證對(duì)象,

包括該對(duì)象的所有相關(guān)對(duì)象。不將塊標(biāo)記為軟損壞;只報(bào)告軟損壞情

RMANCROSSCHECK:當(dāng)手工刪除了歸檔日志以后,Rman備份會(huì)檢測(cè)到

日志缺失,從而無(wú)法進(jìn)一步繼續(xù)執(zhí)行。所以此時(shí)需要手工執(zhí)行

crosscheck過(guò)程,之后Rman備份可以恢復(fù)正常。

27.TheEMPLOYEEStableisstoredintheUSERStablespace.You

needtocheckiftheEMPLOYEEStableisaffectedbytheblockcorr

uptionfoundintheUSERStablespace.Whichoptionwouldyouuse?

A.theDBNEWIDutility

B.theANALYZEcommand

C.theRMANLISTcommand

D.theRMANREPORTcommand

E.theRMANCROSSCHECKcommand

F.theRMANBLOCKRECOVERcommand

答案:B

解析:見(jiàn)上題

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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 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ì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論