7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.

Slides:



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

Manipulating Data Schedule: Timing Topic 60 minutes Lecture
17 Copyright © 2005, Oracle. All rights reserved. Performing Flashback.
9 Copyright © 2004, Oracle. All rights reserved. Managing Data.
Basic Storage Concepts and Settings
1 - Oracle Server Architecture Overview
9 Copyright © 2009, Oracle. All rights reserved. Managing Data Concurrency.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Backup and Recovery Part 1.
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Using RMAN to Perform Recovery
10 Copyright © 2005, Oracle. All rights reserved. Implementing Oracle Database Security.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
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.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
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.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
9 Copyright © 2007, Oracle. All rights reserved. Managing Data and Concurrency.
16 Copyright © 2004, Oracle. All rights reserved. Undo Management.
Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows.
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.
8 Copyright © 2005, Oracle. All rights reserved. Managing Data.
Transactions and Locks A Quick Reference and Summary BIT 275.
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.
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.
10 Managing Rollback Segments Objectives Planning the number and size of rollback segments Creating rollback segments using appropriate storage.
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.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
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 © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
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. Implementing Oracle Database Security.
11 Copyright © 2007, Oracle. All rights reserved. Using Flashback Technology.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
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.
Oracle 11g: SQL Chapter 5 Data Manipulation and Transaction Control.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
Database structure and space Management
Performing Database Recovery
Presentation transcript:

7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data

7-2 Copyright © 2005, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Explain DML and redo 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

7-3 Copyright © 2005, Oracle. All rights reserved. Data Manipulation Data manipulation language (DML) consists of the following SQL statements: – INSERT – UPDATE – DELETE – MERGE DML always executes as part of a transaction, which can be: –Rolled back, using the ROLLBACK command –Committed, using the COMMIT command

7-4 Copyright © 2005, Oracle. All rights reserved. Data Manipulation and Redo Data Block 1Block 3Block 2 SQL> COMMIT; Redo log file Verify that redo data is on the disk and write COMMIT record Write verified, COMMIT record written, control returned SQL> SQL> DELETE FROM employees WHERE salary > 10000; SQL> UPDATE employees SET salary = 5000 WHERE employee_id = 202;

7-5 Copyright © 2005, 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 and flashback queries –Recovery from failed transactions User

7-6 Copyright © 2005, Oracle. All rights reserved. Undo Data Full Notes Page

7-7 Copyright © 2005, 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. Update transaction Old value New value Undo segment Table

7-8 Copyright © 2005, Oracle. All rights reserved. Storing Undo Information Undo information is stored in undo segments, which are, in turn, 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

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

7-10 Copyright © 2005, Oracle. All rights reserved. Monitoring Undo Undo usually requires little management. The areas to monitor include: Free space in an undo tablespace “Snapshot too old” errors DBA

7-11 Copyright © 2005, Oracle. All rights reserved. Monitoring Undo Full Notes Page

7-12 Copyright © 2005, Oracle. All rights reserved. Administering Undo Administration of undo should include preventing: Space errors in an undo tablespace: –Size the undo tablespace properly. –Ensure that large transactions commit periodically. “Snapshot too old” errors: –Configure an appropriate undo retention interval. –Size the undo tablespace properly. –Consider guaranteeing undo retention. Use automatic undo management: DBA UNDO_MANAGEMENT=AUTO UNDO_TABLESPACE=UNDOTBS1

7-13 Copyright © 2005, Oracle. All rights reserved. Configuring Undo Retention DBA UNDO_RETENTION specifies (in seconds) the amount of already committed undo information that 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

7-14 Copyright © 2005, Oracle. All rights reserved. Configuring Undo Retention Full Notes Page

7-15 Copyright © 2005, Oracle. All rights reserved. Guaranteeing Undo Retention Guarantee: 15 minutes A transaction that generates more undo than what there is space for will fail. Undo data SELECT statements running 15 minutes or less are always satisfied.

7-16 Copyright © 2005, Oracle. All rights reserved. Sizing the Undo Tablespace Current table- space size Undo consumption rate

7-17 Copyright © 2005, Oracle. All rights reserved. Using the Undo Advisor

7-18 Copyright © 2005, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Explain DML and redo data generation Monitor and administer undo segments Configure undo retention Guarantee undo retention Use the Undo Advisor

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

7-20 Copyright © 2005, Oracle. All rights reserved.