Solved

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

Posted on 2007-04-11
12
7,007 Views
Last Modified: 2013-11-26
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?

0
Comment
Question by:LubomirMasar
12 Comments
 
LVL 7

Expert Comment

by:gattu007
Comment Utility
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       
0
 

Author Comment

by:LubomirMasar
Comment Utility
yes I am able to connect thru sqlplus! But not thru the web app.
0
 

Author Comment

by:LubomirMasar
Comment Utility
I couldnt access your link..please post again
0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
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
0
 

Author Comment

by:LubomirMasar
Comment Utility
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.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 47

Expert Comment

by:schwertner
Comment Utility
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.
0
 

Author Comment

by:LubomirMasar
Comment Utility
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.
0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
Ask the Helpdesk for this
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed with points refunded (500)

Computer101
EE Admin
0
 

Expert Comment

by:mservidio
Comment Utility
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?
0
 
LVL 20

Expert Comment

by:Venabili
Comment Utility
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
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now