You can export an LDAP tree for ODSM using the ldifwrite utility with this syntax:

ldifwrite basedn=”dc=oracle,dc=com” ldiffile=$HOME/ldifprod.lst connect=orcl verbose=true


Careful: Lines that start with a space are concatenated into the line before during ldif import.  Resist the temptation to unwrap those lines to make your file easier for people to read.

For instance, let’s say this appears in your ldifwrite file:

dn: cn=orcla,cn=OracleContext,dc=oracle,dc=com
orclnetdescstring: (DESCRIPTION=(ADDRESS_LIST=(address=(protocol=tcp)(port=152
objectclass: orclNetService
objectclass: top
orclnetdescname: 000:cn=DESCRIPTION_0
cn: orcla

The LDAP import tool will concatenate the third line (starting with ” 1)(host=”) onto the end of the second line during import.

Your formatting help, dear human, will break it.