Search Results date_offset




Overview

The APPS.CS_PURGE_KM_SESSION_ATTRS_PKG package body provides a housekeeping utility for the Oracle EBS knowledge management (KM) schema. Its sole documented business purpose is to purge obsolete session attribute rows generated during interactions with the Knowledge Base. Over time, the session attribute table accumulates records that capture transient environmental and context information for external knowledge searches. Retaining these rows indefinitely increases storage consumption and degrades query performance against the associated session tables. This package supplies a controlled, batch-oriented mechanism to remove qualifying records based on record creation date.

The package is classified under API classification OTHER in the ETRM 12.2.2 metadata and is owned by the APPS schema. The header comment embedded in the source identifies the file as cskbsarb.pls, version 120.1, last shipped in June 2005. The package body contains a single documented procedure and references exactly one table through an APPS synonym.

Key Procedures and Functions

  • START_PROGRAM — The package's only documented entry point and the procedure used when the package is executed as a concurrent program. It accepts an error buffer and return code as standard concurrent program output parameters, plus a numeric date offset that defaults to a value of one. The procedure writes progress messages to the concurrent manager log before and after performing its purge operation. Deletion is restricted to rows whose attribute type equals EXTERNAL and whose creation date precedes the current system date truncated to midnight, minus the supplied date offset. Those two conditions are the core of the procedure's logic. An exception handler wraps the operation: if any unhandled error occurs, a message is written to the log, the error buffer is populated, and the return code is set to indicate failure. When no exception is raised, processing completes normally.

No other procedures or functions are documented in the package metadata. The DATE_OFFSET parameter is the element most relevant to users who searched on that term: it is the single configurable input that determines how many days of session attribute history are preserved before purging.

Tables Accessed

  • CS_KB_SESSION_ATTRS — Accessed through its APPS synonym. This is the Knowledge Base session attributes table, and it is the target of the package's delete operation. Rows in this table record attribute values associated with knowledge base sessions and are identified by an attribute type column, one value of which is EXTERNAL. The purge procedure removes only EXTERNAL rows older than the calculated cutoff date, leaving all other attribute types intact.

Usage Notes

The procedure is designed for invocation as an Oracle EBS concurrent program rather than for direct interactive use. The ERRBUF and RETCODE parameters follow the concurrent program output convention, and all diagnostic output is directed to the concurrent manager log through FND_FILE.PUT_LINE. The module is normally scheduled to run periodically, with the documented log text indicating its intended behavior of purging attribute values for the previous day.

The DATE_OFFSET value controls the retention window. Its default of one removes rows created before the start of the previous day; a higher value extends retention by the corresponding number of days, and a value of zero retains only rows created today. Administrators should note that the deletion is unconditional with respect to all EXTERNAL attributes meeting the date test, and that no backup or archive step exists between the log message and the delete statement. The package is not referenced by any other documented package in the ETRM metadata, so its execution is driven exclusively by external scheduling or manual submission. The embedded header indicates the source line is unchanged since 2005, and the package performs no commit internally within the documented body, leaving transaction control to the concurrent manager framework.