Skip to main content

Purging Data Manually

Purging Data Manually

The Purge Management Data page enables you to purge entries in the event log, message warehouse, business process log, business rule log, and I/O archive log all at one time for a given namespace. The page displays information about the entries in a table with the following columns:

  • Record Type — Indicates the type of production data associated with the row. Each row contains one type of artifact that running productions produce on an ongoing basis: Event Log, Messages, Business Processes, Business Rule Log, I/O Log, or Managed Alerts.

  • Count — Shows the total number of entries of a given Record Type stored for the production. You can use the Count value to decide whether it is worthwhile to purge the entries and if so, how many days’ worth of records to keep.

  • Deleted — After you click Start Purge and the system completes the purge process, shows the total number of entries of a given Record Type that were purged.

Additionally, the Purge Criteria area displays the default settings that your system administrator configured for manual purges.

To purge production data manually, do the following:

  1. Switch to the namespace where you want to purge data.

  2. Navigate to the Interoperability > Manage > Purge Management Data page.

  3. If you have appropriate permissions, modify the settings in the Purge Criteria area as needed.

    For more information, see Settings for Purging Data.

    Caution:

    Purges are irreversible and can lead to unintentionally orphaned data or the loss of unresolved requests. Consequently, InterSystems recommends that you carefully review the description of each setting before proceeding.

  4. Click Start Purge.

    The system immediately purges the persistent store using the settings in the Purge Criteria area. The page uses a background job to perform purges, and reports the results of the last-run purge, including a status code, or a notice if the background job is running or has failed to run. After the purge, the Deleted column displays the number of records that were purged.

    The Start Purge button is disabled while a purge is being executed in a given namespace.

  5. Purging using the Management Portal only purges 500 chunks of bitmaps at a time. If you are purging a large number of messages this will leave unpurged bitmaps which can take up space. To remove these you can run another purge via the Terminal. Run the purge using the following settings:

    set pDaysToKeep=7
    set pKeepIntegrity=0
    set pBodiesToo=1
    set pBitmapChunkLimit=10000000000
    
    write ##class(Ens.Util.MessagePurge).Purge(pDeletedCount, pDaysToKeep, pKeepIntegrity, pBodiesToo, pBitmapChunkLimit, pExtendedOptions)
    
    zwrite pDeletedCount
    
FeedbackOpens in a new tab