oracledatabaseconcepts,administration系列讲座(二)

上传人:艾力 文档编号:37668759 上传时间:2018-04-20 格式:PPT 页数:33 大小:84.50KB
返回 下载 相关 举报
oracledatabaseconcepts,administration系列讲座(二)_第1页
第1页 / 共33页
oracledatabaseconcepts,administration系列讲座(二)_第2页
第2页 / 共33页
oracledatabaseconcepts,administration系列讲座(二)_第3页
第3页 / 共33页
oracledatabaseconcepts,administration系列讲座(二)_第4页
第4页 / 共33页
oracledatabaseconcepts,administration系列讲座(二)_第5页
第5页 / 共33页
点击查看更多>>
资源描述

《oracledatabaseconcepts,administration系列讲座(二)》由会员分享,可在线阅读,更多相关《oracledatabaseconcepts,administration系列讲座(二)(33页珍藏版)》请在金锄头文库上搜索。

1、ORACLE Database Concepts,Administration 系列讲座(二)樊若蕻 数据库课题,计算中心 2003.4基本概念复习 了解oracle的结构很重要,特别是从调 试的角度,如果不知道Oracle是如何操 作的,就不可能适当地调试一个Oracle 数据库。Oracle使用内存方式。Oracle使用磁盘文件方式和各类进程之 间的互相作用方式理解数据库和实例1.数据库在Oracle领域里,数据库指的是文件集 合,这些文件用来存储管理相关数据。 一个oracle数据库由物理文件,内存区和 进程组成。 数据库中的数据存储在磁盘上的物理文件 中。数据被使用时,则吊入内存。fi

2、les:不同类型Database files: .数据文件: datafiles .控制文件: control files .重做日志: redo log files .跟踪文件及警告日志:trace files,alert filesfiles:不同类型Nondatabase files: .参数文件: parameter file .口令文件: password file1.1.Data files:Every Oracle database has one or more physical datafiles.The datafiles contain all the database

3、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 redo log files: Every

5、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 file 与之相连。 Trace file 记

6、载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 errors1.5 Parameter files 包括大量影响Oracle数据库实例功能的摄制 。数据库控制文件的定位。Oracle用来缓存从磁盘上读取的数据的内存 数量。Oracle 用来缓存SQL语句的执行计划, P

7、L/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 combination of the background processe

8、s 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 statement. .PL/SQL: Oracle pro

9、cesses 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,privileg es,and other database objects.(3).buffers for parallel execution messagesS

10、GA2The 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 cacheSGA3The redo log buffer That is a circular buffer in the SGA that holdsinformation about changes made to the database. It i

11、s used to track changes made to the database by the server and background processes.SGA4Java 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 performance and accommodate many users,

12、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 buffers reaches a threshold value .A proce

13、ss scans a specified number of blocks when scanning for free buffers and cannot find and . Every three seconds .A checkpoint occurs2Log Writer(LGWR)将redo日志记录写到redo日志文件。 .When a transaction commits .When the redo log buffer is one-third full .When there is more than a megabyte of changes recorded in

14、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 back uncommitted transactions .Coalesces fre

15、e space .Deallocates temporary segments4Process Monitor(PMON):查看进程是否过早断开,释放任何容纳的 锁,并处理任何其他必要的清理任务。 Cleans up after failed processes by: .Rolling back the transaction .Releasing locks .Releasing other resources5Checkpoint 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 Process (RECn) 8CJQn 9LMSn 10Dnnn 11Server: Snnn 12Pnnn

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号