Changing Oracle Internet Directory for Fedora Directory Server for oracle net names resolution, part 1: preparing the ldap server

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 9.2.0.1 or 9.0.x, it didn’t apply entirely to version 9.2.0.4). 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.

Advertisements
2 comments
  1. Hans-Peter Sloot said:

    Hallo Frits,

    Mijn naam is Hans-Peter Sloot en werk bij Atos Origin in Groningen.
    Ik aan het proberen om met openldap tns resolving voor elkaar te krijgen.

    Je noemt het document ‘Using OpenLDAP for Oracle TNS Resolution’.
    De link werkt echter niet meer.
    Heb jij het document nog ergens staan?

    Of staat er niet veel meer in dan wat jij beschreven hebt.

    m.v.g. Hans-Peter Sloot

  2. Hi Hans-Peter!

    I don’t know for sure what was included in the openldap tns resolving manual. There is a way to get the contents, even if the link is away: the Wayback machine! (http://www.archive.org/web/web.php)

    Link to the document using the wayback machine: http://web.archive.org/web/20070328211733/http://home.nc.rr.com/jtlayton/oid2openldap.html

    Please mind that I choose deliberately for the fedora directory server because openldap tended to kill itself when it gotten some non ldap compliant questions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: