My Oracle Support Banner

How to purge huge data from SYS.WRI$_OPTSTAT_HISTGRM_HISTORY in Batches? (Doc ID 2737308.1)

Last updated on JULY 24, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Cloud Infrastructure - Exadata Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Gen 2 Exadata Cloud at Customer - Version N/A and later
Information in this document applies to any platform.

Goal

Deleting historical data from sys.wri$_optstat_histgrm_history using:

could result in ORA-1555 error if there is large amount data to be purged.
In this case, data older the data retention period of 7 days was being purged.

This document provides the steps for deleting the older data in smaller batches, to avoid ORA-1555 error.

Solution

To view full details, sign in with your My Oracle Support account.

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


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.