10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.

Slides:



Advertisements
Similar presentations
4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Advertisements

17 Copyright © 2005, Oracle. All rights reserved. Performing Flashback.
Oracle Architecture. Instances and Databases (1/2)
Basic Storage Concepts and Settings
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
1 - Oracle Server Architecture Overview
9 Copyright © 2009, Oracle. All rights reserved. Managing Data Concurrency.
Oracle 10g Database Administrator: Implementation and Administration Chapter 14 Proactive Maintenance.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Backup and Recovery Part 1.
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
Database Advisors Automatic Database Diagnostic Monitor ( ADDM )
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
7202ICT – Database Administration
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
16 Copyright © 2004, Oracle. All rights reserved. Undo Management.
7 Copyright © 2004, Oracle. All rights reserved. Recovering from Noncritical Losses.
6 Copyright © 2006, Oracle. All rights reserved. Flashback.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
Week 3 Lecture 2 Basic Storage Concepts and Settings.
10 Copyright © 2004, Oracle. All rights reserved. Recovering from User Errors.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
3 Copyright © 2005, Oracle. All rights reserved. Creating an Oracle Database.
© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
20 Copyright © 2008, Oracle. All rights reserved. Cache Management.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
16 Copyright © 2005, Oracle. All rights reserved. Performing Database Recovery.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
11 Copyright © 2007, Oracle. All rights reserved. Using Flashback Technology.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
Oracle Database Architectural Components
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Performing Database Recovery
Presentation transcript:

10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data

Copyright © 2009, Oracle. All rights reserved Objectives After completing this lesson, you should be able to: Explain DML and undo data generation Monitor and administer undo data Describe the difference between undo data and redo data Configure undo retention Guarantee undo retention Use the Undo Advisor

Copyright © 2009, Oracle. All rights reserved Undo Data Undo data is: A copy of original, premodified data Captured for every transaction that changes data Retained at least until the transaction is ended Used to support: –Rollback operations –Read-consistent queries –Oracle Flashback Query, Oracle Flashback Transaction, and Oracle Flashback Table –Recovery from failed transactions User

Copyright © 2009, Oracle. All rights reserved

Copyright © 2009, Oracle. All rights reserved Transactions and Undo Data Each transaction is assigned to only one undo segment. An undo segment can service more than one transaction at a time. Data in Undo “old” data in undo tablespace UPDATE DML operations buffer cache Redo log buffer Redo log files New change details in Redo log files Undo segment

Copyright © 2009, Oracle. All rights reserved Storing Undo Information Undo information is stored in undo segments, which are stored in an undo tablespace. Undo tablespaces: Are used only for undo segments Have special recovery considerations May be associated with only a single instance Require that only one of them be the current writable undo tablespace for a given instance at any given time

Copyright © 2009, Oracle. All rights reserved Undo Data Versus Redo Data UndoRedo Record ofHow to undo a changeHow to reproduce a change Used forRollback, read consistency, flashback Rolling forward database changes Stored inUndo segmentsRedo log files Protects against Inconsistent reads in multiuser systems Data loss Redo log files Undo segment

Copyright © 2009, Oracle. All rights reserved Managing Undo Automatic undo management: Fully automated management of undo data and space in a dedicated undo tablespace For all sessions Self-tuning in AUTOEXTEND tablespaces to satisfy long- running queries Self-tuning in fixed-size tablespaces for best retention DBA tasks in support of Flashback operations: Configuring undo retention Changing undo tablespace to a fixed size Avoiding space and “snapshot too old” errors

Copyright © 2009, Oracle. All rights reserved Configuring Undo Retention UNDO_RETENTION specifies (in seconds) how long already committed undo information is to be retained. The only time you must set this parameter is when: The undo tablespace has the AUTOEXTEND option enabled You want to set undo retention for LOBs You want to guarantee retention DBA

Copyright © 2009, Oracle. All rights reserved

Copyright © 2009, Oracle. All rights reserved Guaranteeing Undo Retention A transaction will fail if it generates more undo than there is space. SELECT statements running 15 minutes or less are always satisfied. Undo data in undo tablespace Retention guarantee: 15 minutes SQL> ALTER TABLESPACE undotbs1 RETENTION GUARANTEE; Note: This example is based on an UNDO_RETENTION setting of 900 seconds (15 minutes).

Copyright © 2009, Oracle. All rights reserved Changing an Undo Tablespace to a Fixed Size Reasons: Supporting Flashback operations Limiting tablespace growth Workflow: 1.Run regular workload. 2.Self-tuning mechanism establishes minimum required size. 3.(Optional) Use Undo Advisor, which calculates required size for future growth. 4.(Optional) Change undo tablespace to a fixed size.

Copyright © 2009, Oracle. All rights reserved General Undo Information Current tablespace size

Copyright © 2009, Oracle. All rights reserved Using the Undo Advisor

Copyright © 2009, Oracle. All rights reserved Viewing System Activity 3 1 2

Copyright © 2009, Oracle. All rights reserved Quiz All you need to do to guarantee that all queries under 15 minutes will find the undo data needed for read consistency, is set the UNDO_RETENTION parameter to 15 minutes. 1.True 2.False

Copyright © 2009, Oracle. All rights reserved Quiz Which statement does not relate to undo data? 1.Provides a record of how to undo a change 2.Is used for rollback, read consistency, and flashback 3.Is stored in memory only, not written to disk 4.Protects against inconsistent reads in a multiuser system

Copyright © 2009, Oracle. All rights reserved Summary In this lesson, you should have learned how to: Explain DML and undo data generation Monitor and administer undo data Describe the difference between undo data and redo data Configure undo retention Guarantee undo retention Use the Undo Advisor

Copyright © 2009, Oracle. All rights reserved Practice 10 Overview: Managing Undo Segments This practice covers the following topics: Viewing system activity Calculating undo tablespace sizing to support a 48-hour retention interval Modifying an undo tablespace to support a 48-hour retention interval

Copyright © 2009, Oracle. All rights reserved