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

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

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]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

Symptoms:
- A job or process is consistently giving ORA-1555 errors. 

- job or process continued ORA-1555 error

- Increasing the undo_retention value has not stopped the errors.

- Added value undo_retention did not stop error

- The ORA-1555 occurs even if there are no other jobs/processes updating the objects reported in the failed SQL.

- even if there are no other jobs / processes object failed to update SQL in the report, also occurs ORA-1555

- The datafiles for the undo tablespace have autoextend turned on, and the file size is less than MAXBYTES.

- undo tablespace data files have enabled automatic extension, 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

- View v $ undostat display the query length is less than both undo_retention and tuned_undoretention

To find the max query length and the tuned_undo retention, run this SQL.
- To find the maximum query length and tuned_undo retention, please 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.
- and then find the time stamp of the occurrence of ORA-1555
The max query length will be less than undo_retention, and less than tuned_undoretention.
--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.
- Note: When using tuned_undoretention, undo_retention become the minimum setting.

Here is an example of the output of the above SQL   This is an example of the above-mentioned SQL output

                      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.

We can see the extended data segment is not outstanding, the length of the query is 1323 seconds, and tuned_undoretention to 2225 seconds.

Also were NO There OUT-of-Space errors.   There is no shortage of space for error

CAUSE

The issue can be caused by two reasons  :  the problem may be due to two causes

1. Indexes / table mismatch   index / table does not match

OR

2. Similar issue is reported as Bug 8231583 Abstract: ORA-1555 WHEN QUERY LENGTH < TUNED RETENTION

2. A similar problem report Bug 8231583 Abstract: ORA-1555 WHEN QUERY LENGTH <TUNED RETENTION

The bug has been closed at this point without finding a root issue.  The problem is not easy to reproduce consistently.

This error has now closed, did not find the fundamental problem. The problem is not easy to consistently reproduce.

SOLUTION

1. If the 1555 error is consistently reported against a certain table each time, so this most like is caused by Indexes/table mismatch and you need to drop/recreate (not rebuild) all table indexes.

1. If every error is always reported for 1555 a table, much like is caused by Indexes / does not match the table, you need to drop / recreate (not rebuild) all table indexes

Similar issue described in Note: 977902.1.

2. Bug 8231583 reported on this issue is closed due to the lack of reproducibility.

2. Due to the lack of reproducibility, and therefore error has been reported on the issue of 8,231,583


There are a few workarounds identified for this issue. One option is to create a new undo tablespace and switch to the new Undo tablespace.

There are ways to solve this problem. One option is to create a new undo tablespace and switch to the new Undo tablespace

For example:
CREATE UNDO TABLESPACE undotbs_02
DATAFILE '/u01/oracle/rbdb1/undo0201.dbf' SIZE 2M REUSE AUTOEXTEND ON;

ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02;

The old undo can only be dropped after all transactions have cleared from the undo tablespace.

Only after clearing all transactions in the undo tablespace in order to remove the old undo 

Please refer to the Oracle Database Administrator's manual for creating a new undo, switching to a new undo tablespace, and dropping the undo tablespace.
Please refer to Oracle Database Administrator's Guide to create a new undo, switch to the new undo tablespace and delete the undo tablespace

Oracle Database Administrator's Guide
10g Release 2 (10.2)
Chapter 10 Managing at The Undo the Tablespace

Oracle Database Administrator's Guide
11g Release 2 (11.2)
15 Managing Undo Chapter
Section: Managing Undo the Tablespaces


As a second option, disable auto tuning   by setting the second selection is performed by setting disable auto tuning

"_undo_autotune" = false

after creating a new undo tablespace has avoided future occurrences of the problem condition at some database locations. 

After creating a new undo tablespace, to avoid future problems arise in the case of certain database location.

Until a consistent, reproducible test case can be developed in-house this problem remains unresolved.

Developed internally consistent, repeatable test cases before, this issue remains unresolved.

Afterwords 3., the If the this IS Still Consistently reproducible in your Database to the then Development Progress with the this, the Check  Note: 761,128.1  to GET Diagnostic Information Needs to BE AT Collected at The Time at The ORA-01555 error Occurs to BE of Able to Engage Development.
3. Postscript If you still can always copy this code in your database, will have to continue to develop, please check Note: 761128.1 for diagnostic information, to enable development in the ORA-01555 error.

REFERENCES

NOTE:461480.1 - FAQ – Automatic Undo Management (AUM) / System Managed Undo (SMU)
NOTE:877613.1 - AUM Common Analysis/Diagnostic Scripts
BUG:18602141 - ORA-1555 QUERY FAILING BEFORE UNDO_RETENTION IS REACHED
BUG:19014280 - ACTIVE DG: LGWR BLOCKS SEVERAL SESSIONS DURING GLOBAL FLUSH
BUG:18899974 - ORA-600 [KCBGTCR_13] ON ACTIVE DATAGUARD
BUG:8231583 - ORA-01555 WHEN QUERY LENGTH < TUNED RETENTION
BUG:8231583 - ORA-01555 WHEN QUERY LENGTH < TUNED RETENTION
NOTE:240746.1 - 10g NEW FEATURE on AUTOMATIC UNDO RETENTION

Guess you like

Origin www.cnblogs.com/zylong-sys/p/11961540.html