ocp for nokiaoracle数据库资料.docx

上传人:b****6 文档编号:6184415 上传时间:2023-01-04 格式:DOCX 页数:66 大小:316.14KB
下载 相关 举报
ocp for nokiaoracle数据库资料.docx_第1页
第1页 / 共66页
ocp for nokiaoracle数据库资料.docx_第2页
第2页 / 共66页
ocp for nokiaoracle数据库资料.docx_第3页
第3页 / 共66页
ocp for nokiaoracle数据库资料.docx_第4页
第4页 / 共66页
ocp for nokiaoracle数据库资料.docx_第5页
第5页 / 共66页
点击查看更多>>
下载资源
资源描述

ocp for nokiaoracle数据库资料.docx

《ocp for nokiaoracle数据库资料.docx》由会员分享,可在线阅读,更多相关《ocp for nokiaoracle数据库资料.docx(66页珍藏版)》请在冰豆网上搜索。

ocp for nokiaoracle数据库资料.docx

ocpfornokiaoracle数据库资料

TableOfContents

1.OracleArchitecturalComponents

PhysicalFiles

BackgroungProcesses

MemoryArea(SGA)

HowOracleprocessesaquery

HowOracleprocessesaDMLstatement

HowOracleprocessesaCOMMITstatement

2.StartupandShutdownaDatabase

ParameterFile

STARTUPCommand

SHUTDOWNCommand

BasicDynamicPerformanceView

Howtoterminateausersession

3.CreateaDatabase

STEP1.Settheoperatingsystemvariables.

STEP2.Preparetheparameterfile.

STEP3.StarttheinstanceinNOMOUNTstage.

STEP4.Createthedatabase

STEP5.Runscriptstogeneratethedatadictionaryandaccomplishpostcreationsteps.

TroublesShootingofCreateDatabase

Whatyougetafterthedatabaseiscreated

4.MaintainingtheControlFile

FeaturesandContentsofControlFile

MultiplextheControlFile

5.MaintainingRedoLogFiles

FeaturesandContentsofRedoLogFiles

ViewsaboutRedoLogFiles

MaintenanceOperationsonRedoLogfiles

6.TablespacesandDataFiles

LogicalandPhysicalStructureofadatabase

SYSTEMandNon-SYSTEMTablespaces

CreatingTablespaces

FourMethodstoincreasethesizeoftablespaces

READ-ONLYTablespace

DroppingTablespaces

DictionaryViewsabouttablespacesanddatafiles

7.StorageStructureandRelationships

StorageClausePrecedence

ExtentAllocationandDeallocation

BlockSpaceUtilizationParameters

DictionayViewsaboutstorage

8.RollbackSegment

PurposeofRollbackSegment

HowtransactionsuseRollbackSegment

CreatingRollbackSegment

OfflineandDropRollbackSegment

DictionaryViewsaboutRollbackSegment

9.TemporarySegment

TemporarySegmentsinaTemporaryTablespace

Viewsabouttemporarysegments

10.ManagingTables

ROWIDinOracle8

HighWaterMark

ANALYZETABLEcommand

DBMS_ROWIDPackage

11.ManagingIndexes

B-TreeIndex

ReverseKeyIndex

BitmapIndex

Whenweneedtorebuildindexes?

ANALYZEINDEXcommand

12.MaintainingDataIntegrity

TypesofConstraints

ThreeStatesofConstraints

Deferredandnon-deferredconstraints

13.ClustersandIndex-Organizedtables

CreatingIndexCluster

CreatingHashClusters

Index-OrganizedTables

14.SQL*Loader,IMPORT/EXPORT

SQL*LoaderFeatures

FilesUsedbySQL*Loader

ComparingDirectandConventionalPathLoads

UsesofExportandImport

15.ManagingDatabaseUsers

ChecklistforCreatingUsers

ExamplesandGuidelinesaboutusers

DictionaryViewsaboutUsers

16.ManagingUserProfiles

UserProfilesandresourcelimits

Howtoenforceresourcelimitusingprofiles

PasswordManagement

DictionaryViewsaboutuserprofiles

17.ManagingPrivileges

SYSTEMPrivileges

Examplesaboutsystemprivileges

DictionaryViewsaboutsystemprivileges

ObjectPrivileges

Examplesaboutobjectprivileges

DictionaryViewsaboutobjectprivileges

18.ManagingRoles

Whatisrole?

ManapulatingRoles

FrequentlyAskedQuestionsinOracle8DatabaseAdministration

1.OracleArchitecturalComponents

PhysicalFiles

Datafiles

数据文件

storethedatadictionary,userobjects,andbefore-imagesofdatathataremodifiedbycurrenttransactions.Adatabasehasatleastonedatafile.

储存被当前事务修改的数据字典、用户对象和图象数据,一个数据库至少有一个数据文件。

Redologfiles

从作日志文件

containarecordofchangesmadetothedatabasetoensurereconstructionofthedataincaseoffailures.Adatabaserequiresatleasttworedologfiles.

包含一条在数据被更新失败时以保持数据回滚的记录。

一个数据库至少要求有两个重做日志文件。

Controlfiles

控制文件

containtheinformationneededtomaintainandverifydatabaseintegrity.Adatabaseneedsatleastonecontrolfile.

包含需要维护和验证数据库完整性的信息。

一个数据库至少需要一个控制文件。

BackgroungProcesses后台处理

Thebackgroundprocessesinaninstanceperformcommonfunctions执行共用函数thatareneededtoservicetherequestsfromseveralconcurrent并发users,withoutcompromising损害theintegrity完整andperformance性能ofthewholesystem.EachOracleinstancemayuseseveralbackgroundprocesses,dependingontheconfiguration,buteveryinstancecomprises包括thesefivebackgroundprocessesbydefault:

在一个实例中执行共用函数的后台处理需要几个并发用户的服务要求,并且不损害整个系统的性能和完整性。

每个oracle实例可以使用几个后台进程,依赖于配置。

但是每个实例包括下面5个后台进程:

DBWR

缓存和数据文件同步

Theserverprocessrecordschangestorollbackanddatablocksinthebuffercache.Thedatabasewriter(DBWR)writesthedirty脏buffersfromthedatabasebuffercachetothedatafiles.Itensuresthatsufficient充分的numberoffreebuffers—buffersthatcanbeoverwrittenwhenserverprocessesneedtoreadinblocksfromthedatafiles—areavailableinthedatabasebuffercache.Databaseperformance性能isimprovedbecauseserverprocessesonlymakechangesinthebuffercache,andtheDBWRdeferswritingtothe

datafilesuntiloneofthefollowingeventsoccur:

服务进程记录返回到回滚和在缓冲存储器中的数据块。

数据库记录器(DBWR)写脏数据从数据库缓冲存储器到数据文件中。

它保证充分的自由缓存数据量-当服务进程需要从数据块中读文件时缓存可以被覆盖的缓存-是有效的在缓存存储器中。

数据库性能被改变因为仅仅在缓存存储器中的服务进程被改变,并且DBWR延期写入数据文件直到下面的一个条件满足:

∙Thenumberofdirtybuffersreachesathresholdlin临界值value

∙脏缓冲存储器达到一个临界值

∙Aprocessscansaspecifiednumberofblockswhenscanningforfreebuffersandcannotfindany

∙当一个进程扫描一个指定的数据块,发现剩余缓存数据量不存在时。

∙Atimeoutoccurs

∙超时出现

∙ADBWRcheckpointcanbetriggeredbyvarious不同的eventssuchasclosing

ofthedatabase,(Checkpointisameansofsynchronizing同步thedatabasebuffercachewiththedatafile.)

∙一个DBWR检查点象被关闭数据库这样的不同事件触发(检查点:

数据库缓存和数据文件保持同步)。

LGWR

回滚缓存与回滚日志同步

TheLogWriter(LGWR)isabackgroundprocessthatwritesentries入口fromtheredologbufferintotheredologfiles.TheLGWRperformssequential连续的writestotheredologfileunderthefollowingsituations情况:

日志同步是一个从回滚日志缓存到回滚日志文件同步入口的后台进程。

LGWR在如下条件下执行连续的回滚缓冲存储器数据与回滚日志文件同步:

∙Whentheredologbufferisone-thirdfull

∙回滚缓冲存储器写满1/3时。

∙Whenatimeoutoccurs(everythreeseconds)

∙超时出现(每三秒)

∙BeforeDBWRwritesmodifiedblocksinthedatabasebuffercachetothe

∙datafiles

∙数据库缓存未与数据文件同步,但此时数据库缓存被更新,缓存数据与文件同步。

∙Whenatransactioncommits

∙事务提交时。

SMON

∙Performsautomaticinstancerecovery.

∙完成自动实例恢复

∙Reclaims收回spaceusedbytemporarysegments段nolongerinuse.

∙收回被临时段不再使用的空间

∙Merges合并contiguous连续的areasoffreespaceinthedatafiles.

∙合并在数据文件中自由的连续空间

PMON

∙Cleansupabnormallyterminatedconnections.

∙清除不正常的终端连接

∙Rollsbackuncommittedtransactions.

∙回滚未提交的事务

∙Releaseslocksheldbyaterminatedprocess.

∙释放一个终端进程的锁

∙FreesSGAresourcesallocated分配tothefailedprocess.

∙空闲SGA资源分配给失败的进程

CKPT

CheckpointProcessisresponsible对..负责forupdatingthedatabasestatusinformationwheneverchangesinthebuffercachearepermanently永久的recordedinthedatabase.

检查点进程负责更新任意时间缓冲存储器内容被改变时的数据库状态信息,被永久写入数据库

MemoryArea(SGA)

SharedPool

共享池

∙SizedefinedbySHARED_POOL_SIZEinparameterfile

∙大小被定义在参数文件的SHARED_POOL_SIZE字段中

∙Librarycachecontainsstatementtext,parsedcode,andanexecutionplan.Sincethelibrarycachestoresthisinformation,ifaqueryisreexecuted可重新执行beforeitsexecutionplanisagedoutbyotherstatements,theserverprocessdoesnotneedtoparse分析thestatement.Thusthelibrarycachehelpsimprovetheperformanceofapplications.

∙库缓存中包含sql语句,解析码和一个执行计划。

一旦库缓存中存储了这个信息,假如一个查询的执行计划被其他语句超出,它是可重新执行的,服务进程不必对此分析。

这样,库缓存帮助改善了应用的性能。

∙Datadictionarycachestoresthemostrecentlyuseddatadictionaryinformation,suchastableandcolumndefinitions,usernames,passwords,andprivileges.Duringtheparse分析phase阶段,theserverprocesslooksfortheinformationinthedictionarycachetoresolve解决theobjectnamesspecified指定intheSQLstatement语句andtovalidate使..s生效theaccessprivileges.Ifnecessary,theserverprocessinitiates启动theloadingofthisinformationfromthedatafiles.

∙数据字典缓存存储最近用过的数据字典信息,例如表、列定义、用户名、密码和用户权限。

在分析阶段,服务进程寻找在字典缓存中的信息以解决在sql语句中指定的对象名和使存取权限生效。

假如有必要,服务进程启动从数据文件装载所需信息。

DatabaseBufferCache

数据库缓冲存储器

∙NumberofbuffersdefinedbyDB_BLOCK_BUFFERS

∙缓存数量被DB_BLOCK_BUFFERS定义

∙SizeofabufferbasedonDB_BLOCK_SIZE

∙缓存大小基于DB_BLOCK_SIZE

∙Storesthemostrecentlyusedblocks

∙储存最近访问过的块数据

RedoLogBuffer

回滚日志存储器

∙SizedefinedbyLOG_BUFFER

∙被LOG_BUFFER定义尺寸

∙Recordschangesmadethroughtheinstance

∙记录实例的变更

∙Usedsequentially顺序

∙顺序使用

∙Circular环形的buffer

∙环形存储器

HowOracleprocessesaquery

Oracle如何处理一个查询

1.Parse:

Inthisstage,theuserprocesssendsthequerytotheserverprocesswitharequesttoparseorcompilethequery.Theserverprocesschecksthevalidity有效ofthecommandandusestheareaintheSGAknownasthesharedpooltocompilethestatement.Attheendofthisphase,theserverprocessreturnsthestatus—thatis,successorfailureoftheparsephase—totheuserprocess.

2.分析:

在这个阶段,用户进程以一个问题的形式将查询发给服务进程,来分析或者编译这个查询。

服务进程检查这个有效的命令,并且在SGA分配的空间中(即通常所说的共享池)来编译这个语句。

最后,服务进程返回状态-也就是,成功或失败的分析阶段-给用户进程。

3.Execute:

Duringthisphaseintheprocessingofaquery,theserverprocesspreparestoretrievethedata.

4.执行:

在处理查询阶段,服务进程准备检索数据

5.Fetch:

Therowsthatareretrievedbythequeryarereturnedbytheservertotheuserduringthisphase.Dependingontheamountofmemoryusedforthetransfer,oneormorefetchesarerequiredtotransfertheresultsofaquerytotheuser.

6.取到:

在这个阶段,查询检索的数据被服务返回给用户。

依赖于所用内存大小,一个或更多的检索结果返回给用户。

HowOracleprocessesaDMLstatement

Oracle如何处理一个DML(数据库操纵语言)语句

1.Theserverprocessreadsthedataandrollbackblocksfromthedatafiles,iftheyarenotalreadyinthebuffercache.

2.服务进程从数据文件中读取数据和回滚块,如果假定它们没有在缓冲存储器中。

3.Copiesoftheblocksthatarereadareplacedinthebuffercache.

4.将读取的数据块的拷贝放置在缓冲存储器中。

5.Theserverprocessplaceslocksonthedata.

6.服务进程锁数据

7.Theserverprocessrecordsthechangestobemadetotherollback(before-image)andtothedata(newvalue)intheredologbuffer.

8.服务进程记录回滚的起始点和新数据记录点到回滚日志缓冲器。

9.Theserverprocessrecordsthebefore-imagetotherollbackblockandupdatesthedatablock,both

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 艺术

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1