Search Results init_pipe




Overview

CN_DEBUG is a utility package owned by the APPS schema in Oracle E-Business Suite and shipped as part of the supply chain planning (CN) product family. Its sole business function is diagnostic: it provides a lightweight, self-contained debugging and tracing facility that other PL/SQL programs can call to emit runtime messages and to control how much diagnostic output is produced. The package is declared AUTHID CURRENT_USER, so it executes with the privileges of the calling user rather than the definer, which is consistent with a shared instrumentation utility that must remain callable from many different schema contexts without granting elevated privileges.

The single-line history header (cnsydbgs.pls 115.1 99/07/16) and the author/date annotations on each routine indicate that CN_DEBUG is one of the oldest utility units in the CN schema, originally written in late 1993 and ported during the 1999 porting cycle. It has remained stable across 12.1.1 and 12.2.2, with no functional changes recorded in the documented metadata.

Key Procedures and Functions

The ETRM metadata documents four procedures, all public and none returning a value:

  • PRINT_MSG — Dumps a message into a debug messages table. It accepts a message and a debug code, allowing the caller to tag output with a severity or category and to have the message suppressed unless the active debug level permits it.
  • SET_DEBUG_LEVEL — Sets the current value of the debug level, establishing the threshold against which subsequent PRINT_MSG calls are evaluated.
  • SET_PIPENAME — Sets the name of the DBMS_PIPE to which error messages are directed, allowing output to be routed to a named pipe rather than simply logged.
  • INIT_PIPE — Initialises both the DBMS pipe name and the debug level in a single call. This is the entry point most commonly used by callers, matching the search term init_pipe.

No parameter lists beyond those shown in the source excerpt are documented here; only the names and purposes above are drawn from the ETRM record.

Tables Accessed

The documented ETRM metadata does not enumerate specific tables accessed through APPS synonyms. The declared purpose of PRINT_MSG, however, is to dump messages into a debug messages table, implying at least one logging table (historically a CN debug/trace table in the APPS schema) that receives the emitted rows. The pipe-related routines do not touch database tables directly; they operate on DBMS_PIPE session state.

Usage Notes

CN_DEBUG is an instrumentation package rather than a business API. It is typically invoked at the beginning of a debugging session, where the developer or support engineer calls INIT_PIPE (or the pair SET_PIPENAME and SET_DEBUG_LEVEL) to establish the output destination and verbosity, then scatters PRINT_MSG calls through the code path under investigation. Because the ETRM record lists 16 other packages as referencing CN_DEBUG, it is effectively a shared tracing library across the CN module rather than a point solution. It is not exposed through Oracle Forms or concurrent program registration; calls originate from custom or Oracle-supplied PL/SQL that has been instrumented for diagnostics. In 12.1.1 and 12.2.2 alike, the package should be treated as a development and support aid — enabling debug output adds overhead and should be disabled in normal production operation.