您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 数据库 > Orcl0(OracleArchitecturalComponents)
1实验安排•地点:信息楼603•网络工程第2-5,7-16周,周四1-2节第11,14周,周四3-4节•软件工程第2-5,7-15周,周四7-8节第10,13,16周,周四3-4节•兴湘第2-5,7-16周,周三3-4节第12,15周,周四3-4节Copyright©OracleCorporation,Allrightsreserved.OracleArchitectureandManagement3Oracle的发展变迁1977年LarryEllison、BobMiner和EdOates共同创建了软件开发实验室1979年,Oracle的第一个产品被发行。1985年,Oracle公司推出了版本5,引入了Client/Server计算1988年,Oracle6版本,可以运行在多种平台和操作系统上1998年,Oracle8i,世界上第一个全面支持Internet的数据库2001年6月,在OracleOpenWorld大会中,Oracle发布了Oracle9i2003年9月,Oracle10g发布,g(grid)2007年11月,Oracle11g正式发布,Oracle11gr22013年6月,Oracle12c正式上市,c(cloud),64位。4OracleArchitecturalComponents5OverviewofPrimaryComponentsInstanceSGARedologbuffercacheSharedpoolDataDict.cacheLibrarycacheDBWRSMONPMONCKPTLGWROthersUserprocessServerprocessPGAControlfilesDatafilesArchivedlogfilesParameterfilePasswordfileRedologfilesDatabaseDatabasebuffercache6OracleServerAnOracleserver:•Isadatabasemanagementsystemthatprovidesanopen,comprehensive,integratedapproachtoinformationmanagement•ConsistsofanOracleinstanceandanOracledatabaseOracleServer7OracleInstanceAnOracleinstance:•IsameanstoaccessanOracledatabase•Alwaysopensoneandonlyonedatabase•ConsistsofmemoryandprocessstructuresBackgroundstructuresMemorystructuresSGARedologbuffercacheDatabasebuffercacheSharedpoolDBWRSMONPMONCKPTLGWROthersDataDictionarycacheLibrarycacheInstance8EstablishingaConnectionandCreatingaSessionConnectingtoanOracleinstanceconsistsofestablishingauserconnectionandcreatingasession.ConnectionestablishedSessioncreatedDatabaseuserUserprocessOracleserverServerprocess9OracleDatabaseAnOracledatabase:•Isacollectionofdatathatistreatedasaunit•ConsistsofthreefiletypesControlfilesDatafilesArchivedlogfilesParameterfilePasswordfileRedologfilesOracleDatabase10PhysicalStructureThephysicalstructureofanOracledatabaseisdeterminedbytheoperatingsystemfilesthatprovidetheactualphysicalstoragefordatabaseinformation.•Controlfiles•Datafiles•RedologfilesControlfilesDatafiles(includesdatadictionary)HeaderOnlineredologfiles)11MemoryStructureOracle’smemorystructureconsistsoftwomemoryareasknownas:•SystemGlobalArea(SGA):Allocatedatinstancestartup,andisafundamentalcomponentofanOracleInstance•ProgramGlobalArea(PGA):Allocatedwhentheserverprocessisstarted12SystemGlobalArea(SGA)•TheSGAconsistsofseveralmemorystructures:–Sharedpool–Databasebuffercache–Redologbuffer–Otherstructures(e.g.lockandlatchmanagement,statisticaldata)•TherearetwooptionalmemorystructuresthatcanbeconfiguredwithintheSGA:–Largepool–Javapool13SystemGlobalArea(SGA)•SGAisdynamicandsizedusingSGA_MAX_SIZE.•SGAmemoryallocatedandtrackedingranulesbySGAcomponents–Contiguousvirtualmemoryallocation–SizebasedonSGA_MAX_SIZE14SharedPoolThesharedpoolisusedtostorethemostrecentlyexecutedSQLstatementsandthemostrecentlyuseddatadefinitions.•Itconsistsoftwokeyperformance-relatedmemorystructures:–Librarycache–Datadictionarycache•SizedbytheparameterSHARED_POOL_SIZE.SharedpoolDatadictionarycacheLibrarycacheALTERSYSTEMSETSHARED_POOL_SIZE=64M;15LibraryCacheThelibrarycachestoresinformationaboutthemostrecentlyusedSQLandPL/SQLstatements.Thelibrarycache:•Enablesthesharingofcommonlyusedstatements•Ismanagedbyaleastrecentlyused(LRU)algorithm•Consistsoftwostructures:–SharedSQLarea–SharedPL/SQLarea•Hasitssizedeterminedbythesharedpoolsizing16DataDictionaryCacheThedatadictionarycacheisacollectionofthemostrecentlyuseddefinitionsinthedatabase.•Itincludesinformationaboutdatabasefiles,tables,indexes,columns,users,privileges,andotherdatabaseobjects.•Duringtheparsephase,theserverprocesslooksatthedatadictionaryforinformationtoresolveobjectnamesandvalidateaccess.•Cachingthedatadictionaryinformationintomemoryimprovesresponsetimeonqueries.•Sizeisdeterminedbythesharedpoolsizing.17DatabaseBufferCacheThedatabasebuffercachestorescopiesofdatablocksthathavebeenretrievedfromthedatafiles.•Itenablesgreatperformancegainswhenyouobtainandupdatedata.•Itismanagedthroughaleastrecentlyused(LRU)algorithm.•DB_BLOCK_SIZEdeterminestheprimaryblocksize.Databasebuffercache18RedoLogBufferCacheTheredologbuffercacherecordsallchangesmadetothedatabasedatablocks.•Itsprimarypurposeisrecovery.•Changesrecordedwithinarecalledredoentries.•Redoentriescontaininformationtoreconstructorredochanges.•SizeisdefinedbyLOG_BUFFER.Redologbuffercache19UserprocessProgramGlobalArea(PGA)ThePGAismemoryreservedforeachuserprocessthatconnectstoanOracledatabase.StackspaceSessioninformationsortarea,cursorinformationSGASharedSQLareasSGASessioninformationPGADedicatedserverSharedserverServerprocessSharedSQLareasStackspacesortarea,cursorinformation20ProcessStructureAnOracleprocessisaprogramthatdependingonitstypecanrequestinformation,executeaseriesofsteps,orperformaspecifictask.Oracletakesadvantageofvarioustypesofprocesses:•Userprocess:StartedatthetimeadatabaseuserrequestsconnectiontotheOracleserver•Serverprocess:ConnectstotheOracleInstanceandisstartedwhenauserestablishesasession.•Backgroundprocess:AvailablewhenanOracleinstanceisstarted21UserProcessAuserprocessisaprogramthatrequestsinteractionwiththeOracleserver.•Itmustfirstestablishaconnection.•Itdoesnotinteractdirectlywithth
本文标题:Orcl0(OracleArchitecturalComponents)
链接地址:https://www.777doc.com/doc-8661 .html