版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、ORACLE Database Concepts,Administration 系列讲座(二),樊若蕻 数据库课题,计算中心 2003.4,基本概念复习,了解oracle的结构很重要,特别是从调试的角度,如果不知道Oracle是如何操作的,就不可能适当地调试一个Oracle数据库。 。Oracle使用内存方式 。Oracle使用磁盘文件方式和各类进程之间的互相作用方式,理解数据库和实例 1.数据库,在Oracle领域里,数据库指的是文件集合,这些文件用来存储管理相关数据。 一个oracle数据库由物理文件,内存区和进程组成。 数据库中的数据存储在磁盘上的物理文件中。数据被使用时,则吊入内存。,
2、files:不同类型,Database files: .数据文件: datafiles .控制文件: control files .重做日志: redo log files .跟踪文件及警告日志:trace files,alert files,files:不同类型,Nondatabase files: .参数文件: parameter file .口令文件: password file,1.1.Data files:,Every Oracle database has one or more physical datafiles.The datafiles contain all the da
3、tabase data. 数据文件典型地代表了根据他们使用的磁盘空间和数量所决定的一个Oracle数据库的容积。,内容:,。表数据 。索引数据 。数据字典定义 。回滚数据信息 。存储过程,函数和数据包的代码 。常用来排序的临时数据,由于性能原因,每一种类型的数据放在相应的一个或一系列文件中,将这些文件放在不同的磁盘中。 types: .data dictionary .data .redo data .index .temporary data ,1.2 Control files:,存储有关数据库状态的信息 Oracle 建议应该镜像控制文件(2/3) 每一个控制文件的内容是完全相同的,控制
4、文件内容:,。数据库名 。表空间信息 。所有数据文件的名字和位置 。所有redo日志文件的名字和位置 。当前的日志序列号 。检查点信息 。关于redo日志和归档的当前状态信息,Control file,控制文件把Oracle引导到数据库文件的其它部分。启动一个实例时,Oracle 从参数文件中毒区控制文件的名字和位置。安装数据库时,Oracle 打开控制文件。最终打开数据库时,Oracle 从控制文件中读取数据文件的列表并打开其中的每个文件。,参数文件,控制文件,控制文件,日志文件,日志文件,数据文件,数据文件,每个控制文件的 内容是完全相同,指向控制文件,控制文件指向数据和日志文件,1.3
5、redo log files:,Every Oracle database has a set of two or more redo log files. (1). Online redo log file: 循环使用 (2). Archived redo log file (offline),1.4 Trace Files and Alert Files,Each server and background process can write to an associated trace file. 在instance 中运行的每一个background process 都有一个trace
6、 file 与之相连。Trace file 记载background process 所遇到的重大事件的信息。,Alert file,The alert file is a special trace file. Each database also has an Alert log. The Alert file of a database is a chronological log of messages and errors,1.5 Parameter files,包括大量影响Oracle数据库实例功能的摄制。 。数据库控制文件的定位 。Oracle用来缓存从磁盘上读取的数据的内存数量
7、 。Oracle 用来缓存SQL语句的执行计划,PL/SQL过程和数据字典信息以便与它们不必从磁盘连续读取的内存的数量 。默认的优化程序的选择,Parameter files,和数据库文件相关,执行两个重要的功能: 1为数据库指出控制文件 2为数据库指出归档日志的目标,1.6 password file,The password file authenticates which users are permitted to start up and shut down an Oracle instance.,2. 实例:,An Oracle instance is the combinatio
8、n of the background processes and memory structures 数据库实例是用来访问数据库文件集的存储结构及后台进程的集合 实例是一系列进程,他们一起运行来操作数据库。这些进程紧密地一起运行,共同访问内存中的一块区域.,2.1 System Global Area(SGA) :组成:,1 The share pool (1).library cache: .the shared SQL areas: A shared SQL area contains the parse tree and execution plan for a given SQL s
9、tatement. .PL/SQL: Oracle processes PL/SQL program units.,SGA: 1shared pool,(2).data dictionary cache: is a collection of the most recently used definitions in the database. It include Information about database files,tables,indexes,columns,users,privileges,and other database objects. (3).buffers fo
10、r parallel execution messages,SGA,2The database buffer cache Holds copies of data blocks read from datafiles. All user processes concurrently connected to the instance share access to the database buffer cache,SGA,3The redo log buffer That is a circular buffer in the SGA that holds information about
11、 changes made to the database. It is used to track changes made to the database by the server and background processes.,SGA,4Java pool: Used to store Java code 5Large pool: Used to store large memory structures not directly related to SQL statement processing.,2.2 Background Processes,To maximize pe
12、rformance and accommodate many users, a multiprocess Oracle system users some additional Oracle processes called background prcesses. On many operating systems,background processes are created automatically when an instance is started.,1Database Writer (DBWR):,将修改过的数据块写回到数据文件 .The number of dirty bu
13、ffers reaches a threshold value .A process scans a specified number of blocks when scanning for free buffers and cannot find and . Every three seconds .A checkpoint occurs,2Log Writer(LGWR),将redo日志记录写到redo日志文件。 .When a transaction commits .When the redo log buffer is one-third full .When there is mo
14、re than a megabyte of changes recorded in the redo log buffer .Before DBW0 writes modified blocks in the database buffer cache to data files.,3System Monitor(SMON):,执行崩溃恢复和联合自由空间。 .Automatically recovers the instance -Rolls forward changes in the redo logs -Opens the database for user access -Rolls
15、back uncommitted transactions .Coalesces free space .Deallocates temporary segments,4Process Monitor(PMON):,查看进程是否过早断开,释放任何容纳的锁,并处理任何其他必要的清理任务。 Cleans up after failed processes by: .Rolling back the transaction .Releasing locks .Releasing other resources,5Checkpoint Process(CKPT):,When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process.The CKPT process does not write blocks to disk; DBWn always performs that work.,Background Processes,6Archiver Processes(ARCn): 7Recoverer Pr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年泉州市鲤城区法检系统书记员招聘考试参考试题及答案详解
- 2026年安徽省马鞍山市中小学教师招聘笔试参考题库及答案详解
- 2025年惠州市惠城区街道办人员招聘笔试试题及答案详解
- 2026年潍坊市寒亭区中小学教师招聘笔试参考题库及答案详解
- 2026年郑州市二七区中小学教师招聘笔试备考试题及答案详解
- 2026年兰州市城关区中小学教师招聘考试参考题库及答案详解
- 2026年浙江省杭州市街道办人员招聘笔试参考试题及答案详解
- 2026年淮北市烈山区街道办人员招聘笔试参考试题及答案详解
- 2026年伊春市金山屯区法检系统书记员招聘笔试模拟试题及答案详解
- 2026年鞍山市铁西区法检系统书记员招聘考试参考题库及答案详解
- 成都市金牛区卫生健康局所属事业单位2026年招募医务社会工作服务岗位(5人)笔试备考题库及答案详解
- 无粘结预应力钢绞线施工方案及工艺方法
- 【世界经济论坛】塑造学习的未来:人工智能时代的教育准备
- 2026年高考(浙江卷)历史试题及答案
- 电商运营流程与管理制度
- 痰湿体质的中医护理
- DBJ-T 13-491-2025 福建省建筑修缮工程施工质量验收标准
- 2023-2024学年北京市海淀区九年级(上)期末数学试卷(含解析)
- 《反应器操作与控制》教学课件-04流化床反应器操作与控制
- DIY甜品创业计划书
- 心内科导管室进修汇报
评论
0/150
提交评论