| Lesson 6 | Overview of LDAP Directory Naming |
| Objective | Use LDAP Directory Naming in Oracle 26ai |
LDAP Directory Naming in Oracle AI Database 26ai
Directory Naming maps connect identifiers to connect descriptors in an LDAP-compliant directory. Clients look up a database service, net service name, or net service alias in the directory instead of in a per-host
tnsnames.ora file (worth pairing with
a predictable naming and distribution strategy, tested with TNSPING, for whatever local entries remain in the mix) or the retired
Oracle Names service.
Oracle Names and the
namesctl utility are obsolete. Do not install, start, or administer a Names server on 26ai. There is no
namesctl replacement command for Directory Naming. You administer the directory with the directory's own tools, and you administer Oracle Net objects with Oracle Net Configuration Assistant (NetCA), Oracle Net Manager, or Enterprise Manager Cloud Control.
Supported directory servers for 26ai Directory Naming include:
- Oracle Internet Directory (OID), still supported but now legacy for most new designs; Oracle Unified Directory is the current recommendation for new LDAP directory service deployments
- Oracle Unified Directory (OUD)
- OpenLDAP (same
DIRECTORY_SERVER_TYPE=OID as OID/OUD)
- Microsoft Active Directory (
DIRECTORY_SERVER_TYPE=AD)
Worth being precise about scope here too: this list is about where net service names live, not about database identity. For enterprise user authentication specifically, Centrally Managed Users (CMU), covered in Lesson 1, is the current recommendation over the older Enterprise User Security approach; Directory Naming of net services doesn't require either one.
Connect identifiers live under an Oracle Context, typically
cn=OracleContext plus your domain components, for example
cn=sales,cn=OracleContext,dc=example,dc=com. Object classes include
orclDbServer (database service),
orclNetService (net service name), and
orclNetServiceAlias (alias with no connect descriptor of its own).
Comparison:
- Oracle Names (legacy): Central Names database plus
namesctl. Removed from current releases.
- Local naming:
tnsnames.ora on each client.
- Directory Naming (26ai): LDAP lookup via
ldap.ora/sqlnet.ora, or LDAP parameters embedded in the connect identifier. No namesctl.
- Easy Connect / Centralized Configuration Provider: Alternatives when you do not want LDAP.
Configure Directory Naming
LDAP Parameters in the Connect Identifier (No ldap.ora Required)
26ai can pass Directory Naming parameters in the connect string itself. Values in the string override
ldap.ora/
sqlnet.ora when both exist.
ldap[s]://host[:port]/name[,context][?parameter=value{¶meter=value}]
Example:
sqlplus "appuser/password@ldaps://ldap1.example.com:636/cn=sales,cn=OracleContext,dc=example,dc=com?DIRECTORY_SERVER_TYPE=oid&AUTHENTICATE_BIND=true&AUTHENTICATE_BIND_METHOD=LDAPS_SIMPLE_AUTH&WALLET_LOCATION=/u01/app/oracle/wallet/ldap"
DIRECTORY_SERVER_TYPE is
oid (OID, OUD, OpenLDAP) or
ad.
What Replaced namesctl
namesctl controlled Oracle Names servers (START, STOP, RELOAD, QUERY, and so on). Those operations have no 26ai equivalent because there is no Names server process.
Use these instead:
- Directory availability and schema: OID/OUD/AD consoles,
ldapsearch, directory replication tools.
- Oracle Net client config:
netca, netmgr, Enterprise Manager Cloud Control.
- Listener process control: still
lsnrctl, unchanged role; it never replaced namesctl.
- Optional cache of directory entries: export Directory Naming entries to a
tnsnames.ora file and distribute that file so clients can fall back to local naming if LDAP is unreachable.
Putting It Together: A Worked Example
Walking through the whole sequence for a fictional
SALES service makes the individual pieces easier to place. Assume OID is already running, and an Oracle Context exists under
dc=example,dc=com.
- Run
netca, choose Directory Usage Configuration, point it at the OID host on ports 389 and 636, and select the naming context containing cn=OracleContext. This writes ldap.ora to $TNS_ADMIN or the default network/admin location.
- In
sqlnet.ora, set NAMES.DIRECTORY_PATH = (LDAP, TNSNAMES, EZCONNECT) so LDAP is checked first, plus sane timeout values so a directory outage fails fast instead of hanging every client.
- Create the
SALES net service name entry itself, either through Oracle Net Manager's Directory folder, or by exporting an existing tnsnames.ora entry into the directory if one already exists locally.
- Verify with
tnsping SALES, then an actual connection attempt, sqlplus appuser@SALES, since a successful ping only confirms the listener is reachable, not that the service itself resolves and authenticates correctly.
If anonymous browse of
cn=OracleContext isn't permitted in your directory's security policy, add the authenticated-bind parameters,
NAMES.LDAP_AUTHENTICATE_BIND, the bind method, and a wallet location, created with
orapki rather than the deprecated
mkstore, before repeating the verification step.
