Add new domain to TNSadmin LDAP server

This will guide you through adding new domain to LDAP server and TNSadmin Web Manager GUI.

New domain will be created as a new LDAP database in LDAP root.

1. Create directory for database
Before creating a new LDAP database, we need to create directory to hold it's data and set LDAP server owner
mkdir /var/lib/ldap/
chown -R ldap: /var/lib/ldap/
2. Create domain structure
Create file /tmp/domain-newdomaincom.ldif with structure definition
# /tmp/domain-newdomaincom.ldif
dn: olcDatabase=bdb,cn=config
changetype: add
objectClass: olcBdbConfig
olcDatabase: bdb
olcSuffix: dc=newdomain,dc=com
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
           by dn.base="cn=Manager,dc=global" manage
olcDbDirectory: /var/lib/ldap/
Create database
ldapadd -f /tmp/domain-newdomaincom.ldif -D cn=Manager,dc=global -W

Now we have an empty database, and need to populate it with new structure. To do this, create another ldif file /tmp/newdomaincom-init.ldif with content

# /tmp/newdomaincom-init.ldif
dn: dc=newdomain,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: domain
dc: newdomain

dn: cn=OracleContext,dc=newdomain,dc=com
objectclass: orclContext
cn: OracleContext
and execute ldapadd to populate database
ldapadd -x -D cn=Manager,dc=global -W -f /tmp/newdomaincom-init.ldif
At this point, our database is ready to be filled with TNS records.
3. Add domain to TNSadmin Web Manager GUI

You can start using newly added domain in TNSadmin Web Manager GUI after adding it to it's configuration.

Find and open tnsadmin.conf and add your new domain to, e.g. =,,

and restart application