Search Results rollback_delete




Overview

APPS.HR_DM_UTILITY is a general-purpose PL/SQL utility package that supports the Oracle Human Resources Data Migration (HR_DM) framework in Oracle E-Business Suite 12.1.1 and 12.2.2. The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the calling session rather than the package owner, which is significant because the HR_DM migration components are frequently invoked by application users and concurrent programs operating within the APPS schema.

The package encapsulates the shared infrastructure used by the various HR data migration worker packages: phase tracking, process logging, error and message handling, thread and chunk sizing, and — most notably — rollback logic. Because a data migration may touch a large number of HR tables across multiple phases, the framework needs a controlled mechanism to undo partial or failed migrations. HR_DM_UTILITY provides that mechanism through a family of rollback procedures, one of which is ROLLBACK_RANGE_MASTER, the routine most commonly associated with searches for this object. The package is documented as referenced by eighteen other packages, confirming its role as a low-level dependency rather than an end-user entry point.

Key Procedures and Functions

The package exposes twenty-two documented procedures and functions. They fall into four functional groupings.

  • General-purpose functions: GET_PHASE_STATUS and GET_PHASE_ID return the current state and internal identifier of a migration phase for a given migration, while NUMBER_OF_THREADS and CHUNK_SIZE derive the parallelism and batch sizing appropriate to a business group. SET_PROCESS records the currently executing process text against a phase and migration.
  • Error and message procedures: ERROR centralizes SQLCODE handling, attributes the failure to a named procedure, accepts supplementary text, and carries a rollback flag whose default value indicates that a rollback should be performed. MESSAGE and MESSAGE_INIT control formatted progress and status output during a migration run.
  • Rollback procedures: ROLLBACK is the general entry point, accepting a phase, an optional master/slave indicator, and optional migration and phase item identifiers. The specialized routines — ROLLBACK_RANGE_MASTER, ROLLBACK_DOWN_AOL_MASTER, ROLLBACK_UP_AOL_MASTER, ROLLBACK_DOWNLOAD_MASTER, ROLLBACK_INIT, ROLLBACK_GENERATOR, ROLLBACK_CLEANUP, ROLLBACK_DELETE and ROLLBACK_UPLOAD — each target a specific migration stage, allowing the framework to reverse an individual stage without unwinding the entire migration. ROLLBACK_RANGE_MASTER specifically reverses the master range population step for a given migration.
  • Migration bookkeeping: UPDATE_MIGRATIONS and UPDATE_MIGRATION_RANGES maintain the migration and range status records that the rollback routines later consult.

Tables Accessed

HR_DM_UTILITY reads and writes the core HR_DM control tables through APPS synonyms. HR_DM_MIGRATIONS and HR_DM_MIGRATION_RANGES hold migration headers and the ranges processed within each migration; UPDATE_MIGRATIONS, UPDATE_MIGRATION_RANGES, and ROLLBACK_RANGE_MASTER operate directly against them. HR_DM_PHASES and HR_DM_PHASE_ITEMS drive phase status tracking used by GET_PHASE_STATUS, GET_PHASE_ID, and SET_PROCESS. HR_DM_TABLES and HR_DM_TABLE_GROUPINGS describe the source objects and their grouping, informing chunk sizing and selective rollback. BEN_BATCH_PARAMETER supplies the batch and threading parameters that NUMBER_OF_THREADS and CHUNK_SIZE translate into runtime settings.

Usage Notes

HR_DM_UTILITY is normally invoked indirectly. The HR Data Migration concurrent programs and the associated migration forms call the package to initialize a run, log progress, and — on failure or user request — execute ROLLBACK or one of its specialized variants such as ROLLBACK_RANGE_MASTER. Because eighteen packages depend on it, custom migration extensions written in the APPS schema will typically call the same routines rather than reimplementing rollback and error handling. Direct invocation is generally limited to diagnostic or recovery scenarios, and callers should observe the package's error and message conventions so that phase status and migration bookkeeping remain consistent.