ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)

Last updated on MAY 03, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.4 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Information in this document applies to any platform.

Symptoms


Symptoms:
- A job or process is consistently giving ORA-1555 errors.
- Increasing the undo_retention value has not stopped the errors.
- The ORA-1555 occurs even if there are no other jobs/processes updating the objects reported in the failed SQL.
- The datafiles for the undo tablespace have autoextend turned on, and the file size is less than MAXBYTES.
- A look at the v$undostat shows that the query length is less than both the undo_retention and the tuned_undoretention

To find the max query length and the tuned_undo retention, run this SQL.
set pagesize 25
set linesize 100
column UNXPSTEALCNT heading "# Unexpired|Stolen"
column EXPSTEALCNT heading "# Expired|Reused"
column SSOLDERRCNT heading "ORA-1555|Error"
column NOSPACEERRCNT heading "Out-Of-space|Error"
column MAXQUERYLEN heading "Max Query|Length"
select inst_id, to_char(begin_time,'MM/DD/YYYY HH24:MI') begin_time,
UNXPSTEALCNT, EXPSTEALCNT , SSOLDERRCNT, NOSPACEERRCNT, MAXQUERYLEN, TUNED_UNDORETENTION
from gv$undostat
order by inst_id, begin_time;

Then look for the timestamp at which the ORA-1555 occurred.
The max query length will be less than undo_retention, and less than tuned_undoretention.

Note: When tuned_undoretention is used, the undo_retention becomes a minimum setting.

 

Here is an example of the output of the above SQL


                      Unexpired  Expired ORA-1555 Out-Of-space  Max Query
INST_ID BEGIN_TIME     Stolen     Reused    Error        Error     Length TUNED_UNDORETENTION
------- ---------------- ----     ------    ----- ------------ ---------- ------------
1       06/14/2010 20:51    0          0        0            0        719     2000
1       06/14/2010 21:01    0          0        1            0       1323     2225 <--ORA-1555 here
1       06/14/2010 21:11    0          0        0            0        699     2000
1       06/14/2010 21:21    0          0        0            0       1303     2205
1       06/14/2010 21:31    0          0        0            0        678     2000

We can see that there were no stolen unexpired extents, and the length of
the query was 1323 seconds, while the tuned_undoretention was 2225 seconds.

There were also no out-of-space errors.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms