Undo table space is not release the data and using more space.
When the UNDO tablespace is created with NO AUTOEXTEND, following the
allocation algorithm, here is the explanation for this correct behavior:
For a fixed size UNDO tablespace (NO AUTOEXTEND), starting with 10.2, we
provide max retention given the fixed undo space, which is set to a
value based on the UNDO tablespace size.
This means that even if the undo_retention is set to a number of seconds (900 default), the fixed UNDO tablespace supports a bigger undo_retention time interval (e.g: 36 hours), based on the tablespace size, thing that makes the undo extents to be UNEXPIRED. But this doesn't indicate that there are no available undo extents when a transaction will be run in the database, as the UNEXPIRED undo segments will be reused.
This means that even if the undo_retention is set to a number of seconds (900 default), the fixed UNDO tablespace supports a bigger undo_retention time interval (e.g: 36 hours), based on the tablespace size, thing that makes the undo extents to be UNEXPIRED. But this doesn't indicate that there are no available undo extents when a transaction will be run in the database, as the UNEXPIRED undo segments will be reused.
concerning an UNDO tablespace created with AUTOEXTEND OFF in 10gR2, so
there is not need to add more space to it or be concerned by the fact
that it appears to be 100% full.
UNDO_MANAGEMENT=AUTO
- Whether the undo tablespace is fixed in size:SELECT autoextensible
FROM dba_data_files
WHERE tablespace_name=''
This returns "NO" for all the undo tablespace datafiles. - The undo tablespace is already sized such that it always has more than enough space to store all the undo generated within the undo_retention time, and the in-use undo space never exceeds the undo tablespace warning alert threshold (see below for the query to show the thresholds).
- The tablespace threshold alerts recommend that the DBA add more space to the undo tablespace:SELECT creation_time, metric_value, message_type, reason, suggested_action
FROM dba_outstanding_alerts
WHERE object_name='';
This returns a suggested action of: "Add space to the tablespace".
Or,
This recommendation has been reported in the past but the condition has now cleared:SQL> SELECT creation_time, metric_value, message_type, reason, suggested_action, resolution
FROM dba_alert_history
WHERE object_name=''; - The
undo tablespace in-use space exceeded the warning alert threshold at
some point in time. To see the warning alert percentage threshold,
issue:SELECT object_type, object_name, warning_value, critical_value
FROM dba_thresholds
WHERE object_type='TABLESPACE';
To see the (current) undo tablespace percent of space in use:SELECT
((SELECT (NVL(SUM(bytes),0))
FROM dba_undo_extents
WHERE tablespace_name=''
AND status IN ('ACTIVE','UNEXPIRED')) * 100)/
(SELECT SUM(bytes)
FROM dba_data_files
WHERE tablespace_name='')
"PCT_INUSE"
FROM dual - SOLUTION:
- Set the AUTOEXTEND and MAXSIZE attributes of each datafile of the
undo tablespace in such a way that they are autoextensible and the
MAXSIZE is equal to the current size (so the undo tablespace now has the
AUTOEXTEND attribute but does not autoextend):ALTER DATABASE DATAFILE '' AUTOEXTEND ON MAXSIZE
With this setting, V$UNDOSTAT.TUNED_UNDORETENTION is not calculated based on a percentage of the undo tablespace size. Instead it is set to the maximum of (MAXQUERYLEN secs + 300) and UNDO_RETENTION. - Set the following instance parameter:_smu_debug_mode=33554432
With this setting, V$UNDOSTAT.TUNED_UNDORETENTION is not calculated based on a percentage of the fixed size undo tablespace. Instead it is set to the maximum of (MAXQUERYLEN secs + 300) and UNDO_RETENTION. - Set the following instance parameter:_undo_autotune = false
With this setting, V$UNDOSTAT (and therefore V$UNDOSTAT.TUNED_UNDORETENTION) is not maintained and the undo retention used is based on the UNDO_RETENTION instance parameter.NOTE: This means you loose all advantages in having automatic undo management and is not an ideal long term fix.
Automatic Tuning of Undo_retention Causes Space Problems (Doc ID 420525.1).- Set the AUTOEXTEND and MAXSIZE attributes of each datafile of the
undo tablespace in such a way that they are autoextensible and the
MAXSIZE is equal to the current size (so the undo tablespace now has the
AUTOEXTEND attribute but does not autoextend):
Thanks
Srini
No comments:
Post a Comment
No one has ever become poor by giving