What to do if an ORA-1555 is occurring with an UNDO segment
-------------------------------------------------------------------------------------------------
1) QUERY DURATION > UNDO_RETENTION
There are no guarantees that read consistency can be maintained after the transaction slot for the
committed row has expired (exceeded UNDO_RETENTION)
Why would one think that the transaction slot's time has exceeded UNDO_RETENTION?
Lets answer this with an example
If UNDO_RETENTION = 900 seconds ... but our QUERY DURATION is 2000 seconds ...
This says that our query has most likely encountered a row that was committed more than 900
seconds ago ... and has been overwritten as we KNOW that the transaction slot being examined
no longer matches the row we are looking for
The reason we say "most likely" is that it is possible that an unexpired committed transaction slot was
overwritten due to either space pressure on the undo segment or this is a bug
SOLUTION:
The best solution is to tune the query can to reduce its duration. If that cannot be done then increase
UNDO_RETENTION based on QUERY DURATION to allow it to protect the committed
transaction slots for a longer period of time
NOTE: Increasing UNDO_RETENTION requires additional space in the UNDO tablespace. Make
sure to accommodate for this space. One method of doing this is to set AUTOEXTEND on one or
more of the UNDO tablespace datafiles for a period of time to allow for the increased space. Once the
size has stabilized, AUTOEXTEND can be removed.
See the solution for #2 below for more options
2) QUERY DURATION <= UNDO_RETENTION
This case is most often due to the UNDO tablespace becoming full sometime during the time when the
query was running
How do we tell if the UNDO tablespace has become full during the query?
Examine V$UNDOSTAT.UNXPSTEALCNT for the period while the query that generated the
ORA-1555 occurred.
This column shows committed transaction slots that have not exceeded UNDO_RETENTION but
were overwritten due to space pressure on the undo tablespace (IE became full).
If UNEXPSTEACNT > 0 for the time period during which the query was running then this shows
that the undo tablespace was too small to be able to maintain UNDO_RETENTION. Unexpired
blocks were over written, thus ending read consistency for those blocks for that time period.
set pagesize 25
set linesize 120
select inst_id,
to_char(begin_time,'MM/DD/YYYY HH24:MI') begin_time,
UNXPSTEALCNT "# Unexpired|Stolen",
EXPSTEALCNT "# Expired|Reused",
SSOLDERRCNT "ORA-1555|Error",
NOSPACEERRCNT "Out-Of-space|Error",
MAXQUERYLEN "Max Query|Length"
from gv$undostat
where begin_time between
to_date('','MM/DD/YYYY HH24:MI:SS')
and
to_date('
Hi, I'm Ghouse Mohammed Khan. I'm science graduate from Osmania University.
Presently I'm working as a Oracle DBA at IBM India Pvt Ltd Bangalore.
I lead various account in my career specially in Telecommunication.
Currently I'm supporting ABN Amro Netherlands (Banking account).
My techincal certification is concern: I'm Oracle Certified associate and Oracle Certified Professional. I did oca in 2009 and ocp in 2010.
If you would like to know about my hobbies: My hobbies includes watching cricket and reading books.
I was inspired by my sir (Naveed sir) to aspire Database carreer.
I'm looking forward to get indepth exposure into Oracle Database Administrator. I'd like to excel myself in DBA side.
Activities undertaken in my career:
The key strengths that i posses for success in this position include,but are not limited to, the following:
1. RAC Setup.
2. Dataguard setup using RMAN.
3. Dataguard broker configure.
4. Standby creation on NFS.
5. Installing and configuring Oracle server software and related products.
6. Planning and Implementing Backup and Recovery Strategies daily,weekly and Monthly.
7. Managing the physical and logical structure of Oracle Database.
No comments:
Post a Comment