C Configuring OpenLDAP Server to Use Oracle Net Naming Directory

This appendix describes the steps to configure OpenLDAP server to work with Oracle Net Services LDAP schema.

OpenLDAP is an open source implementation of LDAP. Oracle Database client uses entries created using Oracle Net Services LDAP schema.

  1. Download, install, and configure OpenLDAP server.
  2. Add $ORACLE_HOME/network/ldap/schema/openldap/orclnetnaming.schema to slapd.conf. If $ORACLE_HOME is /opt/oracle, then include /opt/oracle/network/ldap/schema/openldap/orclnetnaming.schema in slapd.conf.
  3. Start OpenLDAP server.
  4. Add oracleContext in preferred naming context. The following example shows the createorclctx.ldif file contents to add OracleContext, assuming dc=my-domain,dc=com is the chosen naming context.
    $ cat createorclctx.ldif  
    dn: cn=oracleContext,dc=my-domain,dc=com
    objectclass: orclContext 
    cn: oracleContext
  5. Add the entry created in Step 4 to OpenLDAP server using ldapadd.

    ldapadd example:

    $ ldapadd -H <OpenLDAP Server Name and Port> -D <DN of user having privileges to add> -f createorclctx.ldif <applicable authentication flags>
  6. Create LDAP entry for storing connection descriptor. The following example shows sales.ldif entry details, assuming oracleContext is created under dc=my-dmain,dc=com.
    $ cat sales.ldif  
    dn: cn=sales,cn=oraclecontext,dc=my-domain,dc=com
    objectclass: top 
    objectclass: orclNetService 
    orclnetdescstring:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=databasehost)(PORT=1521))
    (CONNECT_DATA=(SERVICE_NAME=mydbservice.us.example.com))) 
    cn: sales
  7. Add the entry created in Step 6 to OpenLDAP server using ldapadd.

    ldapadd example:

    $ ldapadd -H <OpenLDAP Server Name and Port> -D <DN of user having privileges to add> -f sales.ldif <applicable authentication flags>