OID 11g Database Tools (i.e, Catalog, Ldifwrite, Bulkload, Oidpasswd) Fail With "Unable to Connect to Database: Incorrect location for tnsnames.ora or Incorrect TNS Connect string or Invalid Password" (Doc ID 882360.1)

Last updated on MAY 17, 2017

Applies to:

Oracle Internet Directory - Version 11.1.1 and later
Information in this document applies to any platform.

Symptoms

Using Oracle Internet Directory 11g (OID 11.1.1.X) Database (DB) tools, such as catalog, ldifwrite, bulkload or bulkdelete, for example:

ldifwrite connect=oid basedn="cn=users,dc=mycompany,dc=com" ldiffile="/tmp/test.ldif"

Fail with:

Unable to Connect to Database: Incorrect location for tnsnames.ora (derived from ORACLE_INSTANCE) or Incorrect TNS Connect string or Invalid Password

Oidpasswd tool may fail as follows, for example:

$oidpasswd connect=<servicename> unlock_su_acct=true
OID DB user password:
ERROR * gsldpuUnlockSuAccount * ORA-12154:ORA-12154: TNS:could not resolve the connect identifier specified
encountered
Error in unlocking OID super user account.

 

Even after setting the environment variables correctly, for example:
export ORACLE_HOME=<path to non-writable files in the Oracle Identity Management installation>
export ORACLE_INSTANCE=<path to the writable files in the Oracle Identity Management installation>
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/ldap/bin:$ORACLE_HOME/ldap/admin:$PATH

Tried manually adding a tnsnames.ora with the connection information for the servicename, i.e. OID in this case, to the OID home in $ORACLE_HOME/network/admin, and tried setting TNS_ADMIN variable to point to this tnsnames.ora location.  However, the DB tools continued to fail, sometimes with just an "invalid password" error message.

Also verified that sqlplus with the same OID DB user (ODS) username, password and servicename of OID works fine.

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms