If you run ldapsearch on a machine that has OID installed and receive an error like “Context Initialization Error”. The solution is to set your ORACLE_HOME.
Linux
export ORACLE_HOME=d0/oracle/fmw11g/Oracle_IDM1
Windows
set ORACLE_HOME=C:\d0\oracle\fmw11g\Oracle_IDM1