Search Results utl_raw




Overview

SYS.UTL_RAW is a core Oracle-supplied PL/SQL package that provides primitive operations for manipulating and converting binary data stored in the RAW datatype. It forms part of the STANDARD-adjacent utility layer bundled with the Oracle database kernel and is present in every Oracle E-Business Suite instance regardless of module footprint. In the context of Oracle EBS 12.1.1 and 12.2.2, UTL_RAW underpins the way the application tier serializes, hashes, encrypts, and transports binary payloads — for example in FND_GFM file attachments, XML Gateway message blobs, and the encryption routines used by Applications Security. The package body is owned by SYS and carries a VALID status in the ETRM inventory for 12.2.2, confirming that the compiled body is intact and available to dependent code. Because this object is a package body referencing SYS, STANDARD, and the UTL_RAW specification itself, it represents the implementation layer of the public UTL_RAW API rather than an EBS-specific customization. No customer-specific logic should ever be placed inside it, and it must not be modified under any circumstances, as recompilation or patching by Oracle would overwrite any non-standard changes.

Key Procedures and Functions

The ETRM documentation records 26 procedures and functions for this package, of which the following are explicitly catalogued. Conversion routines include CAST_TO_RAW, CAST_TO_VARCHAR2, CAST_TO_NVARCHAR2, CAST_TO_NUMBER, and CAST_FROM_NUMBER, which translate values between RAW bytes and other datatypes without character-set interpretation. String-oriented operations include CONCAT for byte concatenation, LENGTH for byte-length determination, SUBSTR for byte-range extraction, TRANSLATE and TRANSLITERATE for byte-set substitution and deletion, OVERLAY for in-place byte replacement, COPIES for repetition, REVERSE for byte-order inversion, and XRANGE for generating a range of RAW values. COMPARE performs ordinal comparison of two RAW values. CONVERT handles character-set conversion of RAW input. Bitwise operations — BIT_AND, BIT_OR, BIT_XOR, and BIT_COMPLEMENT — manipulate the binary content of RAW values directly, which is essential for cryptographic and encoding workloads inside EBS. Together these procedures constitute the complete documented surface of the package body.

Tables Accessed

The documented metadata for SYS.UTL_RAW lists no table references. This is consistent with the package's role: it is a pure computational utility that operates entirely on its input arguments and returns derived values, performing no DML against application or database tables. The metadata also records that UTL_RAW is not referenced by any other database object in the dependency graph, although the 12.2.2 documentation notes that it is referenced by 203 other packages in practice across the EBS schema. No APPS synonyms tables are listed as accessed by this object.

Usage Notes

UTL_RAW is invoked indirectly rather than through EBS forms or concurrent programs directly. It is the underlying engine for higher-level packages such as DBMS_CRYPTO, DBMS_OBFUSCATION_TOOLKIT, and numerous Oracle Applications APIs that must manipulate binary attachment data, Oracle XML Publisher blobs, and encrypted passwords. Custom EBS development frequently calls UTL_RAW.CAST_TO_RAW and CAST_TO_VARCHAR2 when converting between VARCHAR2 and RAW for hash key generation. Execute privileges are typically granted to PUBLIC by Oracle, so custom code can call the package without additional grants. Because it is a SYS-owned, kernel-level package, it should be treated as read-only infrastructure — never wrapped, altered, or subclassed — and any reliance on it in custom EBS code should be documented against the database version, as behavior is stable across 12.1.1 and 12.2.2.