Oracle databases (LAM Pro)
Prev | Chapter 3. Managing entries in your LDAP directory | Next

## Oracle databases (LAM Pro)

Oracle allows to manage connection data that is stored in tnsnames.ora to be stored in an LDAP directory.

Initial setup

LDAP server setup:

You will need to install the correct Oracle LDAP schema files on your LDAP server. If you run no Oracle LDAP server then you can get them (oidbase.schema, oidnet.schema, oidrdbms.schema, alias.schema) e.g. from here.

Next you need to create the root entry for Oracle. It should look like this:

    dn: cn=OracleContext,dc=example,dc=com
    objectclass: orclContext
    cn: OracleContext

You can create it with LAM's tree view. Please note that "cn" must be set to "OracleContext".

LAM setup:

Edit your LAM server profile and add the Oracle account type:

In case you manage a single Oracle context just enter the cn=OracleContext entry as LDAP suffix. If you manage multiple Oracle context entries then set the LDAP suffix to a parent entry of them.

Next, add the Oracle module:

Now you can login to LAM and start to add database entries.

Managing database entries

Each database has a service name, the connection string and an optional description.

Database client setup for LDAP

You need to activate the LDAP adapter to make the database tools reading LDAP. Edit network/admin/sqlnet.ora like this:

    NAMES.DIRECTORY_PATH= (TNSNAMES, LDAP)

Then add a file called ldap.ora next to your sqlnet.ora and set the LDAP server and DN suffix where cn=OracleContext is stored:

    DIRECTORY_SERVERS= (ldap.example.com:389:636)
    DEFAULT_ADMIN_CONTEXT = "ou=ctx1,ou=oracle,o=test,c=de"
    DIRECTORY_SERVER_TYPE = OID

This will allow e.g. tnsping to get the connection data from LDAP:

    [oracle@oracle bin]$ tnsping mydb

    TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 09-FEB-2014 18:06:54

    Copyright (c) 1997, 2013, Oracle.  All rights reserved.

    Used parameter files:
    /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora

    Used LDAP adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mydb.example.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
    OK (10 msec)

Prev | Up | Next
Automount objects (LAM Pro) | Home | Password policies (LAM Pro)