版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 小学主题班会课件-家校共育传递感恩精神
- 2026养殖生产面试题及答案解析
- 2026影像面试题及答案大全
- 关于2026年季度财务报告提交要求的通知函(3篇)
- 2026政务热线面试题及答案
- 2026道路检测员面试题及答案
- 2026公卫面试题目及答案
- 2026年项目投标结果确认函5篇范文
- 2026江西景德镇陶瓷大学管理助理、教学助理、科研助理岗位招聘28人笔试备考试题及答案详解
- 2026陕西榆林靖边县大学生到政府机关见习50人笔试备考题库及答案详解
- SYT 6649-2025《油气管道管体缺陷修复技术规范》
- 2025-2026学年浙江省嘉兴市七年级(下)期末数学试卷(含答案)
- 2026年秋季新教材统编版九年级上册道德与法治全册知识点背诵提纲精简版
- 2026年中式烹调师高级理论知识试题库及答案
- 2026-2030中国溴化钠市场运行状况与未来供需格局分析研究报告
- 中国经皮气管切开术操作指南2025版
- 2026年国家开放大学本科《城市管理学》期末纸质考试试题及答案
- GB/T 5464-2026建筑材料不燃性试验方法
- 企业劳动合同2026版标准模板下载
- 2025青岛工程职业学院教师招聘考试题目及答案
- 2026年国家开放大学生产与运作管理期末复习资料模拟试题含答案详解(能力提升)
评论
0/150
提交评论