2.177 PURGEOLDEXTRACTS for Manager

Valid for

Manager

Description

Use PURGEOLDEXTRACTS in a Manager parameter file to purge trail files when Oracle GoldenGate has finished processing them. By using PURGEOLDEXTRACTS as a Manager parameter, you can use options that are not available with the Extract or Replicat version. Allowing Manager to control the purging helps to ensure that no file is purged until all groups are finished with it.

To purge trail files, you can use the following rules:

  • Purge if all processes are finished with a file as indicated by checkpoints. Use the USECHECKPOINTS option. (This is the default.)

  • MINKEEP rules set the time or number of files to keep. Specify only one of the following three parameters.

    • Keep files or rows for at least a specified number of hours or days. Use the MINKEEPHOURS and MINKEEPDAYS options.

    • Keep at least n files including the active file. Use the MINKEEPFILES option.

The Manager process determines which files to purge based on Extract and Replicat processes configured on the local system. If at least one process reads a trail file, Manager applies the specified rules; otherwise, the rules do not take effect.

Refer to the information on managing trails in the Recommendations for Managing Trail Purgesfor recommendations on using the rules.

Default

None (do not purge)

Syntax

PURGEOLDEXTRACTS trail_name 
[, USECHECKPOINTS | NOUSECHECKPOINTS] 
[, min_rule]
trail_name

The trail to purge. Use the fully qualified name.

USECHECKPOINTS

Purges after all Extract or Replicat processes are finished with the file as indicated by checkpoints.

NOUSECHECKPOINTS

Allows purging without considering checkpoints, based on keeping a minimum of one file (if no MINKEEP rule is used) or the number of files specified with a MINKEEP rule.

min_rule

Use only one of the following to set rules for the minimum amount of time to keep data.

MINKEEPHOURS num

Keeps an unmodified file for at least the specified number of hours.

MINKEEPDAYS num

Keeps an unmodified file for at least the specified number of days.

MINKEEPFILES num

Keeps at least num unmodified files, including the file being considered for purging.

Examples

Example 1   

The following example purges all files in the \NY.$DATA3.GGSDAT subvolume after checkpoints indicate that they no longer are needed, but it keeps the files at least 3 days.

PURGEOLDEXTRACTS \NY.$DATA3.GGSDAT.*, USECHECKPOINTS, MINKEEPDAYS 3
Example 2   

Trail files AA000000, AA000001, and AA000002 exist. Replicat has been down for four hours and has not completed processing. The Manager parameters include:

PURGEOLDEXTRACTS /ggs/dirdat/AA*, NOUSECHECKPOINTS, MINKEEPHOURS 2

Result: All trail files will be purged because the minimums have been met.