版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Managing Undo Data,Objectives,After completing this lesson, you should be able to do the following: Describe the purpose of undo data Implement Automatic Undo Management Create and configure undo segments Obtain undo segment information from the data dictionary,Managing Undo Data Overview,Two method
2、s for managing undo data exists Automatic Undo Management Manual Undo Management This lesson discusses Automatic Undo Management The term undo replaces what was known in previous versions of Oracle as rollback,Undo Segment,Update transaction,Old image,New image,Undo segment,Table,Undo Segments: Purp
3、ose,Transaction rollback,Transaction recovery,Undo segment,Read consistency,Read Consistency,Image at start of statement,New image,Table,SELECT * FROM table,Types of Undo Segments,SYSTEM: Used for objects in the SYSTEM tablespace Non-SYSTEM: Used for objects in other tablespaces: Auto Mode: Requires
4、 an UNDO tablespace Manual Mode: Private: Acquired by a single instance Public: Acquired by any instance Deferred: Used when tablespaces are taken offline immediate, temporary, or for recovery,Automatic Undo Management:Concepts,Undo data is managed using an UNDO tablespace You allocate one UNDO tabl
5、espace per instance with enough space for the workload of the instance. The Oracle server automatically maintains undo data within the UNDO tablespace.,Automatic Undo Management:Configuration,Configure two parameters in the initialization file: UNDO_MANAGEMENT UNDO_TABLESPACE Create at least one UND
6、O tablespace.,Automatic Undo Management:Initialization Parameters,UNDO_MANAGEMENT: Specifies whether the system should use AUTO or MANUAL mode. UNDO_TABLESPACE: Specifies a particular UNDO tablespace to be used.,UNDO_MANAGEMENT=AUTO UNDO_TABLESPACE=UNDOTBS,Automatic Undo Management:UNDO Tablespace,Y
7、ou may create the UNDO tablespace with the database by adding a clause in the CREATE DATABASE command Or create it later by using the CREATE UNDO TABLESPACE command,CREATE DATABASE db01 . . . UNDO TABLESPACE undo1 DATAFILE undo1db01.dbf SIZE 20M AUTOEXTEND ON,CREATE UNDO TABLESPACE undo1 DATAFILE un
8、do1db01.dbf SIZE 20M;,Automatic Undo Management:Altering an UNDO Tablespace,The ALTER TABLESPACE command can make changes to UNDO tablespaces. The following example adds another data file to the UNDO tablespace:,ALTER TABLESPACE undotbs ADD DATAFILE undotbs2.dbf SIZE 30M AUTOEXTEND ON;,Automatic Und
9、o Management:Switching UNDO Tablespaces,You may switch from using one UNDO tablespace to another Only one UNDO tablespace can be in assigned to an instance at a time More than one UNDO tablespace may exist within an instance, but only one can be active Use the ALTER SYSTEM command for dynamic switch
10、ing between UNDO tablespaces,ALTER SYSTEM SET UNDO_TABLESPACE=UNDOTBS2;,Automatic Undo Management:Dropping an UNDO Tablespace,The DROP TABLESPACE command drops an UNDO tablespace. An UNDO tablespace can only be dropped if it is currently not in use by any instance. To drop an active UNDO tablespace:
11、 Switch to a new UNDO tablespace Drop the tablespace after all current transactions are complete,DROP TABLESPACE UNDOTBS2;,Automatic Undo Management:Other Parameters,UNDO_SUPPRESS_ERRORS Set to TRUE, this parameter suppresses errors while attempting to execute manual operations in AUTO mode. UNDO_RE
12、TENTION Controls the amount of undo data to retain for consistent read,Undo Data Statistics,SELECT end_time,begin_time,undoblks FROM v$undostat; END_TIME BEGIN_TIME UNDO - - - 22-JAN-01 13:44:18 22-JAN-01 13:43:04 19 22-JAN-01 13:43:04 22-JAN-01 13:33:04 1474 22-JAN-01 13:33:04 22-JAN-01 13:23:04 13
13、47 22-JAN-01 13:23:04 22-JAN-01 13:13:04 1628 22-JAN-01 13:13:04 22-JAN-01 13:03:04 2249 22-JAN-01 13:03:04 22-JAN-01 12:53:04 1698 22-JAN-01 12:53:04 22-JAN-01 12:43:04 1433 22-JAN-01 12:43:04 22-JAN-01 12:33:04 1532 22-JAN-01 12:33:04 22-JAN-01 12:23:04 1075,Automatic Undo Management:Sizing an UND
14、O Tablespace,Determining a size for the UNDO tablespace requires three pieces of information (UR) UNDO_RETENTION in seconds (UPS) Number of undo data blocks generated per second (DBS) Overhead varies based on extent and file size (db_block_size),UndoSpace = UR * (UPS * DBS) + (DBS * 24),Automatic Un
15、do ManagementUndo Quota,Long transactions and improperly written transactions can consume valuable resources With undo quota users can be grouped and a maximum undo space limit can be assigned to the group UNDO_POOL, a Resource Manager directive, defines the amount of space allowed for a resource group When a group exceeds its limit no new transactions are possible, for the group, until undo space is freed by current transactions either completing or aborting,Obtaining Undo Segments Information,Data Dictionary Views DBA_
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025昆明卫生职业学院教师招聘考试题目及答案
- 2025江西工业贸易职业技术学院教师招聘考试题目及答案
- 2026年经济学基础诊断测试及答案
- 考研社会工作试题及答案
- 2026北京外国语大学第二批教学科研岗位招聘建设笔试备考题库及答案解析
- 2026浙江台州市荣远客运有限公司招聘建设考试备考试题及答案解析
- 聚变新能(安徽)有限公司2026届校园招聘建设考试备考题库及答案解析
- 2026吉林白城市洮南市事业单位招聘高层次人才(含专项招聘高校毕业生)43人建设笔试备考试题及答案解析
- 2026年青岛平度市教育体育系统面向社会公开招聘教师(252人)建设笔试模拟试题及答案解析
- 2026湖南娄底市市直学校公开招聘工作人员15人建设考试参考题库及答案解析
- 心包引流患者的健康教育
- 村务监督委员会培训课件
- 上海银行招聘面试题及答案
- 2025年河南法院检察院公务员面试经典试题及答案
- 机械传动基础知识
- 初级护师资格考试历年真题附答案
- 煤矿抽采达标培训
- 2025年自轮运转特种设备人员任职考试题库选择题及答案
- 2025年专插本考试《设计基础》真题及答案
- 中医科普糖尿病
- (正式版)DB65∕T 4404-2021 《植保无人飞机防治棉花病虫害作业规程》
评论
0/150
提交评论