Link to home
Start Free TrialLog in
Avatar of LubomirMasar
LubomirMasar

asked on

ORA-12154: TNS:could not resolve the connect identifier specified

When I try to connect to a database from my .NET application, I am getting a
"ORA-12154: TNS:could not resolve the connect identifier specified "   error.

I am able to sqlplus login to the database. No errors there. Ping and Tnsping to the server are working fine too..The tnsnames.ora entry is correct also.

How can I fix this problem?

Avatar of gattu007
gattu007

Are you able to connect from sqlplus from the clinet?


The below mentalink note will give all the details regarding this error


Subject:       TROUBLESHOOTING GUIDE: TNS-12154 TNS:could not resolve service name        Doc ID:       Note:114085.1       
Avatar of LubomirMasar

ASKER

yes I am able to connect thru sqlplus! But not thru the web app.
I couldnt access your link..please post again
Avatar of schwertner
If this is Oracle 10g seems you have to change LISTENER.ORA file:

For STATIC registration of the Oracle service to the Listener:

Go to the remote 10g installation.
In ...\network\admin open listener.ora

see

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Ora10g)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
  )

Add the entry
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
with regard to the particular Oracle Home and SID Name.

Restart the listener:
c:>lsnrctl stop
c:>lsnctl start
No schwertner taht did not work..I did make all the changes u suggetsed and restated listener.

In fact listener is working correctly. SqlPlus is able to connect to sid. Tnsping works too. Just the web app is failing.
Then seems you have more then one tnsnames.ora files on your computer
and your web application uses another one
or
your web application do not use tnsnames at all
and has another mechanism to connect the DB.
Solved my problem.

Reinstalled Oracle client. Gave Full access permission to ASPNET user to the Oracle Home directory. Restarted the server. It worked.

Please revoke my points. Question withdrawn.
Ask the Helpdesk for this
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi All - I am having this same exact problem, and have tried all of the above troubleshooting tips with no luck. Does anyone have a definitive list of configurations and such that need to be checked?
mservidio , please ask a new question for your issue. Using someone else's question is kinda against the rules... not to mention that the experts won't see it at all