SlideShare une entreprise Scribd logo
1  sur  15
9
Copyright © 2005, Oracle. All rights reserved.
Managing Undo Data
9-2 Copyright © 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do
the following:
• 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
9-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
9-4 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
9-6 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
9-7 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
9-8 Copyright © 2005, Oracle. All rights reserved.
Undo Data Versus Redo Data
Undo Redo
Record of How to undo a change How to reproduce a
change
Used for Rollback, read-consistency Rolling forward
database changes
Stored in Undo segments Redo log files
Protects
against
Inconsistent reads in
multiuser systems
Data loss
9-9 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
9-11 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
9-12 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
9-14 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.
9-15 Copyright © 2005, Oracle. All rights reserved.
Sizing the Undo Tablespace
Current table-
space size
Undo consumption rate
9-16 Copyright © 2005, Oracle. All rights reserved.
Using the Undo Advisor
9-17 Copyright © 2005, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to:
• Explain DML and undo data generation
• Monitor and administer undo segments
• Describe the difference between undo data and
redo data
• Configure undo retention
• Guarantee undo retention
• Use the Undo Advisor
9-18 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

Contenu connexe

Tendances

Less14 br concepts
Less14 br conceptsLess14 br concepts
Less14 br conceptsAmit Bhalla
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architectureSimon Huang
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basicsShahed Mohamed
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architectureAmrit Kaur
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architectureAkash Pramanik
 
Oracle architecture with details-yogiji creations
Oracle architecture with details-yogiji creationsOracle architecture with details-yogiji creations
Oracle architecture with details-yogiji creationsYogiji Creations
 
Exploring the Oracle Database Architecture.ppt
Exploring the Oracle Database Architecture.pptExploring the Oracle Database Architecture.ppt
Exploring the Oracle Database Architecture.pptMohammedHdi1
 
Backup & recovery with rman
Backup & recovery with rmanBackup & recovery with rman
Backup & recovery with rmanitsabidhussain
 
Less17 moving data
Less17 moving dataLess17 moving data
Less17 moving dataAmit Bhalla
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recoveryasifmalik110
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overviewhonglee71
 
Database Administration
Database AdministrationDatabase Administration
Database AdministrationBilal Arshad
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle databaseSamar Prasad
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architectureSoumya Das
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 

Tendances (20)

Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
 
Less07 storage
Less07 storageLess07 storage
Less07 storage
 
Less14 br concepts
Less14 br conceptsLess14 br concepts
Less14 br concepts
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architecture
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architecture
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
 
Oracle architecture with details-yogiji creations
Oracle architecture with details-yogiji creationsOracle architecture with details-yogiji creations
Oracle architecture with details-yogiji creations
 
Exploring the Oracle Database Architecture.ppt
Exploring the Oracle Database Architecture.pptExploring the Oracle Database Architecture.ppt
Exploring the Oracle Database Architecture.ppt
 
Backup & recovery with rman
Backup & recovery with rmanBackup & recovery with rman
Backup & recovery with rman
 
Less17 moving data
Less17 moving dataLess17 moving data
Less17 moving data
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 
ORACLE ARCHITECTURE
ORACLE ARCHITECTUREORACLE ARCHITECTURE
ORACLE ARCHITECTURE
 
Database Administration
Database AdministrationDatabase Administration
Database Administration
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Overview of oracle database
Overview of oracle databaseOverview of oracle database
Overview of oracle database
 
Oracle 10g Introduction 1
Oracle 10g Introduction 1Oracle 10g Introduction 1
Oracle 10g Introduction 1
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 

En vedette

Less18 moving data
Less18 moving dataLess18 moving data
Less18 moving dataImran Ali
 
Less06 users
Less06 usersLess06 users
Less06 usersImran Ali
 
Less10 security mb3
Less10 security mb3Less10 security mb3
Less10 security mb3Imran Ali
 
Undo internalspresentation
Undo internalspresentationUndo internalspresentation
Undo internalspresentationoracle documents
 
Oracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic SamplingOracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic SamplingIgor Usoltsev
 
Oracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation ConceptOracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation ConceptChien Chung Shen
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cOren Nakdimon
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Yury Velikanov
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 

En vedette (17)

Less10 Undo
Less10 UndoLess10 Undo
Less10 Undo
 
Less18 moving data
Less18 moving dataLess18 moving data
Less18 moving data
 
Csg vol3
Csg vol3Csg vol3
Csg vol3
 
Less09 Data
Less09 DataLess09 Data
Less09 Data
 
Less06 users
Less06 usersLess06 users
Less06 users
 
Less10 security mb3
Less10 security mb3Less10 security mb3
Less10 security mb3
 
XS Oracle 2009 PV USB
XS Oracle 2009 PV USBXS Oracle 2009 PV USB
XS Oracle 2009 PV USB
 
Undo internalspresentation
Undo internalspresentationUndo internalspresentation
Undo internalspresentation
 
Less08 Schema
Less08 SchemaLess08 Schema
Less08 Schema
 
Oracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic SamplingOracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic Sampling
 
Less08 users
Less08 usersLess08 users
Less08 users
 
How to use Storybird
How to use StorybirdHow to use Storybird
How to use Storybird
 
Oracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation ConceptOracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation Concept
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 

Similaire à Less09 managing undo data

GLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New FeaturesGLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New FeaturesBiju Thomas
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) Frazer Clement
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the fieldJoAnna Cheshire
 
Data protection for oracle databases
Data protection for oracle databasesData protection for oracle databases
Data protection for oracle databasessolarisyougood
 
The Good, The Bad and the Ugly
The Good, The Bad and the UglyThe Good, The Bad and the Ugly
The Good, The Bad and the UglyRoy Salazar
 
Surviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerSurviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerMaris Elsins
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and RecoveryMaham Huda
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cSatishbabu Gunukula
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Applianceomnidba
 
Less01 db architecture
Less01 db architectureLess01 db architecture
Less01 db architectureImran Ali
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnikbiz
 
Emc sql server 2012 overview
Emc sql server 2012 overviewEmc sql server 2012 overview
Emc sql server 2012 overviewsolarisyougood
 
Oracle 11g data warehouse introdution
Oracle 11g data warehouse introdutionOracle 11g data warehouse introdution
Oracle 11g data warehouse introdutionAditya Trivedi
 
12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta 12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta pasalapudi123
 

Similaire à Less09 managing undo data (20)

GLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New FeaturesGLOC 2014 NEOOUG - Oracle Database 12c New Features
GLOC 2014 NEOOUG - Oracle Database 12c New Features
 
Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
 
Les 10 fl1
Les 10 fl1Les 10 fl1
Les 10 fl1
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
 
Data protection for oracle databases
Data protection for oracle databasesData protection for oracle databases
Data protection for oracle databases
 
The Good, The Bad and the Ugly
The Good, The Bad and the UglyThe Good, The Bad and the Ugly
The Good, The Bad and the Ugly
 
Surviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerSurviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource Manager
 
Resize sga
Resize sgaResize sga
Resize sga
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and Recovery
 
A12 vercelletto indexing_techniques
A12 vercelletto indexing_techniquesA12 vercelletto indexing_techniques
A12 vercelletto indexing_techniques
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19c
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Appliance
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
 
Less01 db architecture
Less01 db architectureLess01 db architecture
Less01 db architecture
 
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
Ashnik EnterpriseDB PostgreSQL - A real alternative to Oracle
 
Xpp c user_rec
Xpp c user_recXpp c user_rec
Xpp c user_rec
 
Emc sql server 2012 overview
Emc sql server 2012 overviewEmc sql server 2012 overview
Emc sql server 2012 overview
 
Oracle 11g data warehouse introdution
Oracle 11g data warehouse introdutionOracle 11g data warehouse introdution
Oracle 11g data warehouse introdution
 
12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta 12c In Memory Management - Saurabh Gupta
12c In Memory Management - Saurabh Gupta
 

Plus de Imran Ali

Less17 flashback tb3
Less17 flashback tb3Less17 flashback tb3
Less17 flashback tb3Imran Ali
 
Less07 schema
Less07 schemaLess07 schema
Less07 schemaImran Ali
 
Less05 storage
Less05 storageLess05 storage
Less05 storageImran Ali
 
Less04 instance
Less04 instanceLess04 instance
Less04 instanceImran Ali
 
Less03 db dbca
Less03 db dbcaLess03 db dbca
Less03 db dbcaImran Ali
 
Less02 installation
Less02 installationLess02 installation
Less02 installationImran Ali
 
Toc d17090 gc30
Toc d17090 gc30Toc d17090 gc30
Toc d17090 gc30Imran Ali
 
Appendix f education
Appendix f educationAppendix f education
Appendix f educationImran Ali
 

Plus de Imran Ali (11)

Less17 flashback tb3
Less17 flashback tb3Less17 flashback tb3
Less17 flashback tb3
 
Less07 schema
Less07 schemaLess07 schema
Less07 schema
 
Less05 storage
Less05 storageLess05 storage
Less05 storage
 
Less04 instance
Less04 instanceLess04 instance
Less04 instance
 
Less03 db dbca
Less03 db dbcaLess03 db dbca
Less03 db dbca
 
Less02 installation
Less02 installationLess02 installation
Less02 installation
 
Ep cover
Ep coverEp cover
Ep cover
 
Csg vol2
Csg vol2Csg vol2
Csg vol2
 
Csg vol1
Csg vol1Csg vol1
Csg vol1
 
Toc d17090 gc30
Toc d17090 gc30Toc d17090 gc30
Toc d17090 gc30
 
Appendix f education
Appendix f educationAppendix f education
Appendix f education
 

Dernier

USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 

Dernier (20)

YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 

Less09 managing undo data

  • 1. 9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data
  • 2. 9-2 Copyright © 2005, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: • 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
  • 3. 9-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
  • 4. 9-4 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
  • 5. 9-6 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
  • 6. 9-7 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-8 Copyright © 2005, Oracle. All rights reserved. Undo Data Versus Redo Data Undo Redo Record of How to undo a change How to reproduce a change Used for Rollback, read-consistency Rolling forward database changes Stored in Undo segments Redo log files Protects against Inconsistent reads in multiuser systems Data loss
  • 8. 9-9 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
  • 9. 9-11 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
  • 10. 9-12 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
  • 11. 9-14 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.
  • 12. 9-15 Copyright © 2005, Oracle. All rights reserved. Sizing the Undo Tablespace Current table- space size Undo consumption rate
  • 13. 9-16 Copyright © 2005, Oracle. All rights reserved. Using the Undo Advisor
  • 14. 9-17 Copyright © 2005, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: • Explain DML and undo data generation • Monitor and administer undo segments • Describe the difference between undo data and redo data • Configure undo retention • Guarantee undo retention • Use the Undo Advisor
  • 15. 9-18 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

Notes de l'éditeur

  1. Data Manipulation Data is manipulated, or modified, by the DML class of SQL statements: INSERT, UPDATE, DELETE, and MERGE. These statements execute as part of a transaction, which starts with the first successful DML statement and ends with either a COMMIT or ROLLBACK command. A transaction is either entirely committed or entirely rolled back. Rollback may also occur if there is a process or system failure. Note: The MERGE command performs a combination of inserts and updates to merge data from one table into another. It is covered in the lesson titled “Managing Data and Concurrency.”
  2. Undo Data The Oracle database saves the old value (undo data) when a process changes data in a database. It stores the data as it existed before being modified. Capturing undo data enables you to roll back your uncommitted data. Undo also supports read-consistent and flashback queries. Read-consistent queries provide results that are consistent with the data as of the time a query started. For a read-consistent query to succeed, the original information must still exist as undo information. As long as the undo information is retained, the Oracle database can reconstruct data to satisfy read-consistent queries. Flashback queries are queries that purposely ask for a version of the data as it existed at some time in the past. As long as undo information for that past time still exists, flashback queries can complete successfully. Undo data is also used to recover from failed transactions. A failed transaction occurs when a user session ends abnormally (possibly because of network errors or a failure on the client computer) before the user decides to commit or roll back the transaction. Failed transactions may also occur when the instance crashes.
  3. Undo Data (continued) In case of a failed transaction, the safest behavior is chosen, and the Oracle database reverses all changes made by a user, restoring the original data. Undo information is retained for all transactions, at least until the transaction is ended by: Users undoing the transaction (rolls back) Users ending a transaction (commits) User session abnormally terminating (rolls back) User session normally terminating with an exit (commits) The amount of undo data that is retained and the time for which it is retained depend on the amount of database activity and the database configuration.
  4. Transactions and Undo Data When a transaction starts, it is assigned to an undo segment. Throughout the life of the transaction, when data is changed, the original (before the change) values are copied into the undo segment. You can see which transactions are assigned to which undo segments by checking the v$transaction dynamic performance view. Undo segments are specialized segments that are automatically created by the instance as needed to support transactions. Like all segments, undo segments are made up of extents, which, in turn, consist of data blocks. Undo segments automatically grow and shrink as needed, acting as a circular storage buffer for their assigned transactions. Transactions fill extents in their undo segments until a transaction is completed or all space is consumed. If an extent fills up and more space is needed, the transaction acquires that space from the next extent in the segment. After all extents have been consumed, the transaction either wraps around back into the first extent or requests a new extent to be allocated to the undo segment. Note: Parallel DML operations can actually cause a transaction to use more than one undo segment. To learn more about parallel DML execution, see the Oracle Database Administrator’s Guide 10g.
  5. Storing Undo Information Undo segments can exist only in a specialized form of tablespace called an undo tablespace. Although a database may have many undo tablespaces, only one of them at a time can be designated as the current one to which undo data is written. Undo segments are always owned by SYS. Because the segments act as a circular buffer, each segment has a minimum of two extents. The default maximum number of extents depends on the database block size, but is very high (32,765 for an 8-KB block size). Undo tablespaces are permanent, locally managed tablespaces with automatic extent allocation. They are managed like any other tablespace with the exception of recovery. Because undo data is required to recover from failed transactions (such as those that may occur when an instance crashes), undo tablespaces can be recovered only while the instance is in the MOUNT state. Recovery considerations for undo tablespaces are covered in the lesson titled “Performing Database Recovery.”
  6. Undo Data Versus Redo Data Undo data and redo data seem similar at first, but they serve different purposes. Undo data is needed in case there is the need to undo a change, and this occurs for read-consistency and rollback. Redo data is needed in case there is the need to perform the changes again, in case they are lost for some reason. The process of committing entails a verification that the changes in the transaction have been written to the redo log file, which is persistent storage on the disk, as opposed to memory. In addition, it is typically multiplexed. So, there are multiple copies of the redo data on the disk. Even though the changes may not have yet been written to the data files where the table’s blocks are actually stored, guaranteeing that the changes have been written to the redo log file is enough. A power outage that occurs just before committed changes have been reflected into the redo files does not cause a problem because the transaction has been committed. So, when the system starts up again, it is able to roll forward any redo records that are not yet reflected in data files at the time of the outage.
  7. Monitoring Undo Most of the time, undo is managed automatically by the instance with little need for database administrator (DBA) intervention. A few things that may require administrator involvement include: Insufficient space for undo Users receiving the ORA-01555 snapshot too old error messages Undo information is always retained until a transaction ends. This means that if extremely large amounts of data are deleted or updated (Insert operations consume very little undo space because the original image of inserted data is a null value.) without being committed, the undo tablespace must be equally large to contain the original data. Imagine a case where a 50-GB table had all rows deleted with the following command: SQL> DELETE FROM reallybigtable; The undo tablespace would be required to make room for 50 GB of original information just in case the user who issued this statement changed his or her mind and wanted to roll back the change. When the undo tablespace runs out of room for undo data, users receive an error message such as the following: ORA-01650: unable to extend rollback segment Proactive monitoring detects space problems in an undo tablespace before they affect users.
  8. Monitoring Undo (continued) Another problem that the administrator may encounter with undo information is when a query needs to access undo information that has already been overwritten. This may happen in a long-running or flashback query. When a query needs a “snapshot” of data as of some time in the past, and reconstructing that snapshot requires undo data that no longer exists, the query returns the following error: ORA-01555: snapshot too old This can happen because the Oracle database presents the user with a consistent view of the data as it exists at the time the query starts running. If there are uncommitted changes to the table being queried, the Oracle database reads the undo data to get the committed version of data. This is read consistency. If the query runs so long that in the meantime those modifications are indeed committed, and subsequently their undo data is released and overwritten, then the long-running query no longer can see a consistent view of the data as of when it first began to run. For this reason, undo retention should be configured to accommodate the longest-running query.
  9. Administering Undo It is recommended that you use automatic undo management, configured by setting the UNDO_MANAGEMENT initialization parameter to AUTO. Manual undo management is supported for backward compatibility with Oracle8i and earlier versions, but requires more DBA interaction. With automatic undo management, the DBA manages undo at the tablespace level, controlling, with the UNDO_TABLESPACE initialization parameter, which undo tablespace an instance uses. After selecting the undo tablespace, the administrator need worry only about providing sufficient space and configuring an undo retention interval. With manual management, the DBA must also consider: Segment sizing, including maximum extents and extent sizing Identifying and eliminating blocking transactions Creating enough rollback segments to handle transactions (In manual mode, undo segments are known as rollback segments.) Choosing a tablespace to contain the rollback segments (Undo tablespaces are used only with automatic undo management.)
  10. Configuring Undo Retention UNDO_RETENTION specifies (in seconds) the low threshold value of undo retention. For the AUTOEXTEND undo tablespaces, the system retains undo for at least the time specified in this parameter, and automatically tunes the undo retention period to meet the undo requirements of the queries. For fixed-size undo tablespaces, the system automatically tunes for the maximum possible undo retention period on the basis of undo tablespace size and usage history; it ignores UNDO_RETENTION unless retention guarantee is enabled. So for automatic undo management, for the three cases listed, the UNDO_RETENTION setting is used. In cases other than these three, this parameter is ignored.
  11. Configuring Undo Retention (continued) Undo information is divided into three categories: Uncommitted undo information: Supports a currently running transaction, and it is required if a user wants to roll back or if the transaction has failed. Uncommitted undo information is never overwritten. Committed undo information: Is no longer needed to support a running transaction, but it is still needed to meet the undo retention interval. It is also known as “unexpired” undo information. Committed undo information is retained when possible without causing an active transaction to fail because of lack of space. Expired undo information: Is no longer needed to support a running transaction. Expired undo information is overwritten when space is required by an active transaction.
  12. Guaranteeing Undo Retention The default undo behavior is to overwrite committed transactions that have not yet expired rather than to allow an active transaction to fail because of lack of undo space. This behavior can be changed by guaranteeing retention. With guaranteed retention, undo retention settings are enforced even if they cause transactions to fail. RETENTION GUARANTEE is a tablespace attribute rather than an initialization parameter. This attribute can be changed only with SQL command-line statements. The syntax to change an undo tablespace to guarantee retention is: SQL> ALTER TABLESPACE undotbs1 RETENTION GUARANTEE; To return a guaranteed undo tablespace to its normal setting, use the following command: SQL> ALTER TABLESPACE undotbs1 RETENTION NOGUARANTEE; The retention guarantee applies only to undo tablespaces. Attempts to set it on a non-undo tablespace result in the following error: SQL> ALTER TABLESPACE example RETENTION GUARANTEE; ERROR at line 1: ORA-30044: 'Retention' can only specified for undo tablespace
  13. Sizing the Undo Tablespace Undo tablespaces must be sized so that they can contain the original information for all transactions. Clicking the Undo Management link on the Enterprise Manager’s Administration page reveals an overview of system undo, including current settings, undo consumption per minute, and the length of the longest-running query observed during a given time period. Data files belonging to an undo tablespace can automatically extend when they run out of free space. Oracle Corporation recommends that data files that are associated with undo tablespaces, unlike other tablespaces, should not have automatic extension enabled. When first determining undo space requirements, you may want to enable automatic extension of the data files, but after you have properly sized the tablespace, you must disable it. Disabling automatic extension in an undo tablespace’s data files prevents a single user from inadvertently consuming large amounts of disk space by neglecting to commit transactions.
  14. Using the Undo Advisor The Undo Advisor is accessed through the Undo Management properties page. It provides an estimate of the undo tablespace size required to satisfy a given undo retention. Enter the desired retention period, and the analysis region of the advisor displays the tablespace size required to support the retention period. You can also click a point on the graph to see the tablespace size required to support the selected period. After you have selected an undo retention period, click OK to implement the new retention period.