Create the following files in /etc/openldap/schema
OIDBASE.SCHEMA
OIDRDBMS.SCHEMA
OIDNET.SCHEMA

OIDBASE.SCHEMA

attributetype ( 2.16.840.1.113894.7.1.1 NAME ‘orclVersion’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.7.1.2 NAME ‘orclOracleHome’ SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.7.1.3 NAME ‘orclSystemName’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.7.1.4 NAME ‘orclServiceType’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.7.1.5 NAME ‘orclSid’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.7.1.6 NAME ‘orclProductVersion’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
objectClass ( 2.16.840.1.113894.7.2.2 NAME ‘orclContainer’ SUP ‘top’ STRUCTURAL MUST ( cn ) )
objectClass ( 2.16.840.1.113894.7.2.3 NAME ‘orclContext’ SUP ‘top’ STRUCTURAL MUST ( cn ) )
objectClass ( 2.16.840.1.113894.7.2.6 NAME ‘orclSchemaVersion’ SUP ‘top’ STRUCTURAL MUST ( cn $ orclProductVersion ) )
attributetype ( 2.16.840.1.113894.3.1.12 NAME ‘orclNetDescName’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.13 NAME ‘orclNetDescString’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
objectClass ( 2.16.840.1.113894.7.2.1001 NAME ‘orclService’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclServiceType $ orclOracleHome $ orclSystemName $ orclSid $ orclNetDescName $ orclNetDescString $ orclVersion $ Description ) )

OIDRDBMS.SCHEMA

attributetype ( 2.16.840.1.113894.2.1.1 NAME ‘orclDBtrustedUser’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ )
attributetype ( 2.16.840.1.113894.2.1.2 NAME ‘orclDBServerMember’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ )
attributetype ( 2.16.840.1.113894.2.1.3 NAME ‘orclDBEntUser’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ )
attributetype ( 2.16.840.1.113894.2.1.4 NAME ‘orclDBEntRoleAssigned’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ )
attributetype ( 2.16.840.1.113894.2.1.5 NAME ‘orclDBServerRole’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
attributetype ( 2.16.840.1.113894.2.1.6 NAME ‘orclDBTrustedDomain’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.2.1.7 NAME ‘orclDBRoleOccupant’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ )
attributetype ( 2.16.840.1.113894.2.1.8 NAME ‘orclDBDistinguishedName’ EQUALITY distinguishedNameMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.12’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.2.1.9 NAME ‘orclDBNativeUser’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.2.1.10 NAME ‘orclDBGlobalName’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
objectClass ( 2.16.840.1.113894.2.2.1 NAME ‘orclDBServer’ SUP ‘orclService’ STRUCTURAL MAY ( userCertificate $ orclDBtrustedUser $ orclDBGlobalName ) )
objectClass ( 2.16.840.1.113894.2.2.2 NAME ‘orclDBEnterpriseDomain’ SUP top STRUCTURAL MUST cn MAY ( orclDBServerMember $ orclDBEntUser $ orclDBTrustedDomain ) )
objectClass ( 2.16.840.1.113894.2.2.3 NAME ‘orclDBEnterpriseRole’ SUP top STRUCTURAL MUST cn MAY ( orclDBServerRole $ orclDBEntRoleAssigned $ description $ seeAlso $ o $ ou $ orclDBRoleOccupant ) )
objectClass ( 2.16.840.1.113894.2.2.4 NAME ‘orclDBEntryLevelMapping’ SUP top STRUCTURAL MUST cn MAY ( orclDBDistinguishedName $ orclDBNativeUser ) )
objectClass ( 2.16.840.1.113894.2.2.5 NAME ‘orclDBSubtreeLevelMapping’ SUP top STRUCTURAL MUST cn MAY ( orclDBDistinguishedName $ orclDBNativeUser ) )

OIDNET.SCHEMA

attributetype ( 2.16.840.1.113894.3.1.1 NAME ‘orclNetSourceRoute’ SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.5’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.2 NAME ‘orclNetLoadBalance’ SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.5’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.3 NAME ‘orclNetFailover’ SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.5’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.4 NAME ‘orclNetSdu’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.5 NAME ‘orclNetServer’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.6 NAME ‘orclNetServiceName’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.7 NAME ‘orclNetInstanceName’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.8 NAME ‘orclNetHandlerName’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.9 NAME ‘orclNetParamList’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
attributetype ( 2.16.840.1.113894.3.1.10 NAME ‘orclNetAuthenticationType’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.11 NAME ‘orclNetAuthParams’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.14 NAME ‘orclNetAddressString’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.15 NAME ‘orclNetProtocol’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.16 NAME ‘orclNetShared’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.17 NAME ‘orclNetAddrList’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
attributetype ( 2.16.840.1.113894.3.1.18 NAME ‘orclNetProtocolStack’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
attributetype ( 2.16.840.1.113894.3.1.19 NAME ‘orclNetDescList’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
attributetype ( 2.16.840.1.113894.3.1.20 NAME ‘orclNetConnParamList’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ )
attributetype ( 2.16.840.1.113894.3.1.21 NAME ‘orclNetAuthenticationService’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.15’ SINGLE-VALUE )
objectClass ( 2.16.840.1.113894.3.2.5 NAME ‘orclNetService’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclNetDescName $ orclNetDescString $ orclVersion $ Description ) )
objectClass ( 2.16.840.1.113894.3.2.4 NAME ‘orclNetDescriptionList’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclNetDescList $ orclNetSourceRoute $ orclNetLoadBalance $ orclNetFailover $ orclNetShared $ orclVersion $ Description ) )
objectClass ( 2.16.840.1.113894.3.2.3 NAME ‘orclNetDescription’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclNetAddrList $ orclNetProtocolStack $ orclNetSdu $ orclSid $ orclNetServer $ orclNetServiceName $ orclNetInstanceName $ orclNetHandlerName $ orclOracleHome $ orclNetAuthenticationType $ orclNetAuthenticationService $ orclNetAuthParams $ orclNetParamList $ orclNetConnParamList $ orclNetSourceRoute $ orclNetLoadBalance $ orclNetFailover $ orclNetShared $ orclVersion $ Description ) )
objectClass ( 2.16.840.1.113894.3.2.2 NAME ‘orclNetAddressList’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclNetAddrList $ orclNetSourceRoute $ orclNetLoadBalance $ orclNetFailover $ orclNetShared $ orclVersion $ Description ) )
objectClass ( 2.16.840.1.113894.3.2.1 NAME ‘orclNetAddress’ SUP ‘top’ STRUCTURAL MUST ( cn ) MAY ( orclNetAddressString $ orclNetProtocol $ orclNetShared $ orclVersion $ Description ) )

EDIT SLAPD.CONF

Add the following lines in the ‘include’ section at the top:
include         /etc/openldap/schema/oidbase.schema
include         /etc/openldap/schema/oidrdbms.schema
include         /etc/openldap/schema/oidnet.schema

CREATE THE LDIF FILES

Assuming we are using “dc=dev,dc=local”, database emrep
create the following in /etc/openldap

base.ldif
dn: dc=dev,dc=local
objectclass: dcObject
objectclass: organization
o: DEV Network
dc: dev

manager.ldif
dn: cn=root,dc=dev,dc=local
objectClass: organizationalRole
cn: root

OracleContext.ldif
dn: cn=OracleContext,dc=dev,dc=local
objectclass: orclContext
cn: OracleContext

emrep.ldif
dn: cn=emrep,cn=OracleContext,dc=dev,dc=local
objectclass: top
objectclass: orclNetService
cn: emrep
orclNetDescString: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devhost1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=emrep)))

ADD THE LDAP DEFINITIONS

ldapadd -x -D “cn=root,dc=fcdev,dc=local” -W -f base.ldif
ldapadd -x -D “cn=root,dc=fcdev,dc=local” -W -f manager.ldif
ldapadd -x -D “cn=root,dc=fcdev,dc=local” -W -f OracleContext.ldif
ldapadd -x -D “cn=root,dc=fcdev,dc=local” -W -f emrep.ldif

ON THE CLIENT

Edit or Create $ORACLE_HOME/network/admin/ldap.ora

DIRECTORY_SERVERS=(devhost1.dev.local:389:636)
DIRECTORY_SERVER_TYPE=OID
DEFAULT_ADMIN_CONTEXT=”dc=dev,dc=local”

TEST
Ensure emrep is not defined in tnsnames.ora
# tnsping emrep
# sqlnet “sys/password@emrep as sysdba

IF both work then your do the same on all clients and its donw.
N.B. you may want to:
1) ensure the LDAP password authentication is encryped
2) ensure LDAP communication is via a secure channel rather than open
3) set up a duplicate database elsewhere so that if the ldap server goes down people can still connect