Managing the Repository

Oracle Trace File Analyzer stores all diagnostic collections in the repository.

The repository size is the maximum space Oracle Trace File Analyzer is able to use on disk to store collections.

Purging the Repository Automatically

Oracle Trace File Analyzer closes the repository under any of the following conditions:

  • Free space in TFA_HOME is less than 100 MB. Indexing also stops.
  • Free space in ORACLE_BASE is less than 100 MB. Indexing also stops.
  • Free space in the repository is less than 1 GB.
  • The current repository size exceeds the configured maximum size (reposizeMB).

The Oracle Trace File Analyzer daemon monitors the repository and automatically purges it when the available space falls below 1 GB or before the repository is closed.

During automatic purging, Oracle Trace File Analyzer removes collections from largest to smallest until sufficient space is available for the repository to open.

Only collections older than the value specified by minagetopurge are automatically purged. The default value of minagetopurge is 12 hours.

Automatic repository purging is enabled by default.

To configure automatic repository purging:

  1. To change the minimum age of collections eligible for purging, set minagetopurge to the required number of hours:

    set minagetopurge=<number_of_hours>

    For example, to purge only collections older than 48 hours:

    tfactl set minagetopurge=48
  2. To enable or disable automatic purging, set autopurge to ON or OFF:

    set autopurge=ON|OFF

    For example, to enable automatic purging:

    tfactl set autopurge=ON
  3. To change the repository location, set repositorydir to the new directory:

    set repositorydir=<directory>

    Note:

    The new directory must be named repository.

    For example:

    tfactl set repositorydir=/opt/repository
  4. To change the maximum repository size, set reposizeMB to the required size in MB:

    set reposizeMB=<size_in_MB>

    For example, to set the maximum repository size to 20480 MB:

    tfactl set reposizeMB=20480

Purging the Repository Manually

You can manually review and purge collections from the Oracle Trace File Analyzer repository.

To purge the repository manually:

  1. View the current status of the Oracle Trace File Analyzer repository:

    tfactl print repository
  2. View statistics about the collections stored in the repository:

    tfactl print collections
  3. Purge collections older than a specified number of hours or days:

    tfactl purge -older <number>[h|d] [-force]

    Where:

    • <number> specifies the age of the collections to purge.
    • h specifies the age in hours.
    • d specifies the age in days.
    • -force forces the purge operation.

    For example, to purge collections older than 48 hours:

    tfactl purge -older 48h

    To purge collections older than 7 days:

    tfactl purge -older 7d