Search Results get_values_blob




Overview

SYS.DBMS_LDAP is the Oracle-supplied PL/SQL interface to the Lightweight Directory Access Protocol (LDAP) C API. It exposes directory-service operations directly to the database server so that PL/SQL code can bind to, search, modify, and manage entries in an LDAP-compliant directory such as Oracle Internet Directory (OID), Oracle Unified Directory, Active Directory, or OpenLDAP. Within Oracle E-Business Suite 12.1.1 and 12.2.2, the package underpins the integration between the EBS application tier and the enterprise directory that provides centralized authentication, user provisioning, and single sign-on. The package is declared with AUTHID CURRENT_USER, so it executes with the privileges of the calling schema rather than the defining schema. It carries a documented VERSION constant of '2' and an INTERFACE_VERSION constant of '2', and the CHECK_INTERFACE_VERSION function allows callers to confirm that the loaded library supports the expected interface level before issuing further calls.

Key Procedures and Functions

The ETRM documents 45 procedures and functions in this package. The core session functions include INIT, which initializes the LDAP library and returns a session handle used by all subsequent calls, and UNBIND_S, which terminates a session. Authentication is handled by SIMPLE_BIND_S and the more general BIND_S, which establish credentials against the directory. Directory query operations include SEARCH_S, which executes a search and returns a message handle, and SEARCH_ST, which performs the search against an established session; FIRST_ENTRY, NEXT_ENTRY, and COUNT_ENTRIES iterate over and count the entries in a result set. Attribute handling is provided by FIRST_ATTRIBUTE and NEXT_ATTRIBUTE for traversal, GET_DN for retrieving the distinguished name of an entry, and the value retrieval family consisting of GET_VALUES, GET_VALUES_LEN, and GET_VALUES_BLOB. GET_VALUES_LEN, the object the user searched for, returns the length of the values associated with a given attribute, allowing callers to size buffers or determine whether an attribute is multi-valued before extraction. GET_VALUES returns textual values, while GET_VALUES_BLOB returns binary values. COMPARE_S performs an attribute comparison against an entry. Modification operations include DELETE_S and DELETE for removing entries and MODRDN2_S for renaming or moving entries through a relative distinguished name change.

Tables Accessed

The package does not access application tables directly. The documented ETRM metadata lists no tables referenced through APPS synonyms, which is consistent with its role as an external-program interface: its data store is the LDAP directory reached through the C library, not the EBS schema. Result data is returned to the caller through PL/SQL collection types declared in the package, including STRING_COLLECTION for text values and BINVAL_COLLECTION, BERVAL_COLLECTION, and BLOB_COLLECTION for binary and large-object values. Callers persist or interpret results in their own tables and processes.

Usage Notes

DBMS_LDAP is invoked from custom PL/SQL, database packages, and concurrent programs that need to read from or write to the enterprise directory, for example to synchronize EBS users with OID or to validate credentials. Because it is a server-side package, code that calls it executes in the database session and requires the appropriate network access from the database tier to the directory server. Typical usage follows the sequence of INIT, a bind call, one or more search or modification calls, entry and attribute traversal, value extraction via GET_VALUES, GET_VALUES_LEN, or GET_VALUES_BLOB, and finally UNBIND_S to release the session. Passwords and bind credentials must be handled carefully. ETRM records that the package is referenced by two other packages, confirming its role as a shared dependency rather than an end-user entry point. The GET_VALUES_LEN call is most useful when the number and size of attribute values are not known in advance.