Search Results redo_startvalue
Overview
APPS.CZ_BASE_MGR is a utility package in the Oracle E-Business Suite (EBS) applications schema, owned by APPS and classified as OTHER within the ETRM metadata for release 12.2.2, with the same source lineage applicable to 12.1.1. Its header identifies an AUTHID CURRENT_USER compilation, meaning that all dynamic SQL and privilege checks execute with the privileges of the invoking session rather than the package owner. This is significant because the package manipulates schema-level objects — triggers, constraints, indexes, and sequences — across subscriber schemas, and it must therefore rely on the caller's grants to do so safely.
The package serves the broader CZ product family (particularly the Customer Data / configurator-related modules), providing controlled DDL (Data Definition Language) and DML operations for redo sequence generation, statistics regeneration, purge, and change-detection routines. It centralizes low-level housekeeping that would otherwise require manual DBA intervention, exposing it through PL/SQL procedures callable from concurrent programs, forms, and downstream packages.
Key Procedures and Functions
The documented procedures include the following:
- TRIGGERS_ENABLED — Toggles the enabled/disabled state of triggers within a named subschema, allowing bulk DDL operations or data loads to bypass trigger firing.
- CONSTRAINTS_ENABLED — Similarly toggles constraint enforcement for a subschema, supporting bulk loads or repairs without integrity-check overhead.
- REDO_STARTVALUE — A function returning the starting redo value for a given table record; it is the computational core invoked before a sequence is re-based.
- REDO_SEQUENCE — Regenerates a single sequence (or table-backed sequence) to a new start value, using the RedoStart flag, an increment, and returning a status flag and procedure name for logging.
- REDO_SEQUENCES — Iterates REDO_SEQUENCE across all sequences in a subschema, accepting the subschema name, a RedoStart flag, and an optional increment.
- PURGE — Removes obsolete or staged rows for a subschema.
- MODIFIED — Returns or advances the "as of" date used for change detection, accepting a subschema and an IN OUT date parameter.
- RESET_CLEAR — Clears reset flags or staging state for a subschema.
- REDO_STATISTICS — Recomputes statistics for a subschema, typically following redo operations.
- DSQL — A convenience wrapper for executing dynamic SQL statements.
- EXEC — Overloaded execution helpers that accept table name, WHERE clause, primary key columns, and a delete flag to perform targeted row operations.
- WRITE_TO_DB_LOGS — Logs caller, message, table name, message ID, and run ID to the repository (introduced for Sun, Bug 12346474).
- LOG_REPORT — Writes an error and message string to the log.
- GET_TABLE_NAMES — Populates an IN OUT NOCOPY table list of tables for a subschema, used as input to redo routines.
Tables Accessed
The package references APPS synonyms including CZ_DB_LOGS (audit trail for logged operations), CZ_DB_SETTINGS (configuration parameters such as batch size and schema name), CZ_DEVL_PROJECTS and CZ_PS_NODES (CZ product metadata), DBA_CONS_COLUMNS and DBA_IND_COLUMNS (dictionary views used to discover constraint and index column definitions), DBA_IND_COLUMNS, USER_CONSTRAINTS and USER_SYNONYMS (object discovery), and DBMS_SQL and PLITBLM (built-in dynamic SQL and index-by table support). These are read to introspect the schema before DDL, and written for logging via CZ_DB_LOGS and CZ_DB_SETTINGS.
Usage Notes
CZ_BASE_MGR is designed to be invoked primarily from concurrent programs and from other CZ packages — the metadata records that it is referenced by ten other packages. It is typically deployed during maintenance windows for redo sequence rebasing, statistics refresh, and purge activities. Because it executes DDL through AUTHID CURRENT_USER, callers must possess the necessary privileges on the target subschema objects. Batch processing is bounded by the BATCH_SIZE constant (10000). Customizations should call the public procedures rather than replicating their logic to preserve logging and audit behavior.