In my last blog, I mentioned about that: An attribute is only searchable in OID if it is indexed and what are the different pre-reqs for a custom attribute to get indexed.
In this blog, lets see how can we index custom attributes. There are mainly 3 ways to index attributes in OID:
i) using ODSM (Oracle Directory Services Manager)
In below example, Role is a custom attribute and using catalog/de-catalog tool, this attribute can be indexed.
ii) using ldapmodify or
Create a ldif file as the one below and run ldapmodify using the –f argument.
modifyRoleAttribute.ldif dn: cn=catalogs changetype: modify add: orclindexedattribute orclindexedattribute: role
ldapmodify –h <host> –p <port> –D <admin user dn> –w <password> –f modifyRoleAttribute.ldif
iii) using the OID’s catalog tool
a) Set the relevant environment variables. The catalog tool is found under $ORACLE_HOME/ldap/bin
b) Locate tnsnames.ora under the $ORACLE_INSTANCE/config folder. This is where the catalog tool will use your database connection details.
$ORACLE_HOME/ldap/bin/catalog connect=”OIDDB” add=true attribute=”role”
If you want to delete an existing index:
$ORACLE_HOME/ldap/bin/catalog connect=”OIDDB” delete=true attribute=”assistant”
If you encounter any issues or need any help with OID or Identity Management, feel free to contact me on Sumit@OraWorld.co.uk
If you want to know when I have shared new blog posts, you can Subscribe to Blog.