First thing which comes to mind: why would we want that? Well, that is quite obvious to me:
-Fedora Directory Server (formerly netscape directory server) is open sourced since version 1.0.0 (currently at version 1.0.2)
-Fedora Directory Server (or: its predecessor, the Netscape Directory Server) is proven to be stable in various environments
-Because Fedora Directory Server is open source, there is no license fee
-It doesn’t use a schema in an oracle database
-It doesn’t use a daemon of which the working is not very well documented and kind of cryptic (this applies at least to the version of the ldap daemon which comes with oracle 9)
The next thing is getting the Fedora Directory Server on debian/sarge (we use debian for no-cost linux and redhat for linux with has a support contract). The Fedora Directory Server project has a nice wiki which describes how to do this: Fedora DS on ubuntu and sarge
At this stage, we have a working directory server, now we have to insert the oracle specific ldap objects (attributes and objects) in the directory server. Luckily, this has been described for openldap: Using OpenLDAP for Oracle TNS Resolution
This link does describe the way to do it in version 9 (I think it’s version 184.108.40.206 or 9.0.x, it didn’t apply entirely to version 220.127.116.11). I also must be honest and say I used the techniques on this paper.
What must we do for oracle version 10.2.0.1?
-get the files for creating the ‘base’,’net’ and ‘rdbms’ objects:
frits@bedrock:~$ mkdir ldap
frits@bedrock:~$ cd ldap
frits@bedrock:~/ldap$ cp $ORACLE_HOME/ldap/schema/oid/oidSchemaCreateBase.sbs .
frits@bedrock:~/ldap$ cp $ORACLE_HOME/ldap/schema/oid/oidSchemaCreateNet.sbs .
frits@bedrock:~/ldap$ cp $ORACLE_HOME/ldap/schema/oid/oidSchemaCreateRDBMS.sbs .
-convert the files to a format that the Fedora Directory Server understands:
frits@bedrock:~/ldap$ cat oidSchemaCreateBase.sbs | grep -i attributetypes | egrep -v '^add' > base.ldif
frits@bedrock:~/ldap$ cat oidSchemaCreateBase.sbs | grep -i objectclasses | egrep -v '^add' | egrep -v '^#' >> base.ldif
frits@bedrock:~/ldap$ cat oidSchemaCreateNet.sbs | grep -i attributetypes | egrep -v '^add' > net.ldif
frits@bedrock:~/ldap$ cat oidSchemaCreateNet.sbs | grep -i objectclasses | egrep -v '^add' | egrep -v '^#' >> net.ldif
frits@bedrock:~/ldap$ cat oidSchemaCreateRDBMS.sbs | grep -i attributetypes | egrep -v '^add' > rdbms.ldif
frits@bedrock:~/ldap$ cat oidSchemaCreateRDBMS.sbs | grep -i objectclasses | egrep -v '^add' | egrep -v '^#' >> rdbms.ldif
-make one (easy) file of it:
frits@bedrock:~/ldap $ cat base.ldif net.ldif rdbms.ldif > oracle.ldif
-transfer the oracle.ldif file to the ‘schema’ directory of the Fedora Directory Server and make it read to get used by the server:
# cd /opt/fedora-ds/slapd-ldapserver/config/schema
/opt/fedora-ds/slapd-server/config/schema #scp frits@bedrock:~/ldap/oracle.ldif .
/opt/fedora-ds/slapd-server/config/schema #echo "dn: cn=schema" >71oracle.ldif
/opt/fedora-ds/slapd-server/config/schema #cat oracle.ldif >> 71oracle.ldif
/opt/fedora-ds/slapd-server/config/schema #rm oracle.ldif
-start the Fedora Directory Server
(/opt/fedora-ds/slapd-server/start-slapd does that, the management console gets started using /opt/fedora-ds/start-admin), and see (using /opt/fedora-ds/startconsole) if the oracle objects are existent (both the object classes and attributes are prefixed by ‘orcl’) in the console.
This can be seen in the managent console by choosing the directory server in the server group, open it, and choose the tab configuration and select/open the “schema” folder.