<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>FOA(Fun Oracle Apps) - Learning Never Stops</title><description>Discover comprehensive insights into Oracle DBA, including Core DBA, RAC, Data Guard, EBS R12.2, Unix Shell Scripting, OAM, IDM, OID, SSO, Oracle Cloud, Leadership, Management,Excel and Linux. Enhance your skills with expert tips and remote job support.</description><managingEditor>noreply@blogger.com (Himanshu)</managingEditor><pubDate>Sun, 27 Sep 2026 21:47:17 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1160</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">3</openSearch:itemsPerPage><link>http://www.funoracleapps.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Discover comprehensive insights into Oracle DBA, including Core DBA, RAC, Data Guard, EBS R12.2, Unix Shell Scripting, OAM, IDM, OID, SSO, Oracle Cloud, Leadership, Management,Excel and Linux. Enhance your skills with expert tips and remote job support.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Oracle 11g AUD$ Table Maintenance After ORA-01653: Unable to Extend Table SYS.AUD$</title><link>http://www.funoracleapps.com/2026/09/oracle-11g-aud-table-maintenance-after.html</link><category>funoracleapps</category><category>Oracle</category><author>noreply@blogger.com (Himanshu)</author><pubDate>Thu, 3 Sep 2026 12:47:06 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6369673212267799064.post-2480468231049049572</guid><description>&lt;div&gt;&lt;h1&gt;Oracle 11g AUD$ Table Maintenance After ORA-01653: Unable to Extend Table SYS.AUD$&lt;/h1&gt;&lt;p&gt;&lt;strong&gt;Oracle 11g DBA Guide: Diagnose, Move, Monitor, and Purge the SYS.AUD$ Audit Table&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Oracle database administrators occasionally encounter a deceptively simple error:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;ORA-01653: unable to extend table SYS.AUD$ by 1024 in tablespace SYSTEM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At first glance, this appears to be nothing more than a tablespace-space problem. However, when the affected table is &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt;, the situation deserves more attention.&lt;/p&gt;&lt;p&gt;The &lt;code inline=""&gt;AUD$&lt;/code&gt; table is used by traditional Oracle auditing in Oracle 11g. As audit records accumulate, the table can grow significantly. If it remains in the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace and eventually cannot allocate another extent, the database can experience serious operational problems.&lt;/p&gt;&lt;p&gt;In some circumstances, the issue can even affect new database connections because Oracle needs to write audit information when users connect.&lt;/p&gt;&lt;p&gt;The immediate solution may be to add space to the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace, but that only treats the symptom. A better long-term solution is to:&lt;/p&gt;&lt;p style="text-align: left;"&gt;&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Investigate the size and configuration of SYS.AUD$&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Check the table's extent/storage configuration&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Determine how quickly audit data is growing&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Move audit data out of SYSTEM&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Configure appropriate audit-table maintenance&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Define an audit-data retention policy&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Configure automated audit cleanup&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Monitor the cleanup jobs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This guide walks through the process for &lt;strong&gt;Oracle Database 11g&lt;/strong&gt;.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The procedures in this article are specifically aimed at the traditional audit architecture used in Oracle 11g. Oracle 12c and later introduced Unified Auditing, so do not blindly apply an Oracle 11g &lt;code inline=""&gt;AUD$&lt;/code&gt; maintenance procedure to a different Oracle release.&lt;/p&gt;&lt;/blockquote&gt;&lt;hr /&gt;&lt;h1&gt;1. Understanding ORA-01653&lt;/h1&gt;&lt;p&gt;The error:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;ORA-01653: unable to extend table SYS.AUD$ by 1024 in tablespace SYSTEM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;means Oracle attempted to allocate another extent for &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt;, but could not obtain the required space.&lt;/p&gt;&lt;p&gt;One common cause is that the table's &lt;code inline=""&gt;NEXT&lt;/code&gt; extent requirement is larger than the available contiguous space in the tablespace.&lt;/p&gt;&lt;p&gt;The important point is that the problem isn't necessarily that the entire tablespace has absolutely no free space.&lt;/p&gt;&lt;p&gt;The database may have free space that cannot satisfy the extent allocation requirement.&lt;/p&gt;&lt;p&gt;For example, a table might require a large next extent while the available free space is fragmented into smaller pieces.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;2. Why SYS.AUD$ Can Become a Problem&lt;/h1&gt;&lt;p&gt;&lt;code inline=""&gt;SYS.AUD$&lt;/code&gt; contains traditional database audit records.&lt;/p&gt;&lt;p&gt;Depending on the auditing configuration, workload, number of users, login frequency, application activity, and retention policy, this table can grow continuously.&lt;/p&gt;&lt;p&gt;A busy production database can therefore accumulate millions of audit records.&lt;/p&gt;&lt;p&gt;The dangerous part is that &lt;code inline=""&gt;AUD$&lt;/code&gt; has historically been associated with the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace.&lt;/p&gt;&lt;p&gt;Allowing application-generated audit information to consume large amounts of the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace is not a good long-term maintenance strategy.&lt;/p&gt;&lt;p&gt;A much better approach is to separate audit storage from the core &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace and establish an appropriate cleanup policy.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;3. Immediate Response to ORA-01653&lt;/h1&gt;&lt;p&gt;If the database is currently experiencing the problem, the first priority is to make enough space available to allow Oracle to continue operating.&lt;/p&gt;&lt;p&gt;Check the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; datafiles:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200
COLUMN file_name FORMAT A80

SELECT
    file_id,
    file_name,
    bytes / 1024 / 1024 AS size_mb,
    autoextensible,
    maxbytes / 1024 / 1024 AS max_size_mb
FROM dba_data_files
WHERE tablespace_name = 'SYSTEM'
ORDER BY file_id;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check free space:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

SELECT
    tablespace_name,
    SUM(bytes) / 1024 / 1024 AS free_mb
FROM dba_free_space
WHERE tablespace_name = 'SYSTEM'
GROUP BY tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can also inspect the largest segments in &lt;code inline=""&gt;SYSTEM&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200
COLUMN owner FORMAT A20
COLUMN segment_name FORMAT A35
COLUMN segment_type FORMAT A20

SELECT
    owner,
    segment_name,
    segment_type,
    bytes / 1024 / 1024 AS size_mb
FROM dba_segments
WHERE tablespace_name = 'SYSTEM'
ORDER BY bytes DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt; is consuming a significant percentage of the tablespace, it should be investigated immediately.&lt;/p&gt;&lt;p&gt;Adding space to &lt;code inline=""&gt;SYSTEM&lt;/code&gt; may relieve the immediate allocation failure, but it should not be considered the complete solution.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;4. Document the Current AUD$ Configuration&lt;/h1&gt;&lt;p&gt;Before making changes, document the existing configuration.&lt;/p&gt;&lt;p&gt;This is particularly important on production systems.&lt;/p&gt;&lt;p&gt;Start by checking the segment information.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 300

COLUMN owner FORMAT A10
COLUMN segment_name FORMAT A15
COLUMN segment_type FORMAT A15
COLUMN segment_subtype FORMAT A15
COLUMN tablespace_name FORMAT A20

SELECT
    owner,
    segment_name,
    segment_type,
    segment_subtype,
    tablespace_name,
    bytes / 1024 / 1024 AS size_mb
FROM dba_segments
WHERE segment_name IN ('AUD$', 'FGA_LOG$')
ORDER BY segment_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This tells us where the audit tables are physically stored.&lt;/p&gt;&lt;p&gt;For example, you may see:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;OWNER      SEGMENT_NAME   SEGMENT_TYPE   TABLESPACE_NAME   SIZE_MB
---------- -------------- -------------- ----------------- --------
SYS        AUD$           TABLE           SYSTEM            21504
SYS        FGA_LOG$       TABLE           SYSTEM                0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The important observation is:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;SYS.AUD$ -&amp;gt; SYSTEM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If &lt;code inline=""&gt;AUD$&lt;/code&gt; is consuming many gigabytes of &lt;code inline=""&gt;SYSTEM&lt;/code&gt;, moving it should be considered.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;5. Check AUD$ Statistics&lt;/h1&gt;&lt;p&gt;Next, check when the table was last analyzed and the number of rows recorded in the data dictionary statistics.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN owner FORMAT A20
COLUMN table_name FORMAT A20

SELECT
    last_analyzed,
    owner,
    table_name,
    num_rows
FROM dba_tables
WHERE table_name IN ('AUD$', 'FGA_LOG$')
ORDER BY table_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;LAST_ANALYZED   OWNER   TABLE_NAME   NUM_ROWS
--------------  ------  -----------  ----------
01-DEC-18       SYS     AUD$         10704439
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Keep in mind that &lt;code inline=""&gt;NUM_ROWS&lt;/code&gt; comes from optimizer statistics and may not represent the exact current row count.&lt;/p&gt;&lt;p&gt;For an exact count:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT COUNT(*) AS audit_rows
FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And for Fine-Grained Auditing:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT COUNT(*) AS fga_rows
FROM SYS.FGA_LOG$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On a large audit table, &lt;code inline=""&gt;COUNT(*)&lt;/code&gt; can require substantial work, so consider the impact before running it on a busy production database.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;6. Check AUD$ Index and LOB Information&lt;/h1&gt;&lt;p&gt;Oracle 11g &lt;code inline=""&gt;AUD$&lt;/code&gt; can contain LOB-related segments associated with columns such as &lt;code inline=""&gt;SQLTEXT&lt;/code&gt; and &lt;code inline=""&gt;SQLBIND&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Check the indexes associated with the audit tables:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN owner FORMAT A10
COLUMN index_name FORMAT A40
COLUMN index_type FORMAT A20

SELECT
    owner,
    index_name,
    index_type,
    last_analyzed
FROM dba_indexes
WHERE table_name IN ('AUD$', 'FGA_LOG$')
  AND owner = 'SYS'
ORDER BY table_name, index_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can also identify the LOB segments:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN table_name FORMAT A15
COLUMN column_name FORMAT A30
COLUMN segment_name FORMAT A40

SELECT
    b.table_name,
    b.column_name,
    a.segment_name,
    a.bytes / 1024 / 1024 / 1024 AS size_gb
FROM dba_segments a
JOIN dba_lobs b
  ON a.owner = b.owner
 AND a.segment_name = b.segment_name
WHERE b.table_name IN ('AUD$', 'FGA_LOG$')
ORDER BY b.table_name, b.column_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This helps identify whether the LOB segments are contributing materially to the audit footprint.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;7. Check Which Tablespace Contains the Audit Tables&lt;/h1&gt;&lt;p&gt;A simple query can confirm the tablespace assignment:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN table_name FORMAT A20
COLUMN tablespace_name FORMAT A30

SELECT
    table_name,
    tablespace_name
FROM dba_tables
WHERE table_name IN ('AUD$', 'FGA_LOG$')
ORDER BY table_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Typical output might look like:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;TABLE_NAME   TABLESPACE_NAME
------------ ----------------
AUD$         SYSTEM
FGA_LOG$     SYSTEM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If &lt;code inline=""&gt;AUD$&lt;/code&gt; is consuming a large amount of &lt;code inline=""&gt;SYSTEM&lt;/code&gt;, this is an important finding.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;8. Check the Current Audit Management Configuration&lt;/h1&gt;&lt;p&gt;Oracle provides the &lt;code inline=""&gt;DBMS_AUDIT_MGMT&lt;/code&gt; package for managing audit trails.&lt;/p&gt;&lt;p&gt;First, inspect the current configuration:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET PAGESIZE 150
SET LINESIZE 200

COLUMN parameter_name FORMAT A35
COLUMN parameter_value FORMAT A25
COLUMN audit_trail FORMAT A30

SELECT
    parameter_name,
    parameter_value,
    audit_trail
FROM dba_audit_mgmt_config_params
ORDER BY audit_trail, parameter_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This provides information such as:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;PARAMETER_NAME
PARAMETER_VALUE
AUDIT_TRAIL
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pay particular attention to:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;code inline=""&gt;DB AUDIT TABLESPACE&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code inline=""&gt;DB AUDIT CLEAN BATCH SIZE&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;OS audit configuration&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;XML audit configuration&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr /&gt;&lt;h1&gt;9. Check the Last Archive Timestamp&lt;/h1&gt;&lt;p&gt;Before creating a purge policy, determine whether an archive timestamp has already been configured.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM dba_audit_mgmt_last_arch_ts;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If no rows are returned:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;no rows selected
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;there may not yet be a last archive timestamp configured for the audit trail.&lt;/p&gt;&lt;p&gt;You can also determine the oldest audit record currently present:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT MIN(ntimestamp#) AS oldest_audit_record
FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is useful for determining how much historical audit data exists.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;OLDEST_AUDIT_RECORD
------------------------------
28-JAN-19 12.20.33.754071 PM
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;10. Check the Current NEXT Extent Setting&lt;/h1&gt;&lt;p&gt;The original problem may be related to the size of the next extent Oracle is attempting to allocate.&lt;/p&gt;&lt;p&gt;Check the storage settings for &lt;code inline=""&gt;AUD$&lt;/code&gt;:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    table_name,
    next_extent,
    pct_increase,
    max_extents
FROM dba_tables
WHERE owner = 'SYS'
  AND table_name = 'AUD$';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Depending on the Oracle release and table configuration, some columns may not be populated or may have different semantics.&lt;/p&gt;&lt;p&gt;You can also inspect the segment directly:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    segment_name,
    bytes / 1024 / 1024 AS size_mb,
    extents
FROM dba_segments
WHERE owner = 'SYS'
  AND segment_name = 'AUD$';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The goal is to understand how large the segment has become and whether its allocation characteristics are appropriate.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;11. Reduce an Excessive NEXT Extent&lt;/h1&gt;&lt;p&gt;If the existing &lt;code inline=""&gt;NEXT&lt;/code&gt; extent is unnecessarily large, it can be adjusted.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER TABLE SYS.AUD$
STORAGE (NEXT 50M);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The original maintenance procedure uses a value in the range of approximately 50–100 MB as an example.&lt;/p&gt;&lt;p&gt;However, &lt;strong&gt;do not blindly use 50 MB or 100 MB in every production environment&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;The appropriate extent size depends on:&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Audit volume&lt;/li&gt;&lt;li&gt;Growth rate&lt;/li&gt;&lt;li&gt;Tablespace size&lt;/li&gt;&lt;li&gt;Storage architecture&lt;/li&gt;&lt;li&gt;Available free space&lt;/li&gt;&lt;li&gt;Database workload&lt;/li&gt;&lt;li&gt;Retention period&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A very small extent may result in excessive extent allocations, while an unnecessarily large extent can make space allocation more difficult.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;12. Create a Dedicated Audit Tablespace&lt;/h1&gt;&lt;p&gt;Rather than keeping audit data in &lt;code inline=""&gt;SYSTEM&lt;/code&gt;, consider creating a dedicated tablespace.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;CREATE TABLESPACE AUDIT_TS
DATAFILE '/u01/oradata/DBNAME/audit_ts01.dbf'
SIZE 5G
AUTOEXTEND ON
NEXT 500M
MAXSIZE 50G
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Replace the datafile path, database name, initial size, growth increment, and maximum size with values appropriate for your environment.&lt;/p&gt;&lt;p&gt;Before creating the tablespace, verify your storage layout and available disk capacity.&lt;/p&gt;&lt;p&gt;Check existing datafiles:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN file_name FORMAT A80

SELECT
    tablespace_name,
    file_name,
    bytes / 1024 / 1024 AS size_mb,
    autoextensible,
    maxbytes / 1024 / 1024 AS max_size_mb
FROM dba_data_files
ORDER BY tablespace_name, file_name;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;13. Move AUD$ Out of SYSTEM&lt;/h1&gt;&lt;p&gt;Oracle provides &lt;code inline=""&gt;DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION&lt;/code&gt; for relocating the database audit trail.&lt;/p&gt;&lt;p&gt;For the standard audit trail:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
        audit_trail_type          =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
        audit_trail_location_value =&amp;gt; 'AUDIT_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For Fine-Grained Auditing:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
        audit_trail_type          =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,
        audit_trail_location_value =&amp;gt; 'AUDIT_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If your environment uses &lt;code inline=""&gt;SYSAUX&lt;/code&gt; as the intended destination, replace:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;AUDIT_TS
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;with:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;SYSAUX
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The key concept is to move the audit trail away from &lt;code inline=""&gt;SYSTEM&lt;/code&gt; and into a tablespace designed and sized for audit data.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;14. Verify the AUD$ Tablespace After the Move&lt;/h1&gt;&lt;p&gt;After the operation completes, verify the new location.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN owner FORMAT A10
COLUMN segment_name FORMAT A15
COLUMN tablespace_name FORMAT A20

SELECT
    owner,
    segment_name,
    segment_type,
    tablespace_name,
    bytes / 1024 / 1024 AS size_mb
FROM dba_segments
WHERE segment_name = 'AUD$';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also check the table definition:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    table_name,
    tablespace_name
FROM dba_tables
WHERE owner = 'SYS'
  AND table_name IN ('AUD$', 'FGA_LOG$');
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The expected result is that the audit table is no longer consuming the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;15. Recheck SYSTEM Tablespace Usage&lt;/h1&gt;&lt;p&gt;After moving the audit table, check &lt;code inline=""&gt;SYSTEM&lt;/code&gt; again.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    tablespace_name,
    SUM(bytes) / 1024 / 1024 AS free_mb
FROM dba_free_space
WHERE tablespace_name = 'SYSTEM'
GROUP BY tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can also check the largest remaining segments:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    segment_name,
    segment_type,
    bytes / 1024 / 1024 AS size_mb
FROM dba_segments
WHERE tablespace_name = 'SYSTEM'
ORDER BY bytes DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This provides a much clearer picture of what is consuming the core system tablespace.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;16. Establish an Audit Retention Policy&lt;/h1&gt;&lt;p&gt;Moving the audit table does not solve unlimited growth.&lt;/p&gt;&lt;p&gt;The next question should be:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;How long does the organization actually need to retain audit records?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;30 days&lt;/li&gt;&lt;li&gt;90 days&lt;/li&gt;&lt;li&gt;180 days&lt;/li&gt;&lt;li&gt;1 year&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Multiple years&lt;p&gt;The correct retention period depends on:&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: left;"&gt;&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Security requirements&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Regulatory requirements&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Internal policies&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Application requirements&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Audit requirements&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Legal requirements&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Do not automatically delete audit records simply because they are old.&lt;/p&gt;&lt;p&gt;Establish and document the retention requirement first.&lt;/p&gt;&lt;p&gt;For this example, we will use &lt;strong&gt;365 days&lt;/strong&gt;.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;17. Initialize Audit Cleanup&lt;/h1&gt;&lt;p&gt;Oracle provides &lt;code inline=""&gt;DBMS_AUDIT_MGMT.INIT_CLEANUP&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Initialize cleanup with a 24-hour interval:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.INIT_CLEANUP(
        AUDIT_TRAIL_TYPE      =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
        DEFAULT_CLEANUP_INTERVAL =&amp;gt; 24
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Verify the configuration:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET PAGESIZE 150
SET LINESIZE 200

COLUMN parameter_name FORMAT A35
COLUMN parameter_value FORMAT A25
COLUMN audit_trail FORMAT A30

SELECT
    parameter_name,
    parameter_value,
    audit_trail
FROM dba_audit_mgmt_config_params
ORDER BY audit_trail, parameter_name;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;18. Create a Procedure to Set the Last Archive Timestamp&lt;/h1&gt;&lt;p&gt;For a one-year retention period, create a procedure that establishes the cutoff timestamp.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;CREATE OR REPLACE PROCEDURE AUD_SET_LAST_ARCH_TS
AS
    retention NUMBER;
BEGIN
    retention := 365; -- retention in days

    SYS.DBMS_AUDIT_MGMT.SET_LAST_ARCHIVE_TIMESTAMP(
        AUDIT_TRAIL_TYPE =&amp;gt; SYS.DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
        LAST_ARCHIVE_TIME =&amp;gt; SYSTIMESTAMP - retention
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The important part is:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SYSTIMESTAMP - retention
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;With:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;retention := 365;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;the archive timestamp is set to approximately one year before the current timestamp.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;19. Verify the Procedure&lt;/h1&gt;&lt;p&gt;Check that the procedure was created successfully:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    object_name,
    object_type,
    status
FROM dba_objects
WHERE object_name = 'AUD_SET_LAST_ARCH_TS';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You want:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;STATUS
------
VALID
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If it is invalid, inspect compilation errors:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SHOW ERRORS PROCEDURE AUD_SET_LAST_ARCH_TS;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;20. Create a Scheduler Job to Update the Archive Timestamp&lt;/h1&gt;&lt;p&gt;The timestamp needs to move forward over time.&lt;/p&gt;&lt;p&gt;Create a scheduler job:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB(
        job_name        =&amp;gt; 'JOB_SET_LAST_ARCH_TS',
        schedule_name   =&amp;gt; 'SYS.MAINTENANCE_WINDOW_GROUP',
        job_class       =&amp;gt; 'DEFAULT_JOB_CLASS',
        job_type        =&amp;gt; 'PLSQL_BLOCK',
        job_action      =&amp;gt; 'BEGIN AUD_SET_LAST_ARCH_TS(); END;',
        comments        =&amp;gt; 'Job to maintain the audit archive timestamp'
    );

    SYS.DBMS_SCHEDULER.ENABLE(
        name =&amp;gt; 'JOB_SET_LAST_ARCH_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This job executes the procedure that updates the last archive timestamp.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;21. Create the Audit Purge Job&lt;/h1&gt;&lt;p&gt;Now create the actual audit cleanup job.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.CREATE_PURGE_JOB(
        audit_trail_type          =&amp;gt; SYS.DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
        audit_trail_purge_interval =&amp;gt; 24,
        audit_trail_purge_name    =&amp;gt; 'JOB_PURGE_AUDIT_TRAIL',
        use_last_arch_timestamp   =&amp;gt; TRUE
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The important parameters are:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;AUDIT_TRAIL_ALL
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;to cover the configured audit trails,&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;audit_trail_purge_interval =&amp;gt; 24
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;to run cleanup every 24 hours,&lt;/p&gt;&lt;p&gt;and:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;use_last_arch_timestamp =&amp;gt; TRUE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;so the purge operation uses the archive timestamp as its retention boundary.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;22. Enable the Purge Job&lt;/h1&gt;&lt;p&gt;Create the job and then explicitly enable it:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_PURGE_JOB_STATUS(
        audit_trail_purge_name   =&amp;gt; 'JOB_PURGE_AUDIT_TRAIL',
        audit_trail_status_value =&amp;gt; DBMS_AUDIT_MGMT.PURGE_JOB_ENABLE
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At this point, the database has an automated mechanism for removing audit records beyond the defined retention boundary.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;23. Check the Audit Cleanup Job&lt;/h1&gt;&lt;p&gt;Verify the cleanup job:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN job_name FORMAT A35
COLUMN job_frequency FORMAT A30

SELECT *
FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Look for:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;JOB_PURGE_AUDIT_TRAIL
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and confirm that it is enabled and configured for the expected interval.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;24. Check the Scheduler Job&lt;/h1&gt;&lt;p&gt;You can also inspect Oracle Scheduler directly:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

COLUMN job_name FORMAT A35
COLUMN enabled FORMAT A10
COLUMN state FORMAT A15
COLUMN last_start_date FORMAT A35
COLUMN next_run_date FORMAT A35

SELECT
    job_name,
    enabled,
    state,
    last_start_date,
    next_run_date
FROM dba_scheduler_jobs
WHERE job_name IN (
    'JOB_SET_LAST_ARCH_TS',
    'JOB_PURGE_AUDIT_TRAIL'
)
ORDER BY job_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is useful for confirming whether the scheduler jobs are enabled and when they last ran or are expected to run next.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;25. Check Audit Cleanup History&lt;/h1&gt;&lt;p&gt;Oracle also provides a view showing cleanup activity:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 200

SELECT *
FROM DBA_AUDIT_MGMT_CLEAN_EVENTS
ORDER BY event_timestamp DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This helps determine whether audit cleanup operations are actually taking place.&lt;/p&gt;&lt;p&gt;For a more focused view:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    event_timestamp,
    audit_trail,
    delete_count,
    start_time,
    end_time
FROM DBA_AUDIT_MGMT_CLEAN_EVENTS
ORDER BY event_timestamp DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Column availability can vary depending on the exact Oracle 11g release and view definition, so verify the columns in your environment:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;DESC DBA_AUDIT_MGMT_CLEAN_EVENTS;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;26. Monitor AUD$ Growth&lt;/h1&gt;&lt;p&gt;After moving the table and implementing cleanup, continue monitoring it.&lt;/p&gt;&lt;p&gt;Check current size:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    owner,
    segment_name,
    bytes / 1024 / 1024 AS size_mb,
    extents
FROM dba_segments
WHERE owner = 'SYS'
  AND segment_name = 'AUD$';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check row count:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT COUNT(*) AS audit_rows
FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check the oldest record:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT MIN(ntimestamp#) AS oldest_record
FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;These three queries provide a simple ongoing health check:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;How much physical space is being consumed?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;How many audit records exist?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;How old is the oldest audit record?&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr /&gt;&lt;h1&gt;27. Calculate Audit Growth&lt;/h1&gt;&lt;p&gt;For capacity planning, capture the &lt;code inline=""&gt;AUD$&lt;/code&gt; size periodically.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    SYSDATE AS check_date,
    bytes / 1024 / 1024 AS size_mb
FROM dba_segments
WHERE owner = 'SYS'
  AND segment_name = 'AUD$';
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Run this daily or weekly and store the results.&lt;/p&gt;&lt;p&gt;Over time, you can determine:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;Daily growth
Weekly growth
Monthly growth
Peak growth
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This information is extremely useful when sizing the dedicated audit tablespace.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;28. Check Tablespace Free Space&lt;/h1&gt;&lt;p&gt;For the audit tablespace:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    tablespace_name,
    SUM(bytes) / 1024 / 1024 AS free_mb
FROM dba_free_space
WHERE tablespace_name = 'AUDIT_TS'
GROUP BY tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can compare that with total allocated space:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    tablespace_name,
    SUM(bytes) / 1024 / 1024 AS allocated_mb
FROM dba_data_files
WHERE tablespace_name = 'AUDIT_TS'
GROUP BY tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A simple percentage calculation can help with monitoring:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    df.tablespace_name,
    df.total_mb,
    NVL(fs.free_mb, 0) AS free_mb,
    df.total_mb - NVL(fs.free_mb, 0) AS used_mb,
    ROUND(
        ((df.total_mb - NVL(fs.free_mb, 0)) / df.total_mb) * 100,
        2
    ) AS used_pct
FROM
    (
        SELECT
            tablespace_name,
            SUM(bytes) / 1024 / 1024 AS total_mb
        FROM dba_data_files
        WHERE tablespace_name = 'AUDIT_TS'
        GROUP BY tablespace_name
    ) df
LEFT JOIN
    (
        SELECT
            tablespace_name,
            SUM(bytes) / 1024 / 1024 AS free_mb
        FROM dba_free_space
        WHERE tablespace_name = 'AUDIT_TS'
        GROUP BY tablespace_name
    ) fs
ON df.tablespace_name = fs.tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;29. Check Whether Audit Purging Is Working&lt;/h1&gt;&lt;p&gt;A healthy cleanup configuration should show evidence of regular cleanup.&lt;/p&gt;&lt;p&gt;Check:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CLEAN_EVENTS
ORDER BY event_timestamp DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check the cleanup jobs:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check the Scheduler:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    job_name,
    enabled,
    state,
    last_start_date,
    next_run_date
FROM DBA_SCHEDULER_JOBS
WHERE job_name IN (
    'JOB_SET_LAST_ARCH_TS',
    'JOB_PURGE_AUDIT_TRAIL'
);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If the jobs are enabled but are not running successfully, investigate the Scheduler job details and alert log.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;30. Verify That the Retention Boundary Is Moving&lt;/h1&gt;&lt;p&gt;Check:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_LAST_ARCH_TS;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The timestamp should advance as the scheduled procedure executes.&lt;/p&gt;&lt;p&gt;You can also manually execute the procedure during testing:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    AUD_SET_LAST_ARCH_TS;
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then verify:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_LAST_ARCH_TS;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Do this carefully in production because changing the archive timestamp influences which audit records qualify for cleanup.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;31. Validate the Oldest Remaining Audit Record&lt;/h1&gt;&lt;p&gt;After cleanup has run, check:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    MIN(ntimestamp#) AS oldest_audit_record,
    MAX(ntimestamp#) AS newest_audit_record
FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You should see the oldest record moving toward the configured retention boundary after successful purge cycles.&lt;/p&gt;&lt;p&gt;Do not expect the physical segment size to immediately shrink simply because rows were deleted.&lt;/p&gt;&lt;p&gt;This is an important Oracle storage concept.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;32. Why Purging Rows Does Not Necessarily Shrink the Datafile&lt;/h1&gt;&lt;p&gt;Deleting audit records does not automatically return the freed blocks to the operating system.&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;DELETE FROM SYS.AUD$;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;would remove rows but would not necessarily reduce the size of the underlying datafile.&lt;/p&gt;&lt;p&gt;Similarly, an automated audit purge is intended primarily to remove obsolete records and control future growth.&lt;/p&gt;&lt;p&gt;If the objective is to actually reduce the physical datafile size, that is a separate storage-management operation and requires careful planning.&lt;/p&gt;&lt;p&gt;Do &lt;strong&gt;not&lt;/strong&gt; attempt to shrink or resize database files casually on a production system.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;33. Important Production Considerations&lt;/h1&gt;&lt;p&gt;Before moving &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt; or configuring automated deletion, consider the following.&lt;/p&gt;&lt;h2&gt;Backup&lt;/h2&gt;&lt;p&gt;Ensure the database is protected by a valid backup strategy.&lt;/p&gt;&lt;p&gt;Before significant structural maintenance, verify that the latest backup is usable.&lt;/p&gt;&lt;h2&gt;Audit Requirements&lt;/h2&gt;&lt;p&gt;Do not select a retention period simply because it makes the database smaller.&lt;/p&gt;&lt;p&gt;Confirm the retention period with:&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Security&lt;/li&gt;&lt;li&gt;Compliance&lt;/li&gt;&lt;li&gt;Application owners&lt;/li&gt;&lt;li&gt;Internal audit&lt;/li&gt;&lt;li&gt;Legal/regulatory teams&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Test First&lt;/h2&gt;&lt;p&gt;If possible, test the procedure in a development or staging environment that resembles production.&lt;/p&gt;&lt;h2&gt;Maintenance Window&lt;/h2&gt;&lt;p&gt;Moving system-owned audit structures can have operational implications.&lt;/p&gt;&lt;p&gt;Plan the change carefully.&lt;/p&gt;&lt;h2&gt;Tablespace Capacity&lt;/h2&gt;&lt;p&gt;Make sure the destination tablespace has enough capacity for existing audit data plus future growth.&lt;/p&gt;&lt;h2&gt;Monitoring&lt;/h2&gt;&lt;p&gt;Moving &lt;code inline=""&gt;AUD$&lt;/code&gt; does not eliminate the need for monitoring.&lt;/p&gt;&lt;p&gt;It simply gives the audit trail a more appropriate storage and maintenance strategy.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;34. Complete Diagnostic Script&lt;/h1&gt;&lt;p&gt;The following script can be used as a starting point for documenting the current state.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SET LINESIZE 300
SET PAGESIZE 200

PROMPT =========================================
PROMPT AUD$ SEGMENT INFORMATION
PROMPT =========================================

SELECT
    owner,
    segment_name,
    segment_type,
    tablespace_name,
    bytes / 1024 / 1024 AS size_mb,
    extents
FROM dba_segments
WHERE segment_name IN ('AUD$', 'FGA_LOG$')
ORDER BY segment_name;


PROMPT =========================================
PROMPT AUD$ TABLE INFORMATION
PROMPT =========================================

SELECT
    owner,
    table_name,
    tablespace_name,
    last_analyzed,
    num_rows
FROM dba_tables
WHERE table_name IN ('AUD$', 'FGA_LOG$')
ORDER BY table_name;


PROMPT =========================================
PROMPT AUDIT TABLE COUNTS
PROMPT =========================================

SELECT COUNT(*) AS AUD_ROWS
FROM SYS.AUD$;

SELECT COUNT(*) AS FGA_ROWS
FROM SYS.FGA_LOG$;


PROMPT =========================================
PROMPT OLDEST AUDIT RECORD
PROMPT =========================================

SELECT
    MIN(ntimestamp#) AS oldest_audit_record,
    MAX(ntimestamp#) AS newest_audit_record
FROM SYS.AUD$;


PROMPT =========================================
PROMPT AUDIT TABLESPACE CONFIGURATION
PROMPT =========================================

SELECT
    table_name,
    tablespace_name
FROM dba_tables
WHERE table_name IN ('AUD$', 'FGA_LOG$')
ORDER BY table_name;


PROMPT =========================================
PROMPT AUDIT MANAGEMENT CONFIGURATION
PROMPT =========================================

SELECT *
FROM DBA_AUDIT_MGMT_CONFIG_PARAMS;


PROMPT =========================================
PROMPT LAST ARCHIVE TIMESTAMP
PROMPT =========================================

SELECT *
FROM DBA_AUDIT_MGMT_LAST_ARCH_TS;


PROMPT =========================================
PROMPT AUDIT CLEANUP JOBS
PROMPT =========================================

SELECT *
FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;


PROMPT =========================================
PROMPT CLEANUP HISTORY
PROMPT =========================================

SELECT *
FROM DBA_AUDIT_MGMT_CLEAN_EVENTS
ORDER BY event_timestamp DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;35. Complete Maintenance Example&lt;/h1&gt;&lt;p&gt;A simplified implementation could look like this.&lt;/p&gt;&lt;h3&gt;Step 1 — Reduce an unnecessarily large NEXT extent&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER TABLE SYS.AUD$
STORAGE (NEXT 50M);
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 2 — Move the standard audit trail&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
        audit_trail_type           =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
        audit_trail_location_value =&amp;gt; 'AUDIT_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 3 — Move the FGA audit trail&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION(
        audit_trail_type           =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,
        audit_trail_location_value =&amp;gt; 'AUDIT_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 4 — Initialize cleanup&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.INIT_CLEANUP(
        AUDIT_TRAIL_TYPE          =&amp;gt; DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
        DEFAULT_CLEANUP_INTERVAL  =&amp;gt; 24
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 5 — Create the retention procedure&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;CREATE OR REPLACE PROCEDURE AUD_SET_LAST_ARCH_TS
AS
    retention NUMBER;
BEGIN
    retention := 365;

    SYS.DBMS_AUDIT_MGMT.SET_LAST_ARCHIVE_TIMESTAMP(
        AUDIT_TRAIL_TYPE =&amp;gt; SYS.DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
        LAST_ARCHIVE_TIME =&amp;gt; SYSTIMESTAMP - retention
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 6 — Create the timestamp job&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB(
        job_name        =&amp;gt; 'JOB_SET_LAST_ARCH_TS',
        schedule_name   =&amp;gt; 'SYS.MAINTENANCE_WINDOW_GROUP',
        job_class       =&amp;gt; 'DEFAULT_JOB_CLASS',
        job_type        =&amp;gt; 'PLSQL_BLOCK',
        job_action      =&amp;gt; 'BEGIN AUD_SET_LAST_ARCH_TS(); END;',
        comments        =&amp;gt; 'Job to maintain audit retention timestamp'
    );

    SYS.DBMS_SCHEDULER.ENABLE(
        name =&amp;gt; 'JOB_SET_LAST_ARCH_TS'
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 7 — Create the purge job&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.CREATE_PURGE_JOB(
        audit_trail_type           =&amp;gt; SYS.DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
        audit_trail_purge_interval =&amp;gt; 24,
        audit_trail_purge_name     =&amp;gt; 'JOB_PURGE_AUDIT_TRAIL',
        use_last_arch_timestamp    =&amp;gt; TRUE
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 8 — Enable the purge job&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;BEGIN
    DBMS_AUDIT_MGMT.SET_PURGE_JOB_STATUS(
        audit_trail_purge_name   =&amp;gt; 'JOB_PURGE_AUDIT_TRAIL',
        audit_trail_status_value =&amp;gt; DBMS_AUDIT_MGMT.PURGE_JOB_ENABLE
    );
END;
/
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Step 9 — Verify&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CLEAN_EVENTS
ORDER BY event_timestamp DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;36. Troubleshooting the Cleanup Configuration&lt;/h1&gt;&lt;p&gt;If the purge job is not behaving as expected, start with the configuration.&lt;/p&gt;&lt;h3&gt;Check the cleanup parameters&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CONFIG_PARAMS;
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Check the archive timestamp&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_LAST_ARCH_TS;
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Check the cleanup jobs&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT *
FROM DBA_AUDIT_MGMT_CLEANUP_JOBS;
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Check Scheduler status&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    job_name,
    enabled,
    state,
    failure_count,
    last_start_date,
    next_run_date
FROM DBA_SCHEDULER_JOBS
WHERE job_name IN (
    'JOB_SET_LAST_ARCH_TS',
    'JOB_PURGE_AUDIT_TRAIL'
);
&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Check Scheduler run history&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT
    job_name,
    status,
    actual_start_date,
    run_duration,
    error#
FROM DBA_SCHEDULER_JOB_RUN_DETAILS
WHERE job_name IN (
    'JOB_SET_LAST_ARCH_TS',
    'JOB_PURGE_AUDIT_TRAIL'
)
ORDER BY actual_start_date DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If a job fails, inspect the &lt;code inline=""&gt;ERROR#&lt;/code&gt; and corresponding Oracle error information.&lt;/p&gt;&lt;hr /&gt;&lt;h1&gt;37. A Better DBA Maintenance Strategy&lt;/h1&gt;&lt;p&gt;The important lesson from &lt;code inline=""&gt;ORA-01653&lt;/code&gt; is that database maintenance should be proactive rather than reactive.&lt;/p&gt;&lt;p&gt;A healthy Oracle 11g audit-management strategy should include four components:&lt;/p&gt;&lt;h3&gt;1. Separate Storage&lt;/h3&gt;&lt;p&gt;Keep large audit structures out of &lt;code inline=""&gt;SYSTEM&lt;/code&gt; whenever practical.&lt;/p&gt;&lt;h3&gt;2. Appropriate Extent Configuration&lt;/h3&gt;&lt;p&gt;Avoid unnecessarily large extent allocation requirements.&lt;/p&gt;&lt;h3&gt;3. Defined Retention&lt;/h3&gt;&lt;p&gt;Determine exactly how long audit records need to be retained.&lt;/p&gt;&lt;h3&gt;4. Automated Cleanup&lt;/h3&gt;&lt;p&gt;Use Oracle's audit-management facilities and Scheduler to continuously maintain the audit trail.&lt;/p&gt;&lt;p&gt;This transforms the problem from:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;SYSTEM tablespace is full
        ↓
ORA-01653
        ↓
Production incident
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;into:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;Audit records
      ↓
Dedicated audit tablespace
      ↓
Defined retention policy
      ↓
Automated purge
      ↓
Continuous monitoring
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;38. Final Verification Checklist&lt;/h1&gt;&lt;p&gt;After completing the maintenance, verify each of the following.&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;[ ] ORA-01653 has been resolved
[ ] SYSTEM tablespace has adequate free space
[ ] SYS.AUD$ is no longer consuming unnecessary SYSTEM space
[ ] Destination audit tablespace has adequate capacity
[ ] AUD$ NEXT extent is appropriate
[ ] FGA_LOG$ location has been reviewed
[ ] Audit retention period has been documented
[ ] DBMS_AUDIT_MGMT cleanup has been initialized
[ ] Last archive timestamp is configured
[ ] Timestamp scheduler job is enabled
[ ] Audit purge job is enabled
[ ] Cleanup history shows successful executions
[ ] Scheduler history shows successful job runs
[ ] Audit table growth is being monitored
[ ] Backup and recovery requirements have been considered
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h1&gt;Conclusion&lt;/h1&gt;&lt;p&gt;&lt;code inline=""&gt;ORA-01653: unable to extend table SYS.AUD$&lt;/code&gt; should not be treated as simply another datafile-space alert.&lt;/p&gt;&lt;p&gt;When &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt; grows significantly, especially when it resides in the &lt;code inline=""&gt;SYSTEM&lt;/code&gt; tablespace, the database can become vulnerable to recurring space problems and operational issues.&lt;/p&gt;&lt;p&gt;The immediate response may be to add space to &lt;code inline=""&gt;SYSTEM&lt;/code&gt;, but the long-term solution is to understand why the audit table is growing and establish proper lifecycle management.&lt;/p&gt;&lt;p&gt;For Oracle 11g environments, a practical approach is to:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Investigate &lt;code inline=""&gt;SYS.AUD$&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Check its size and growth&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Review its extent configuration&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Move the audit trail to an appropriate tablespace&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Define an audit retention policy&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Initialize &lt;code inline=""&gt;DBMS_AUDIT_MGMT&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Configure a last-archive timestamp&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Create an automated purge job&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Monitor Scheduler and cleanup history&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Continuously monitor audit tablespace utilization&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The goal is not simply to fix today's &lt;code inline=""&gt;ORA-01653&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;The goal is to make sure the same audit-table space problem does not become tomorrow's production outage.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Always test changes in a non-production environment first and adapt the SQL, tablespace sizing, retention period, and maintenance schedule to your specific Oracle 11g environment.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqIbGZwCK0eEm9SNENycBQpRUH4ULImPWCTpTenfScgNf_ukCjhszfICUm0nGz3CQ76UDUu339fww782hf0B3sTdEEyLoQEv0mysTVQtYbC3v2t-YZ_lL90Ktt71Z2j9Rg5Xftmuwzi3ApqyWM8nNpVmlwcQ0UADKBdxpu-YlWedDDB9lQBZ-babwN6gQ/s189/funoracleapps_logo.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="141" data-original-width="189" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqIbGZwCK0eEm9SNENycBQpRUH4ULImPWCTpTenfScgNf_ukCjhszfICUm0nGz3CQ76UDUu339fww782hf0B3sTdEEyLoQEv0mysTVQtYbC3v2t-YZ_lL90Ktt71Z2j9Rg5Xftmuwzi3ApqyWM8nNpVmlwcQ0UADKBdxpu-YlWedDDB9lQBZ-babwN6gQ/s1600/funoracleapps_logo.png" width="189" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: red; font-family: arial;"&gt;&lt;b&gt;Please do like and subscribe to my youtube channel: 
https://www.youtube.com/@foalabs

If you like this post please follow,share and comment&lt;/b&gt;&lt;/span&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqIbGZwCK0eEm9SNENycBQpRUH4ULImPWCTpTenfScgNf_ukCjhszfICUm0nGz3CQ76UDUu339fww782hf0B3sTdEEyLoQEv0mysTVQtYbC3v2t-YZ_lL90Ktt71Z2j9Rg5Xftmuwzi3ApqyWM8nNpVmlwcQ0UADKBdxpu-YlWedDDB9lQBZ-babwN6gQ/s72-c/funoracleapps_logo.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Oracle Reports RWConverter Crash During REX to RDF Conversion </title><link>http://www.funoracleapps.com/2026/06/oracle-reports-rwconverter-crash-during.html</link><category>funoracleapps</category><category>Oracle Apps</category><author>noreply@blogger.com (Himanshu)</author><pubDate>Thu, 4 Jun 2026 09:29:22 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6369673212267799064.post-1654794943579732373</guid><description>&lt;div&gt;&lt;h1&gt;&lt;span style="font-family: arial;"&gt;Oracle Reports RWConverter Crash During REX to RDF Conversion&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;While working on an Oracle Reports migration task, I encountered an issue where &lt;code inline=""&gt;rwconverter&lt;/code&gt; consistently failed while converting a report from &lt;strong&gt;REX to RDF&lt;/strong&gt; format.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The error was not very descriptive. The converter crashed and generated a stack trace referencing Oracle Reports runtime libraries (&lt;code inline=""&gt;librw.so&lt;/code&gt;) and PL/SQL parsing functions. At first glance, it appeared to be a report corruption issue or an Oracle Reports bug.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Fortunately, the fix turned out to be quite simple.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style="font-family: arial;"&gt;The Problem&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The report conversion was being executed using:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span style="font-family: courier;"&gt;rwconverter.sh \
userid=user/password@DB \
stype=rex \
source=myreport.rex \
dtype=rdf \
dest=myreport.rdf&lt;/span&gt;&lt;span style="font-family: arial;"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Instead of completing successfully, &lt;code inline=""&gt;rwconverter&lt;/code&gt; terminated unexpectedly and displayed a stack trace containing references to Oracle Reports internal libraries and PL/SQL processing routines.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Because the failure occurred during report parsing, initial troubleshooting focused on:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Invalid report objects&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Corrupted report definitions&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Invalid database packages&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Oracle Reports patches&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Environment configuration issues&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;None of these investigations revealed the root cause.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style="font-family: arial;"&gt;The Solution&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Before executing &lt;code inline=""&gt;rwconverter&lt;/code&gt;, set the following environment variable:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span style="font-family: courier;"&gt;export DE_DISABLE_PLS_512=0&lt;/span&gt;&lt;span style="font-family: arial;"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Then rerun the conversion:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span style="font-family: courier;"&gt;export DE_DISABLE_PLS_512=0

rwconverter.sh \
userid=user/password@DB \
stype=rex \
source=myreport.rex \
dtype=rdf \
dest=myreport.rdf&lt;/span&gt;&lt;span style="font-family: arial;"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;After setting this variable, the conversion completed successfully and the RDF file was generated without errors.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style="font-family: arial;"&gt;What Does DE_DISABLE_PLS_512 Mean?&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;&lt;code inline=""&gt;DE_DISABLE_PLS_512&lt;/code&gt; is an Oracle Developer/Reports environment variable related to the PL/SQL engine used by Oracle Developer tools.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The variable influences how Oracle Reports handles PL/SQL processing internally. During report compilation, conversion, and validation, Oracle Reports parses embedded PL/SQL contained in:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Formula columns&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Report triggers&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Program units&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Lexical parameters&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;PL/SQL libraries&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;In certain environments, PL/SQL processing can cause unexpected failures during report conversion. Setting:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-bash"&gt;&lt;span style="font-family: courier;"&gt;export DE_DISABLE_PLS_512=0&lt;/span&gt;&lt;span style="font-family: arial;"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;ensures that the appropriate PL/SQL handling mechanism is enabled during execution, which can prevent crashes encountered while converting reports.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Although Oracle has not widely documented every internal behavior associated with this variable, it has been known within Oracle Reports troubleshooting scenarios to resolve issues related to PL/SQL parsing and report compilation.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style="font-family: arial;"&gt;When Should You Try This?&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Consider testing this setting if:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;&lt;code inline=""&gt;rwconverter&lt;/code&gt; crashes during execution&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;You are converting reports from REX to RDF&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Stack traces reference &lt;code inline=""&gt;librw.so&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The failure appears related to PL/SQL parsing&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Database objects are valid but the converter still fails&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Manual report recompilation is being performed as part of troubleshooting&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;span style="font-family: arial;"&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK4FaLTUzWmCrvrAkq-mjdDoIqRyR5tv6flnq9rSKsr0BGW8bbimAFkvMueqKBg3qjZDcY0HM1gpPoZlqOh6qm8Lzm15JPp0AFUk602Inl3JQW9BOtOIp8DlUVKv-WZQl9H_uq7_4IUiwywJWaMvsJP7R8loY99nRyqZApgTM5QdGNes2DXORME0CNPzc/s189/funoracleapps_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="141" data-original-width="189" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK4FaLTUzWmCrvrAkq-mjdDoIqRyR5tv6flnq9rSKsr0BGW8bbimAFkvMueqKBg3qjZDcY0HM1gpPoZlqOh6qm8Lzm15JPp0AFUk602Inl3JQW9BOtOIp8DlUVKv-WZQl9H_uq7_4IUiwywJWaMvsJP7R8loY99nRyqZApgTM5QdGNes2DXORME0CNPzc/s1600/funoracleapps_logo.png" width="189" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span style="color: red;"&gt;Please do like and subscribe to my youtube channel: 
https://www.youtube.com/@foalabs

If you like this post please follow,share and comment&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK4FaLTUzWmCrvrAkq-mjdDoIqRyR5tv6flnq9rSKsr0BGW8bbimAFkvMueqKBg3qjZDcY0HM1gpPoZlqOh6qm8Lzm15JPp0AFUk602Inl3JQW9BOtOIp8DlUVKv-WZQl9H_uq7_4IUiwywJWaMvsJP7R8loY99nRyqZApgTM5QdGNes2DXORME0CNPzc/s72-c/funoracleapps_logo.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ORA-01555 on Physical Standby Databases Opened in Read Only Mode</title><link>http://www.funoracleapps.com/2026/05/ora-01555-on-physical-standby-databases.html</link><category>funoracleapps</category><category>Oracle</category><author>noreply@blogger.com (Himanshu)</author><pubDate>Fri, 29 May 2026 10:47:59 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6369673212267799064.post-1482114299592209411</guid><description>&lt;div&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;ORA-01555 on Physical Standby Databases Opened in Read Only Mode&lt;/span&gt;&lt;/h2&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Deep Dive into Snapshot Too Old Errors in Active Data Guard Environments&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Modern Oracle environments frequently use standby databases not only for disaster recovery but also for reporting and analytics. With Active Data Guard, organizations can open a physical standby database in read-only mode while redo apply continues in real time. This architecture is powerful, but it introduces a problem many DBAs do not initially expect:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ORA-01555: snapshot too old
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Most administrators associate ORA-01555 with highly transactional primary databases. However, this error can also occur on standby databases even though users are not directly modifying data there.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This article explains why ORA-01555 happens on standby databases, how Oracle internally manages read consistency during redo apply, and the most effective methods to eliminate the issue in production systems.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Understanding ORA-01555&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;ORA-01555 occurs when Oracle cannot reconstruct an older version of a data block required for query consistency.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Oracle guarantees that a query sees data exactly as it existed when the query started. This mechanism is called &lt;strong&gt;read consistency&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;To achieve this consistency, Oracle uses undo records. When blocks change, Oracle stores older versions of the data inside undo segments so queries can continue reading a consistent image.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;The error appears when:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;A query runs for a long period&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Oracle needs older undo information&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;The required undo has already been overwritten&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;At that point, Oracle can no longer recreate the earlier block image, and the query fails with ORA-01555.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Why ORA-01555 Happens on a Read-Only Standby&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;One of the biggest misconceptions is that standby databases do not generate undo because users cannot perform DML operations.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;That assumption is incorrect.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: arial;"&gt;In an Active Data Guard configuration:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Redo is continuously shipped from the primary database&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Managed Recovery Process (MRP) applies those changes on standby&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Data blocks on standby are constantly changing internally&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Oracle still requires undo information to maintain read consistency for active queries&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Although the standby is open in read-only mode for users, redo apply behaves like continuous internal update activity.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;As a result, reporting queries running on standby may need older versions of blocks while redo apply continues modifying them.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;If the necessary undo information disappears before the query completes, Oracle raises:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ORA-01555: snapshot too old
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Internal Concept Behind the Error&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;To fully understand the issue, consider the following example.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;A reporting query begins at:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;10:00 AM&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;At the same time:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Redo from primary continues arriving&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;MRP continuously applies changes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Blocks are updated internally on standby&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Undo records are generated and reused&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Suppose the query still requires an old version of a block at:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;10:45 AM
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;But the undo information needed to reconstruct that block has already been overwritten due to ongoing redo apply activity.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Oracle can no longer provide a consistent image to the query, which leads to:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ORA-01555
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This is why even a “read-only” standby database can experience snapshot too old errors.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Common Reasons for ORA-01555 on Standby&lt;/span&gt;&lt;/h2&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;1. Long-Running Reporting Queries&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This is the most common cause.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Large reporting jobs, BI dashboards, or ETL extraction queries may run for several hours while redo apply continuously changes underlying blocks.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The longer the query runs, the higher the chance that required undo information gets overwritten.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;2. Heavy Redo Generation on Primary&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Standby databases directly inherit workload pressure from the primary database.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;Operations such as:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Bulk updates&lt;/li&gt;&lt;li&gt;Data purges&lt;/li&gt;&lt;li&gt;Massive ETL jobs&lt;/li&gt;&lt;li&gt;Index rebuilds&lt;/li&gt;&lt;li&gt;Batch processing&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;generate huge amounts of redo.&lt;p&gt;&lt;span style="font-family: arial;"&gt;When redo apply becomes extremely active, undo segments on standby recycle more aggressively.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This significantly increases ORA-01555 probability.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;3. Small Undo Tablespace&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Even if undo retention is configured correctly, a small undo tablespace forces Oracle to reuse undo extents earlier than desired.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Many standby databases are configured with minimal storage because administrators assume they only serve DR purposes. Once reporting workloads begin using standby, that sizing becomes insufficient.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;4. Low Undo Retention&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Undo retention determines how long Oracle attempts to preserve undo data.&lt;/p&gt;&lt;p&gt;If retention is shorter than the runtime of reporting queries, undo may disappear before queries finish.&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;5. Simultaneous Reporting and Recovery Peaks&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;br /&gt;ORA-01555 commonly appears during periods where:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Reporting activity is high&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Redo apply is also extremely active&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Nightly reporting overlapping with ETL windows&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Financial reporting during month-end loads&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;BI extractions during bulk imports&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Diagnosing ORA-01555 on Standby&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;The first step is confirming that the standby database is actively applying redo while serving queries.&lt;/span&gt;&lt;/p&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Check Database Role and Open Mode&lt;/span&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT database_role,
       open_mode
FROM v$database;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Typical output:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;PHYSICAL STANDBY
READ ONLY WITH APPLY
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This confirms Active Data Guard is enabled.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;Identifying Long Running Queries&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Queries with long execution times are primary candidates.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT sid,
       serial#,
       sql_id,
       username,
       event,
       last_call_et
FROM v$session
WHERE status='ACTIVE'
ORDER BY last_call_et DESC;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Focus on sessions with very large &lt;code inline=""&gt;LAST_CALL_ET&lt;/code&gt; values.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;Analyzing Undo Statistics&lt;/h3&gt;&lt;p style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Oracle provides undo history in &lt;code inline=""&gt;V$UNDOSTAT&lt;/code&gt;.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT begin_time,
       tuned_undoretention,
       maxquerylen,
       undoblks,
       txncount
FROM v$undostat
ORDER BY begin_time;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Important values:&lt;/span&gt;&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;span style="font-family: arial;"&gt;Column&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span style="font-family: arial;"&gt;Meaning&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: arial;"&gt;TUNED_UNDORETENTION&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-family: arial;"&gt;-- Actual effective undo retention&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: arial;"&gt;MAXQUERYLEN&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-family: arial;"&gt;-- Longest running query duration&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;If:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;&lt;span style="font-family: arial;"&gt;MAXQUERYLEN &amp;gt; TUNED_UNDORETENTION
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;then ORA-01555 risk is extremely high.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Checking Undo Tablespace Size&lt;/span&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT tablespace_name,
       SUM(bytes)/1024/1024 MB
FROM dba_data_files
WHERE tablespace_name LIKE 'UNDO%'
GROUP BY tablespace_name;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Small undo tablespaces are often the root cause in standby reporting systems.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Reviewing Alert Logs&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Alert logs help correlate ORA-01555 with workload spikes.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Search for:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-text"&gt;ORA-01555&lt;/code&gt;&lt;span style="font-family: arial;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;Then compare timestamps with:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;ETL execution&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Batch jobs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Redo spikes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Reporting schedules&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;hr /&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Best Solutions for ORA-01555 on Standby&lt;/span&gt;&lt;/h2&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Increase Undo Retention&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;One of the most effective fixes is increasing undo retention.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Check current value:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SHOW PARAMETER undo_retention;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Increase retention:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER SYSTEM SET undo_retention=14400;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This preserves undo for four hours.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;However, retention alone is not sufficient unless adequate undo space exists.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Expand Undo Tablespace&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;A small undo tablespace causes Oracle to overwrite undo regardless of retention settings.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Adding additional space is often the real fix.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Example:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER TABLESPACE UNDOTBS1
ADD DATAFILE '/u01/oradata/UNDOTBS02.dbf'
SIZE 20G AUTOEXTEND ON;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also consider enabling autoextend:&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER DATABASE DATAFILE
'/u01/oradata/UNDOTBS01.dbf'
AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED;
&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Optimize Reporting Queries&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Long-running queries increase ORA-01555 exposure.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Performance tuning can dramatically reduce failures.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;Key improvements include:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Using indexes efficiently&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Eliminating unnecessary full table scans&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Partition pruning&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Reducing sorting overhead&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Improving join conditions&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Avoiding Cartesian joins&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Reducing query runtime reduces undo dependency duration.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Reduce Redo Apply During Reporting Windows&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Some organizations temporarily pause redo apply during critical reporting periods.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Stop apply:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Restart apply afterward:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This approach reduces internal block churn while reports execute.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;However, it also increases standby lag and should be used carefully.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Separate Reporting from Disaster Recovery&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial;"&gt;&lt;br /&gt;Large enterprise environments often deploy:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;One standby for disaster recovery&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Another standby dedicated for reporting&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;This isolates reporting workloads from recovery activity and significantly improves stability.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Monitor Undo Proactively&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Many ORA-01555 incidents can be avoided through monitoring.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Recommended query:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;SELECT tuned_undoretention,
       maxquerylen
FROM v$undostat;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;If maximum query length consistently approaches undo retention values, action should be taken before failures occur.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Real Production Scenario&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;A financial institution deployed Oracle 19c Active Data Guard for reporting.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: arial;"&gt;The standby database was configured with:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;8 GB undo tablespace&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;900-second undo retention&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Nightly ETL jobs on primary generated massive redo volumes between 1 AM and 3 AM.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;At the same time, reporting teams executed large BI reports that ran for nearly two hours.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;During peak windows, reports failed repeatedly with:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class="language-sql"&gt;ORA-01555: snapshot too old
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Investigation revealed that redo apply activity recycled undo much faster than reporting queries could complete.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The DBA team implemented the following changes:&lt;br /&gt;&lt;/span&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Increased undo retention to four hours&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Expanded undo tablespace from 8 GB to 64 GB&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Tuned reporting SQL&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Rescheduled ETL overlap&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: arial;"&gt;After these adjustments:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;ORA-01555 incidents disappeared&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Reporting stabilized&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Standby lag remained acceptable&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;hr /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="font-family: arial;"&gt;Key Takeaways&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;ORA-01555 on standby databases is not unusual in Active Data Guard environments.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Even though users cannot modify data directly on standby, redo apply continuously changes blocks internally, and Oracle still relies on undo for consistent reads.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The most common causes include:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Long-running queries&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Heavy redo apply&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Insufficient undo retention&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Small undo tablespaces&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The most effective solutions are:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Increase undo retention&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Expand undo tablespace&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Tune reporting SQL&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: arial;"&gt;Reduce overlap between heavy redo generation and reporting workloads&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;Understanding how Oracle maintains read consistency during redo apply is essential for designing stable and scalable standby reporting environments.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: arial;"&gt;When properly sized and monitored, Active Data Guard can support large reporting workloads without ORA-01555 interruptions.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQlXpaLNL0U99Qh3v373WTM-qt9-21QSMm-HFskQxmrqyFbkTo7JG2taTjq32l_Uuha2XBNisMwYR97BtHpkTAaTiG-x1kv_Ci7UhQH9VNFb8Ah0SXElh5o7FgSXnyWtREWBUB8S6wFuVG0acxBV3Ru5JWvnV_xAzxYLGN9jlTSDtgybxsAVbt1vWPkDU/s189/funoracleapps_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="141" data-original-width="189" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQlXpaLNL0U99Qh3v373WTM-qt9-21QSMm-HFskQxmrqyFbkTo7JG2taTjq32l_Uuha2XBNisMwYR97BtHpkTAaTiG-x1kv_Ci7UhQH9VNFb8Ah0SXElh5o7FgSXnyWtREWBUB8S6wFuVG0acxBV3Ru5JWvnV_xAzxYLGN9jlTSDtgybxsAVbt1vWPkDU/s1600/funoracleapps_logo.png" width="189" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: red; font-family: arial;"&gt;&lt;b&gt;Please do like and subscribe to my youtube channel: 
https://www.youtube.com/@foalabs

If you like this post please follow,share and comment&lt;/b&gt;&lt;/span&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQlXpaLNL0U99Qh3v373WTM-qt9-21QSMm-HFskQxmrqyFbkTo7JG2taTjq32l_Uuha2XBNisMwYR97BtHpkTAaTiG-x1kv_Ci7UhQH9VNFb8Ah0SXElh5o7FgSXnyWtREWBUB8S6wFuVG0acxBV3Ru5JWvnV_xAzxYLGN9jlTSDtgybxsAVbt1vWPkDU/s72-c/funoracleapps_logo.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>