What is?

This is an Apache DS based implementation of an LDAP server with an Oracle backend.

This means that the ou=system partition, the ou=schema partition and all business partitions are all stored inside an Oracle database. It is also possible to have different partitions on different oracle databases.

The main purpose of the project is to build an LDAP server that is able to exploit all the Oracle Database features to tune performances time by time. So SQL statements are configurable, the data model has a base implementation but can be modified since the ldap filters are parsed and translated into SQL by a PL/SQL package that can be modified to solve a specific performance issue. For example, if you have a lot of ldap queries for a specific entry family, you can create a table containing those entries with one column for attribute, and modify the FILTER package to return results querying this table instead of querying the default tables.

Actually all entry and credential caches are disabled. Mostly because this enables the deployment of multiple nodes with dsorapart ldap running in parallel against one or more instances of an oracle database (RAC for example). So the “cache” actually is the buffer cache of the instance. May be interesting in the future to test a distributed Entry cache based on something like Oracle Coherence and the Oracle Database Change Notification feature.


User feedback will drive development, submit your requests:



Source/Doc or Binary package (initial release):


or CVS (updated frequently):


Use it

  1. Download http://downloads.sourceforge.net/dsorapart/dsorapart.tbz

  2. check createuser.sql for your env and lunch it:

    sqlplus / as sysdba @sql/createuser.sql

    NOTE (Q&D tips):

    1) the block size of dsorapart_entry tablespace is directly affected by the average size of an entry in your ldap. Big blocks waste space, small blocks means generally means bad performance. The default is 2K to preserve space. Check your entry average size (without binary fields).

    2) the block size of dsorapart_blob tablespace is 2K by default because there are a lot of small blobs generally: userPassword, pgpKey... This lead to block fragmentation if you do not use a small block size, and will waste a lot of space. Obviusly this is not an elegant solution, but at the moment was the fastest to develop. So if you need to store big lobs (like user fotos) you probably want to use a bigger block size. There are a lot of ways to do that but actually none is implemented.

    3) Obviously you need to set appropriate buffer caches for the block sizes you want to use. (eg. alter system set db_2k_cache_size=200M scope=both;)

  1. Run the schema creation script:

    sqlplus dsorapart/dsorapart @schema dsorapart_def dsorapart_dn dsorapart_idx dsorapart_entry dsorapart_blob dsorapart_uclu dsorapart_uidx dsorapart_utab

  2. Configure the base dn(s): open the entity-config/server.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <entity xmlns="http://eforceconfig.sourceforge.net/XML/entity-config" name="server">


<parameter name="worker-threads" value="5"/> <!-- 1 db connection per thread -->

<parameter name="ldapPort" value="3890"/>

<parameter name="ldapsPort" value="6360"/>

<parameter name="schemaCheck" value="false"/>


<components> <!-- one component per partition -->

<component name="dsorapart">


<parameter name="dn" value="dc=example,dc=com"/>

<parameter name="attributes" type="table">

<value name="objectClass" value="top"/>

<value name="objectClass" value="domain"/>

<value name="objectClass" value="extensibleObject"/>

<value name="dc" value="example"/>






  1. Configure the database connection: open the entity-config/db.xml

    <?xml version="1.0" encoding="UTF-8"?>

<entity xmlns="http://eforceconfig.sourceforge.net/XML/entity-config" name="db">


<parameter name="user" value="dsorapart" />

<parameter name="password" value="dsorapart" />

<parameter name="port" value="1521" />

<parameter name="host" value="localhost" />

<parameter name="sid" value="xe" />

<parameter name="implicit-caching" value="true" />

<parameter name="explicit-caching" value="true" />

<parameter name="connection-properties" type="table">

<value name="defaultRowPrefetch" value="10" />




  1. Run the server: sh ./dsorapart

  2. Use you favorite client to connect to the server (default port 3890). User uid=admin,ou=system password secret

  3. You need to index an attribute:

    sqlplus dsorapart/dsorapart@<connstr>

    SQL> exec indexer.create_index('uid');

    Eventually you can cluster the table of the index on the value of the attribute if for example you know that a lot of entries share the same value of an attribute (like objectclass, that is clustered by default):

    SQL> exec indexer.create_index('myattr',indexer.index_type_clustered);

    Or if you know that you will have unique values for an attribute, you can create a unique index:

    SQL> exec indexer.create_index('uid',indexer.index_type_unique);

    NOTE: to user index_type_* you have to run the query_optim1.sql against your schema (see downloads section).


If you get any other problem please submit a support request:



dsorapart is developed by Andrea A.A. Gariboldi

Oracle Database 10g Administrator Certified Professional

Oracle Application Server 10g Administrator Certified Professional