views:

117

answers:

3

Hi all,

I realise there are some similar questions on here already but I couldn't see one that matched my problem so I'm afraid I had to ask a new question.

I have a webservice running on a server, which is throwing a ORA-12154: TNS:could not resolve the connect identifier specified" error. However when I log onto the said server i am able to tnsping the entry successfully, and connect to it via sqlplus, but not through the webservice.

If anyone has any suggestions as to things to look for then I would greatly appreciate it.

Cheers

+1  A: 

The webservice can't find tnsnames.ora which usually means that you didn't set up Oracle's environment properly when starting the process. This usually means you didn't source oraenv.sh in the shell script which starts it.

Aaron Digulla
+1  A: 

So your interactive login works - what is different between your interactive login and the user that runs your web service?

Are they the same user? If not then you will need to update some of your configs in order to make the Oracle client files available to the webservice.

Details like Operating System, Oracle Version, etc are always a help.

David Mann
+1  A: 

Some other things to look at include:

  1. If you're using a service name instead of SID, are you specifying the entire service name?
  2. If you're using the ORACLE_SID environmental variable, check the case (mydb vs MYDB)
  3. Check for a sqlnet.log file
  4. If you're using a username/password@SID connect string, you may need to quote your password if it contains special characters (like an @ symbol).
Rob