Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using LDAP rather than tnsnames- different results with different env files

user10137234Dec 13 2012 — edited Dec 13 2012
Hi,
I have a 10g OID installation, and I am experimenting with using LDAP rather than tnsnames.ora file.
I have one user (Linux) called orasso, which sources two different env files depending on which $ORACLE_HOME I am interested in: sso.env for the mid-tier and db.env for the database-tier

sso.env
ORACLE_HOME=/oa/app/sso_home;export ORACLE_HOME
PATH=/oa/app/sso_home/bin:/oa/app/sso_home/opmn/bin:$PATH ;export PATH
ORACLE_SID=JMUSSO1;export ORACLE_SID

db.env
ORACLE_HOME=/oa/app/db/10.2.0;export ORACLE_HOME
PATH=/oa/app/db/10.2.0/bin:$PATH ;export PATH
ORACLE_SID=JMUSSO1;export ORACLE_SID

Now, I have created sqlnet.ora and ldap.ora and placed then in the two $ORACLE_HOME/network/admin directories (one for the db env and one for the sso env) :
sqlnet.ora
# sqlnet.ora Network Configuration File:
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, LDAP, EZCONNECT, ONAMES, HOSTNAME)

ldap.ora
# ldap.ora Network Configuration File:
# Generated by Oracle configuration tools.
DIRECTORY_SERVERS= (iportalx:389:636)
DEFAULT_ADMIN_CONTEXT = "dc=jmu,dc=ac,dc=uk"
DIRECTORY_SERVER_TYPE = OID

Now, the problem is :
If I source sso.env I get the following
tnsping SSO4LDAP

TNS Ping Utility for Linux: Version 10.1.0.5.0 - Production on 13-DEC-2012 12:55:18

Copyright (c) 1997, 2003, Oracle. All rights reserved.

Used parameter files:
/oa/app/sso_home/network/admin/sqlnet.ora

Used LDAP adapter to resolve the alias
Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=iportalx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=JMUSSO1.jmu.ac.uk)))
OK (0 msec)

but....
if I souce db.env I get
tnsping SSO4LDAP

TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 13-DEC-2012 12:55:41

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
/oa/app/db/10.2.0/network/admin/sqlnet.ora

TNS-03505: Failed to resolve name

My question is : why can I not see the SSO4LDAP service when sourcing the db.env, but I can when sourcing the sso.env ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2013
Added on Dec 13 2012
2 comments
1,096 views